blob: f6d3b5bc598434cdacdc77ee2107100cf7a6d6cc [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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="pubsub_v1beta2.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.topics.html">topics</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="pubsub_v1beta2.projects.topics.subscriptions.html">subscriptions()</a></code>
79</p>
80<p class="firstline">Returns the subscriptions Resource.</p>
81
82<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000083 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080084<p class="firstline">Creates the given topic with the given name.</p>
85<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000086 <code><a href="#delete">delete(topic, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted.</p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000089 <code><a href="#get">get(topic, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080090<p class="firstline">Gets the configuration of a topic.</p>
91<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000092 <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
94<p class="toc_element">
95 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080096<p class="firstline">Lists matching topics.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000101 <code><a href="#publish">publish(topic, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800102<p class="firstline">Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000103<p class="toc_element">
104 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
105<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
106<p class="toc_element">
107 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
108<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800109<h3>Method Details</h3>
110<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000111 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800112 <pre>Creates the given topic with the given name.
113
114Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000115 name: string, The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog". (required)
Craig Citroe633be12015-03-02 13:40:36 -0800116 body: object, The request body. (required)
117 The object takes the form of:
118
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000119{ # A topic resource.
120 "name": "A String", # The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
121}
Craig Citroe633be12015-03-02 13:40:36 -0800122
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000123 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800124
125Returns:
126 An object of the form:
127
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000128 { # A topic resource.
129 "name": "A String", # The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
Craig Citroe633be12015-03-02 13:40:36 -0800130 }</pre>
131</div>
132
133<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000134 <code class="details" id="delete">delete(topic, x__xgafv=None)</code>
135 <pre>Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted.
Craig Citroe633be12015-03-02 13:40:36 -0800136
137Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000138 topic: string, Name of the topic to delete. (required)
139 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800140
141Returns:
142 An object of the form:
143
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000144 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
145 }</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800146</div>
147
148<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000149 <code class="details" id="get">get(topic, x__xgafv=None)</code>
150 <pre>Gets the configuration of a topic.
Craig Citroe633be12015-03-02 13:40:36 -0800151
152Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000153 topic: string, The name of the topic to get. (required)
154 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800155
156Returns:
157 An object of the form:
158
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000159 { # A topic resource.
160 "name": "A String", # The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
161 }</pre>
162</div>
163
164<div class="method">
165 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
166 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
167
168Args:
169 resource: string, REQUIRED: The resource for which policy is being requested. Usually some path like projects/{project}. (required)
170 x__xgafv: string, V1 error format.
171
172Returns:
173 An object of the form:
174
175 { # # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
176 "rules": [
177 { # A rule to be applied in a Policy.
178 "notIn": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The formation for in and not_in entries is the same as members in a Binding above.
179 "A String",
180 ],
181 "description": "A String", # Human-readable description of the rule.
182 "in": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
183 "A String",
184 ],
185 "action": "A String", # Required
186 "conditions": [ # Additional restrictions that must be met
187 { # A condition to be met.
188 "iam": "A String", # Trusted attributes supplied by the IAM system.
189 "svc": "A String", # Trusted attributes discharged by the service.
190 "value": "A String", # The object of the condition. Exactly one of these must be set.
191 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
192 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
193 "A String",
194 ],
195 "op": "A String", # An operator to apply the subject with.
196 },
197 ],
198 "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
199 { # Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only "iam_principal", corresponding to IAMContext.principal, is supported. Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1
200 "counter": { # Options for counters # Counter options.
201 "field": "A String", # The field value to attribute.
202 "metric": "A String", # The metric to update.
203 },
204 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
205 },
206 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
207 },
208 },
209 ],
210 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
211 "A String",
212 ],
213 },
214 ],
215 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
216 { # Associates members of various types with roles. See below for details of the various objects that can be included as members.
217 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
218 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
219 "A String",
220 ],
221 },
222 ],
223 "version": 42, # The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
224 "etag": "A String", # Can be used to perform a read-modify-write.
225 }</pre>
226</div>
227
228<div class="method">
229 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
230 <pre>Lists matching topics.
231
232Args:
233 project: string, The name of the cloud project that topics belong to. (required)
234 pageSize: integer, Maximum number of topics to return.
235 pageToken: string, The value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior ListTopics call, and that the system should return the next page of data.
236 x__xgafv: string, V1 error format.
237
238Returns:
239 An object of the form:
240
241 { # Response for the ListTopics method.
242 "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the request; this value should be passed in a new ListTopicsRequest.
243 "topics": [ # The resulting topics.
244 { # A topic resource.
245 "name": "A String", # The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
246 },
Craig Citroe633be12015-03-02 13:40:36 -0800247 ],
248 }</pre>
249</div>
250
251<div class="method">
252 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
253 <pre>Retrieves the next page of results.
254
255Args:
256 previous_request: The request for the previous page. (required)
257 previous_response: The response from the request for the previous page. (required)
258
259Returns:
260 A request object that you can call 'execute()' on to request the next
261 page. Returns None if there are no more items in the collection.
262 </pre>
263</div>
264
265<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000266 <code class="details" id="publish">publish(topic, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800267 <pre>Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.
268
269Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000270 topic: string, The messages in the request will be published on this topic. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800271 body: object, The request body. (required)
272 The object takes the form of:
273
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000274{ # Request for the Publish method.
275 "messages": [ # The messages to publish.
276 { # A message data and its attributes.
277 "attributes": { # Optional attributes for this message.
Craig Citroe633be12015-03-02 13:40:36 -0800278 "a_key": "A String",
279 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000280 "data": "A String", # The message payload. For JSON requests, the value of this field must be base64-encoded.
281 "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call.
Craig Citroe633be12015-03-02 13:40:36 -0800282 },
283 ],
284 }
285
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000286 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800287
288Returns:
289 An object of the form:
290
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000291 { # Response for the Publish method.
292 "messageIds": [ # The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.
293 "A String",
294 ],
295 }</pre>
296</div>
297
298<div class="method">
299 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
300 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
301
302Args:
303 resource: string, REQUIRED: The resource for which policy is being specified. Usually some path like projects/{project}/zones/{zone}/disks/{disk}. (required)
304 body: object, The request body. (required)
305 The object takes the form of:
306
307{ # Request message for `SetIamPolicy` method.
308 "policy": { # # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ``` # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
309 "rules": [
310 { # A rule to be applied in a Policy.
311 "notIn": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The formation for in and not_in entries is the same as members in a Binding above.
312 "A String",
313 ],
314 "description": "A String", # Human-readable description of the rule.
315 "in": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
316 "A String",
317 ],
318 "action": "A String", # Required
319 "conditions": [ # Additional restrictions that must be met
320 { # A condition to be met.
321 "iam": "A String", # Trusted attributes supplied by the IAM system.
322 "svc": "A String", # Trusted attributes discharged by the service.
323 "value": "A String", # The object of the condition. Exactly one of these must be set.
324 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
325 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
326 "A String",
327 ],
328 "op": "A String", # An operator to apply the subject with.
329 },
330 ],
331 "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
332 { # Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only "iam_principal", corresponding to IAMContext.principal, is supported. Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1
333 "counter": { # Options for counters # Counter options.
334 "field": "A String", # The field value to attribute.
335 "metric": "A String", # The metric to update.
336 },
337 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
338 },
339 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
340 },
341 },
342 ],
343 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
344 "A String",
345 ],
346 },
347 ],
348 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
349 { # Associates members of various types with roles. See below for details of the various objects that can be included as members.
350 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
351 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
352 "A String",
353 ],
354 },
355 ],
356 "version": 42, # The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
357 "etag": "A String", # Can be used to perform a read-modify-write.
358 },
359 }
360
361 x__xgafv: string, V1 error format.
362
363Returns:
364 An object of the form:
365
366 { # # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
367 "rules": [
368 { # A rule to be applied in a Policy.
369 "notIn": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The formation for in and not_in entries is the same as members in a Binding above.
370 "A String",
371 ],
372 "description": "A String", # Human-readable description of the rule.
373 "in": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
374 "A String",
375 ],
376 "action": "A String", # Required
377 "conditions": [ # Additional restrictions that must be met
378 { # A condition to be met.
379 "iam": "A String", # Trusted attributes supplied by the IAM system.
380 "svc": "A String", # Trusted attributes discharged by the service.
381 "value": "A String", # The object of the condition. Exactly one of these must be set.
382 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
383 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
384 "A String",
385 ],
386 "op": "A String", # An operator to apply the subject with.
387 },
388 ],
389 "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
390 { # Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only "iam_principal", corresponding to IAMContext.principal, is supported. Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1
391 "counter": { # Options for counters # Counter options.
392 "field": "A String", # The field value to attribute.
393 "metric": "A String", # The metric to update.
394 },
395 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
396 },
397 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
398 },
399 },
400 ],
401 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
402 "A String",
403 ],
404 },
405 ],
406 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
407 { # Associates members of various types with roles. See below for details of the various objects that can be included as members.
408 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
409 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
410 "A String",
411 ],
412 },
413 ],
414 "version": 42, # The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
415 "etag": "A String", # Can be used to perform a read-modify-write.
416 }</pre>
417</div>
418
419<div class="method">
420 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
421 <pre>Returns permissions that a caller has on the specified resource.
422
423Args:
424 resource: string, REQUIRED: The resource for which policy detail is being requested. Usually some path like projects/{project}. (required)
425 body: object, The request body. (required)
426 The object takes the form of:
427
428{ # Request message for `TestIamPermissions` method.
429 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
430 "A String",
431 ],
432 }
433
434 x__xgafv: string, V1 error format.
435
436Returns:
437 An object of the form:
438
439 { # Response message for `TestIamPermissions` method.
440 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
Craig Citroe633be12015-03-02 13:40:36 -0800441 "A String",
442 ],
443 }</pre>
444</div>
445
446</body></html>