Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="servicemanagement_v1.html">Service Management API</a> . <a href="servicemanagement_v1.services.html">services</a></h1> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="servicemanagement_v1.services.configs.html">configs()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the configs Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 83 | <code><a href="servicemanagement_v1.services.consumers.html">consumers()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the consumers Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 88 | <code><a href="servicemanagement_v1.services.rollouts.html">rollouts()</a></code> |
| 89 | </p> |
| 90 | <p class="firstline">Returns the rollouts Resource.</p> |
| 91 | |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 94 | <p class="firstline">Creates a new managed service.</p> |
| 95 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 96 | <code><a href="#delete">delete(serviceName, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 97 | <p class="firstline">Deletes a managed service. This method will change the service to the</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#disable">disable(serviceName, body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 100 | <p class="firstline">Disables a service for a project, so it can no longer be</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code><a href="#enable">enable(serviceName, body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 103 | <p class="firstline">Enables a service for a project, so it can be used</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 104 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code><a href="#generateConfigReport">generateConfigReport(body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 106 | <p class="firstline">Generates and returns a report (errors, warnings and changes from</p> |
| 107 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 108 | <code><a href="#get">get(serviceName, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 109 | <p class="firstline">Gets a managed service. Authentication is required unless the service is</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 110 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 111 | <code><a href="#getConfig">getConfig(serviceName, view=None, configId=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 112 | <p class="firstline">Gets a service configuration (version) for a managed service.</p> |
| 113 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 114 | <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 115 | <p class="firstline">Gets the access control policy for a resource.</p> |
| 116 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 117 | <code><a href="#list">list(pageToken=None, consumerId=None, producerProjectId=None, pageSize=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 118 | <p class="firstline">Lists managed services.</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 119 | <p class="toc_element"> |
| 120 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 121 | <p class="firstline">Retrieves the next page of results.</p> |
| 122 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 123 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 124 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
| 125 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 127 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 128 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 129 | <code><a href="#undelete">undelete(serviceName, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 130 | <p class="firstline">Revives a previously deleted managed service. The method restores the</p> |
| 131 | <h3>Method Details</h3> |
| 132 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 133 | <code class="details" id="create">create(body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 134 | <pre>Creates a new managed service. |
| 135 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 136 | A managed service is immutable, and is subject to mandatory 30-day |
| 137 | data retention. You cannot move a service or recreate it within 30 days |
| 138 | after deletion. |
| 139 | |
| 140 | One producer project can own no more than 500 services. For security and |
| 141 | reliability purposes, a production service should be hosted in a |
| 142 | dedicated producer project. |
| 143 | |
| 144 | Operation<response: ManagedService> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 145 | |
| 146 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 147 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 148 | The object takes the form of: |
| 149 | |
| 150 | { # The full representation of a Service that is managed by |
| 151 | # Google Service Management. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 152 | "serviceName": "A String", # The name of the service. See the [overview](/service-management/overview) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 153 | # for naming requirements. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 154 | "producerProjectId": "A String", # ID of the project that produces and owns this service. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | x__xgafv: string, V1 error format. |
| 158 | Allowed values |
| 159 | 1 - v1 error format |
| 160 | 2 - v2 error format |
| 161 | |
| 162 | Returns: |
| 163 | An object of the form: |
| 164 | |
| 165 | { # This resource represents a long-running operation that is the result of a |
| 166 | # network API call. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 167 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 168 | # different programming environments, including REST APIs and RPC APIs. It is |
| 169 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 170 | # three pieces of data: error code, error message, and error details. |
| 171 | # |
| 172 | # You can find out more about this error model and how to work with it in the |
| 173 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 174 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 175 | # message types for APIs to use. |
| 176 | { |
| 177 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 178 | }, |
| 179 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 180 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 181 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 182 | # user-facing error message should be localized and sent in the |
| 183 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 184 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 185 | "metadata": { # Service-specific metadata associated with the operation. It typically |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 186 | # contains progress information and common metadata such as create time. |
| 187 | # Some services might not provide such metadata. Any method that returns a |
| 188 | # long-running operation should document the metadata type, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 189 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 190 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 191 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 192 | # If `true`, the operation is completed, and either `error` or `response` is |
| 193 | # available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 194 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 195 | # method returns no data on success, such as `Delete`, the response is |
| 196 | # `google.protobuf.Empty`. If the original method is standard |
| 197 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 198 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 199 | # is the original method name. For example, if the original method name |
| 200 | # is `TakeSnapshot()`, the inferred response type is |
| 201 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 202 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 203 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 204 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 205 | # originally returns it. If you use the default HTTP mapping, the |
| 206 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 207 | }</pre> |
| 208 | </div> |
| 209 | |
| 210 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 211 | <code class="details" id="delete">delete(serviceName, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 212 | <pre>Deletes a managed service. This method will change the service to the |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 213 | `Soft-Delete` state for 30 days. Within this period, service producers may |
| 214 | call UndeleteService to restore the service. |
| 215 | After 30 days, the service will be permanently deleted. |
| 216 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 217 | Operation<response: google.protobuf.Empty> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 218 | |
| 219 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 220 | serviceName: string, Required. The name of the service. See the [overview](/service-management/overview) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 221 | for naming requirements. For example: `example.googleapis.com`. (required) |
| 222 | x__xgafv: string, V1 error format. |
| 223 | Allowed values |
| 224 | 1 - v1 error format |
| 225 | 2 - v2 error format |
| 226 | |
| 227 | Returns: |
| 228 | An object of the form: |
| 229 | |
| 230 | { # This resource represents a long-running operation that is the result of a |
| 231 | # network API call. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 232 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 233 | # different programming environments, including REST APIs and RPC APIs. It is |
| 234 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 235 | # three pieces of data: error code, error message, and error details. |
| 236 | # |
| 237 | # You can find out more about this error model and how to work with it in the |
| 238 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 239 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 240 | # message types for APIs to use. |
| 241 | { |
| 242 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 243 | }, |
| 244 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 245 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 246 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 247 | # user-facing error message should be localized and sent in the |
| 248 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 249 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | "metadata": { # Service-specific metadata associated with the operation. It typically |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 251 | # contains progress information and common metadata such as create time. |
| 252 | # Some services might not provide such metadata. Any method that returns a |
| 253 | # long-running operation should document the metadata type, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 254 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 255 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 256 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 257 | # If `true`, the operation is completed, and either `error` or `response` is |
| 258 | # available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 259 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 260 | # method returns no data on success, such as `Delete`, the response is |
| 261 | # `google.protobuf.Empty`. If the original method is standard |
| 262 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 263 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 264 | # is the original method name. For example, if the original method name |
| 265 | # is `TakeSnapshot()`, the inferred response type is |
| 266 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 267 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 268 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 269 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 270 | # originally returns it. If you use the default HTTP mapping, the |
| 271 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 272 | }</pre> |
| 273 | </div> |
| 274 | |
| 275 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 276 | <code class="details" id="disable">disable(serviceName, body=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 277 | <pre>Disables a service for a project, so it can no longer be |
| 278 | be used for the project. It prevents accidental usage that may cause |
| 279 | unexpected billing charges or security leaks. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 280 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 281 | Operation<response: DisableServiceResponse> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 282 | |
| 283 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 284 | serviceName: string, Required. Name of the service to disable. Specifying an unknown service name |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 285 | will cause the request to fail. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 286 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 287 | The object takes the form of: |
| 288 | |
| 289 | { # Request message for DisableService method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 290 | "consumerId": "A String", # Required. The identity of consumer resource which service disablement will be |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 291 | # applied to. |
| 292 | # |
| 293 | # The Google Service Management implementation accepts the following |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 294 | # forms: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 295 | # - "project:<project_id>" |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 296 | # |
| 297 | # Note: this is made compatible with |
| 298 | # google.api.servicecontrol.v1.Operation.consumer_id. |
| 299 | } |
| 300 | |
| 301 | x__xgafv: string, V1 error format. |
| 302 | Allowed values |
| 303 | 1 - v1 error format |
| 304 | 2 - v2 error format |
| 305 | |
| 306 | Returns: |
| 307 | An object of the form: |
| 308 | |
| 309 | { # This resource represents a long-running operation that is the result of a |
| 310 | # network API call. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 311 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 312 | # different programming environments, including REST APIs and RPC APIs. It is |
| 313 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 314 | # three pieces of data: error code, error message, and error details. |
| 315 | # |
| 316 | # You can find out more about this error model and how to work with it in the |
| 317 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 318 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 319 | # message types for APIs to use. |
| 320 | { |
| 321 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 322 | }, |
| 323 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 324 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 325 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 326 | # user-facing error message should be localized and sent in the |
| 327 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 328 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 329 | "metadata": { # Service-specific metadata associated with the operation. It typically |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 330 | # contains progress information and common metadata such as create time. |
| 331 | # Some services might not provide such metadata. Any method that returns a |
| 332 | # long-running operation should document the metadata type, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 333 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 334 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 335 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 336 | # If `true`, the operation is completed, and either `error` or `response` is |
| 337 | # available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 338 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 339 | # method returns no data on success, such as `Delete`, the response is |
| 340 | # `google.protobuf.Empty`. If the original method is standard |
| 341 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 342 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 343 | # is the original method name. For example, if the original method name |
| 344 | # is `TakeSnapshot()`, the inferred response type is |
| 345 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 346 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 347 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 348 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 349 | # originally returns it. If you use the default HTTP mapping, the |
| 350 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 351 | }</pre> |
| 352 | </div> |
| 353 | |
| 354 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 355 | <code class="details" id="enable">enable(serviceName, body=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 356 | <pre>Enables a service for a project, so it can be used |
| 357 | for the project. See |
| 358 | [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for |
| 359 | more information. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 360 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 361 | Operation<response: EnableServiceResponse> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 362 | |
| 363 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 364 | serviceName: string, Required. Name of the service to enable. Specifying an unknown service name will |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 365 | cause the request to fail. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 366 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 367 | The object takes the form of: |
| 368 | |
| 369 | { # Request message for EnableService method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 370 | "consumerId": "A String", # Required. The identity of consumer resource which service enablement will be |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 371 | # applied to. |
| 372 | # |
| 373 | # The Google Service Management implementation accepts the following |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 374 | # forms: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 375 | # - "project:<project_id>" |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 376 | # |
| 377 | # Note: this is made compatible with |
| 378 | # google.api.servicecontrol.v1.Operation.consumer_id. |
| 379 | } |
| 380 | |
| 381 | x__xgafv: string, V1 error format. |
| 382 | Allowed values |
| 383 | 1 - v1 error format |
| 384 | 2 - v2 error format |
| 385 | |
| 386 | Returns: |
| 387 | An object of the form: |
| 388 | |
| 389 | { # This resource represents a long-running operation that is the result of a |
| 390 | # network API call. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 391 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 392 | # different programming environments, including REST APIs and RPC APIs. It is |
| 393 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 394 | # three pieces of data: error code, error message, and error details. |
| 395 | # |
| 396 | # You can find out more about this error model and how to work with it in the |
| 397 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 398 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 399 | # message types for APIs to use. |
| 400 | { |
| 401 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 402 | }, |
| 403 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 404 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 405 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 406 | # user-facing error message should be localized and sent in the |
| 407 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 408 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 409 | "metadata": { # Service-specific metadata associated with the operation. It typically |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 410 | # contains progress information and common metadata such as create time. |
| 411 | # Some services might not provide such metadata. Any method that returns a |
| 412 | # long-running operation should document the metadata type, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 413 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 414 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 415 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 416 | # If `true`, the operation is completed, and either `error` or `response` is |
| 417 | # available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 418 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 419 | # method returns no data on success, such as `Delete`, the response is |
| 420 | # `google.protobuf.Empty`. If the original method is standard |
| 421 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 422 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 423 | # is the original method name. For example, if the original method name |
| 424 | # is `TakeSnapshot()`, the inferred response type is |
| 425 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 426 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 427 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 428 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 429 | # originally returns it. If you use the default HTTP mapping, the |
| 430 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 431 | }</pre> |
| 432 | </div> |
| 433 | |
| 434 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 435 | <code class="details" id="generateConfigReport">generateConfigReport(body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 436 | <pre>Generates and returns a report (errors, warnings and changes from |
| 437 | existing configurations) associated with |
| 438 | GenerateConfigReportRequest.new_value |
| 439 | |
| 440 | If GenerateConfigReportRequest.old_value is specified, |
| 441 | GenerateConfigReportRequest will contain a single ChangeReport based on the |
| 442 | comparison between GenerateConfigReportRequest.new_value and |
| 443 | GenerateConfigReportRequest.old_value. |
| 444 | If GenerateConfigReportRequest.old_value is not specified, this method |
| 445 | will compare GenerateConfigReportRequest.new_value with the last pushed |
| 446 | service configuration. |
| 447 | |
| 448 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 449 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 450 | The object takes the form of: |
| 451 | |
| 452 | { # Request message for GenerateConfigReport method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 453 | "newConfig": { # Required. Service configuration for which we want to generate the report. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 454 | # For this version of API, the supported types are |
| 455 | # google.api.servicemanagement.v1.ConfigRef, |
| 456 | # google.api.servicemanagement.v1.ConfigSource, |
| 457 | # and google.api.Service |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 458 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 459 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 460 | "oldConfig": { # Optional. Service configuration against which the comparison will be done. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 461 | # For this version of API, the supported types are |
| 462 | # google.api.servicemanagement.v1.ConfigRef, |
| 463 | # google.api.servicemanagement.v1.ConfigSource, |
| 464 | # and google.api.Service |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 465 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 466 | }, |
| 467 | } |
| 468 | |
| 469 | x__xgafv: string, V1 error format. |
| 470 | Allowed values |
| 471 | 1 - v1 error format |
| 472 | 2 - v2 error format |
| 473 | |
| 474 | Returns: |
| 475 | An object of the form: |
| 476 | |
| 477 | { # Response message for GenerateConfigReport method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 478 | "changeReports": [ # list of ChangeReport, each corresponding to comparison between two |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 479 | # service configurations. |
| 480 | { # Change report associated with a particular service configuration. |
| 481 | # |
| 482 | # It contains a list of ConfigChanges based on the comparison between |
| 483 | # two service configurations. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 484 | "configChanges": [ # List of changes between two service configurations. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 485 | # The changes will be alphabetically sorted based on the identifier |
| 486 | # of each change. |
| 487 | # A ConfigChange identifier is a dot separated path to the configuration. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 488 | # Example: visibility.rules[selector='LibraryService.CreateBook'].restriction |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 489 | { # Output generated from semantically comparing two versions of a service |
| 490 | # configuration. |
| 491 | # |
| 492 | # Includes detailed information about a field that have changed with |
| 493 | # applicable advice about potential consequences for the change, such as |
| 494 | # backwards-incompatibility. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 495 | "advices": [ # Collection of advice provided for this change, useful for determining the |
| 496 | # possible impact of this change. |
| 497 | { # Generated advice about this change, used for providing more |
| 498 | # information about how a change will affect the existing service. |
| 499 | "description": "A String", # Useful description for why this advice was applied and what actions should |
| 500 | # be taken to mitigate any implied risks. |
| 501 | }, |
| 502 | ], |
| 503 | "oldValue": "A String", # Value of the changed object in the old Service configuration, |
| 504 | # in JSON format. This field will not be populated if ChangeType == ADDED. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 505 | "newValue": "A String", # Value of the changed object in the new Service configuration, |
| 506 | # in JSON format. This field will not be populated if ChangeType == REMOVED. |
| 507 | "changeType": "A String", # The type for this change, either ADDED, REMOVED, or MODIFIED. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 508 | "element": "A String", # Object hierarchy path to the change, with levels separated by a '.' |
| 509 | # character. For repeated fields, an applicable unique identifier field is |
| 510 | # used for the index (usually selector, name, or id). For maps, the term |
| 511 | # 'key' is used. If the field has no unique identifier, the numeric index |
| 512 | # is used. |
| 513 | # Examples: |
| 514 | # - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction |
| 515 | # - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value |
| 516 | # - logging.producer_destinations[0] |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 517 | }, |
| 518 | ], |
| 519 | }, |
| 520 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 521 | "serviceName": "A String", # Name of the service this report belongs to. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 522 | "diagnostics": [ # Errors / Linter warnings associated with the service definition this |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 523 | # report |
| 524 | # belongs to. |
| 525 | { # Represents a diagnostic message (error or warning) |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 526 | "kind": "A String", # The kind of diagnostic information provided. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 527 | "location": "A String", # File name and line number of the error or warning. |
| 528 | "message": "A String", # Message describing the error or warning. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 529 | }, |
| 530 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 531 | "id": "A String", # ID of the service configuration this report belongs to. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 532 | }</pre> |
| 533 | </div> |
| 534 | |
| 535 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 536 | <code class="details" id="get">get(serviceName, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 537 | <pre>Gets a managed service. Authentication is required unless the service is |
| 538 | public. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 539 | |
| 540 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 541 | serviceName: string, Required. The name of the service. See the `ServiceManager` overview for naming |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 542 | requirements. For example: `example.googleapis.com`. (required) |
| 543 | x__xgafv: string, V1 error format. |
| 544 | Allowed values |
| 545 | 1 - v1 error format |
| 546 | 2 - v2 error format |
| 547 | |
| 548 | Returns: |
| 549 | An object of the form: |
| 550 | |
| 551 | { # The full representation of a Service that is managed by |
| 552 | # Google Service Management. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 553 | "serviceName": "A String", # The name of the service. See the [overview](/service-management/overview) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 554 | # for naming requirements. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 555 | "producerProjectId": "A String", # ID of the project that produces and owns this service. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 556 | }</pre> |
| 557 | </div> |
| 558 | |
| 559 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 560 | <code class="details" id="getConfig">getConfig(serviceName, view=None, configId=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 561 | <pre>Gets a service configuration (version) for a managed service. |
| 562 | |
| 563 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 564 | serviceName: string, Required. The name of the service. See the [overview](/service-management/overview) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 565 | for naming requirements. For example: `example.googleapis.com`. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 566 | view: string, Specifies which parts of the Service Config should be returned in the |
| 567 | response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 568 | configId: string, Required. The id of the service configuration resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 569 | |
| 570 | This field must be specified for the server to return all fields, including |
| 571 | `SourceInfo`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 572 | x__xgafv: string, V1 error format. |
| 573 | Allowed values |
| 574 | 1 - v1 error format |
| 575 | 2 - v2 error format |
| 576 | |
| 577 | Returns: |
| 578 | An object of the form: |
| 579 | |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 580 | { # `Service` is the root object of Google service configuration schema. It |
| 581 | # describes basic information about a service, such as the name and the |
| 582 | # title, and delegates other aspects to sub-sections. Each sub-section is |
| 583 | # either a proto message or a repeated proto message that configures a |
| 584 | # specific aspect, such as auth. See each proto message definition for details. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 585 | # |
| 586 | # Example: |
| 587 | # |
| 588 | # type: google.api.Service |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 589 | # config_version: 3 |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 590 | # name: calendar.googleapis.com |
| 591 | # title: Google Calendar API |
| 592 | # apis: |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 593 | # - name: google.calendar.v3.Calendar |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 594 | # authentication: |
| 595 | # providers: |
| 596 | # - id: google_calendar_auth |
| 597 | # jwks_uri: https://www.googleapis.com/oauth2/v1/certs |
| 598 | # issuer: https://securetoken.google.com |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 599 | # rules: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 600 | # - selector: "*" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 601 | # requirements: |
| 602 | # provider_id: google_calendar_auth |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 603 | "enums": [ # A list of all enum types included in this API service. Enums |
| 604 | # referenced directly or indirectly by the `apis` are automatically |
| 605 | # included. Enums which are not referenced but shall be included |
| 606 | # should be listed here by name. Example: |
| 607 | # |
| 608 | # enums: |
| 609 | # - name: google.someapi.v1.SomeEnum |
| 610 | { # Enum type definition. |
| 611 | "options": [ # Protocol buffer options. |
| 612 | { # A protocol buffer option, which can be attached to a message, field, |
| 613 | # enumeration, etc. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 614 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 615 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 616 | # should be used. If the value is an enum, it should be stored as an int32 |
| 617 | # value using the google.protobuf.Int32Value type. |
| 618 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 619 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 620 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 621 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 622 | # For custom options, it should be the fully-qualified name. For example, |
| 623 | # `"google.api.http"`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 624 | }, |
| 625 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 626 | "enumvalue": [ # Enum value definitions. |
| 627 | { # Enum value definition. |
| 628 | "name": "A String", # Enum value name. |
| 629 | "options": [ # Protocol buffer options. |
| 630 | { # A protocol buffer option, which can be attached to a message, field, |
| 631 | # enumeration, etc. |
| 632 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 633 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 634 | # should be used. If the value is an enum, it should be stored as an int32 |
| 635 | # value using the google.protobuf.Int32Value type. |
| 636 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 637 | }, |
| 638 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 639 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 640 | # For custom options, it should be the fully-qualified name. For example, |
| 641 | # `"google.api.http"`. |
| 642 | }, |
| 643 | ], |
| 644 | "number": 42, # Enum value number. |
| 645 | }, |
| 646 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 647 | "sourceContext": { # `SourceContext` represents information about the source of a # The source context. |
| 648 | # protobuf element, like the file in which it is defined. |
| 649 | "fileName": "A String", # The path-qualified name of the .proto file that contained the associated |
| 650 | # protobuf element. For example: `"google/protobuf/source_context.proto"`. |
| 651 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 652 | "name": "A String", # Enum type name. |
| 653 | "syntax": "A String", # The source syntax. |
| 654 | }, |
| 655 | ], |
| 656 | "backend": { # `Backend` defines the backend configuration for a service. # API backend configuration. |
| 657 | "rules": [ # A list of API backend rules that apply to individual API methods. |
| 658 | # |
| 659 | # **NOTE:** All service configuration rules follow "last one wins" order. |
| 660 | { # A backend rule provides configuration for an individual API element. |
| 661 | "disableAuth": True or False, # When disable_auth is true, a JWT ID token won't be generated and the |
| 662 | # original "Authorization" HTTP header will be preserved. If the header is |
| 663 | # used to carry the original token and is expected by the backend, this |
| 664 | # field must be set to true to preserve the header. |
| 665 | "address": "A String", # The address of the API backend. |
| 666 | # |
| 667 | # The scheme is used to determine the backend protocol and security. |
| 668 | # The following schemes are accepted: |
| 669 | # |
| 670 | # SCHEME PROTOCOL SECURITY |
| 671 | # http:// HTTP None |
| 672 | # https:// HTTP TLS |
| 673 | # grpc:// gRPC None |
| 674 | # grpcs:// gRPC TLS |
| 675 | # |
| 676 | # It is recommended to explicitly include a scheme. Leaving out the scheme |
| 677 | # may cause constrasting behaviors across platforms. |
| 678 | # |
| 679 | # If the port is unspecified, the default is: |
| 680 | # - 80 for schemes without TLS |
| 681 | # - 443 for schemes with TLS |
| 682 | # |
| 683 | # For HTTP backends, use protocol |
| 684 | # to specify the protocol version. |
| 685 | "minDeadline": 3.14, # Minimum deadline in seconds needed for this method. Calls having deadline |
| 686 | # value lower than this will be rejected. |
| 687 | "selector": "A String", # Selects the methods to which this rule applies. |
| 688 | # |
| 689 | # Refer to selector for syntax details. |
| 690 | "protocol": "A String", # The protocol used for sending a request to the backend. |
| 691 | # The supported values are "http/1.1" and "h2". |
| 692 | # |
| 693 | # The default value is inferred from the scheme in the |
| 694 | # address field: |
| 695 | # |
| 696 | # SCHEME PROTOCOL |
| 697 | # http:// http/1.1 |
| 698 | # https:// http/1.1 |
| 699 | # grpc:// h2 |
| 700 | # grpcs:// h2 |
| 701 | # |
| 702 | # For secure HTTP backends (https://) that support HTTP/2, set this field |
| 703 | # to "h2" for improved performance. |
| 704 | # |
| 705 | # Configuring this field to non-default values is only supported for secure |
| 706 | # HTTP backends. This field will be ignored for all other backends. |
| 707 | # |
| 708 | # See |
| 709 | # https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids |
| 710 | # for more details on the supported values. |
| 711 | "operationDeadline": 3.14, # The number of seconds to wait for the completion of a long running |
| 712 | # operation. The default is no deadline. |
| 713 | "pathTranslation": "A String", |
| 714 | "jwtAudience": "A String", # The JWT audience is used when generating a JWT ID token for the backend. |
| 715 | # This ID token will be added in the HTTP "authorization" header, and sent |
| 716 | # to the backend. |
| 717 | "deadline": 3.14, # The number of seconds to wait for a response from a request. The default |
| 718 | # varies based on the request protocol and deployment environment. |
| 719 | }, |
| 720 | ], |
| 721 | }, |
| 722 | "systemTypes": [ # A list of all proto message types included in this API service. |
| 723 | # It serves similar purpose as [google.api.Service.types], except that |
| 724 | # these types are not needed by user-defined APIs. Therefore, they will not |
| 725 | # show up in the generated discovery doc. This field should only be used |
| 726 | # to define system APIs in ESF. |
| 727 | { # A protocol buffer message type. |
| 728 | "sourceContext": { # `SourceContext` represents information about the source of a # The source context. |
| 729 | # protobuf element, like the file in which it is defined. |
| 730 | "fileName": "A String", # The path-qualified name of the .proto file that contained the associated |
| 731 | # protobuf element. For example: `"google/protobuf/source_context.proto"`. |
| 732 | }, |
| 733 | "oneofs": [ # The list of types appearing in `oneof` definitions in this type. |
| 734 | "A String", |
| 735 | ], |
| 736 | "fields": [ # The list of fields. |
| 737 | { # A single field of a message type. |
| 738 | "oneofIndex": 42, # The index of the field type in `Type.oneofs`, for message or enumeration |
| 739 | # types. The first type has index 1; zero means the type is not in the list. |
| 740 | "name": "A String", # The field name. |
| 741 | "defaultValue": "A String", # The string value of the default value of this field. Proto2 syntax only. |
| 742 | "packed": True or False, # Whether to use alternative packed wire representation. |
| 743 | "typeUrl": "A String", # The field type URL, without the scheme, for message or enumeration |
| 744 | # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
| 745 | "cardinality": "A String", # The field cardinality. |
| 746 | "jsonName": "A String", # The field JSON name. |
| 747 | "kind": "A String", # The field type. |
| 748 | "options": [ # The protocol buffer options. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 749 | { # A protocol buffer option, which can be attached to a message, field, |
| 750 | # enumeration, etc. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 751 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 752 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 753 | # should be used. If the value is an enum, it should be stored as an int32 |
| 754 | # value using the google.protobuf.Int32Value type. |
| 755 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 756 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 757 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 758 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 759 | # For custom options, it should be the fully-qualified name. For example, |
| 760 | # `"google.api.http"`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 761 | }, |
| 762 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 763 | "number": 42, # The field number. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 764 | }, |
| 765 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 766 | "options": [ # The protocol buffer options. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 767 | { # A protocol buffer option, which can be attached to a message, field, |
| 768 | # enumeration, etc. |
| 769 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 770 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 771 | # should be used. If the value is an enum, it should be stored as an int32 |
| 772 | # value using the google.protobuf.Int32Value type. |
| 773 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 774 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 775 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 776 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 777 | # For custom options, it should be the fully-qualified name. For example, |
| 778 | # `"google.api.http"`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 779 | }, |
| 780 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 781 | "syntax": "A String", # The source syntax. |
| 782 | "name": "A String", # The fully qualified message name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 783 | }, |
| 784 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 785 | "name": "A String", # The service name, which is a DNS-like logical identifier for the |
| 786 | # service, such as `calendar.googleapis.com`. The service name |
| 787 | # typically goes through DNS verification to make sure the owner |
| 788 | # of the service also owns the DNS name. |
| 789 | "sourceInfo": { # Source information used to create a Service Config # Output only. The source information for this configuration if available. |
| 790 | "sourceFiles": [ # All files used during config generation. |
| 791 | { |
| 792 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 793 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 794 | ], |
| 795 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 796 | "billing": { # Billing related configuration of the service. # Billing configuration. |
| 797 | # |
| 798 | # The following example shows how to configure monitored resources and metrics |
| 799 | # for billing, `consumer_destinations` is the only supported destination and |
| 800 | # the monitored resources need at least one label key |
| 801 | # `cloud.googleapis.com/location` to indicate the location of the billing |
| 802 | # usage, using different monitored resources between monitoring and billing is |
| 803 | # recommended so they can be evolved independently: |
| 804 | # |
| 805 | # |
| 806 | # monitored_resources: |
| 807 | # - type: library.googleapis.com/billing_branch |
| 808 | # labels: |
| 809 | # - key: cloud.googleapis.com/location |
| 810 | # description: | |
| 811 | # Predefined label to support billing location restriction. |
| 812 | # - key: city |
| 813 | # description: | |
| 814 | # Custom label to define the city where the library branch is located |
| 815 | # in. |
| 816 | # - key: name |
| 817 | # description: Custom label to define the name of the library branch. |
| 818 | # metrics: |
| 819 | # - name: library.googleapis.com/book/borrowed_count |
| 820 | # metric_kind: DELTA |
| 821 | # value_type: INT64 |
| 822 | # unit: "1" |
| 823 | # billing: |
| 824 | # consumer_destinations: |
| 825 | # - monitored_resource: library.googleapis.com/billing_branch |
| 826 | # metrics: |
| 827 | # - library.googleapis.com/book/borrowed_count |
| 828 | "consumerDestinations": [ # Billing configurations for sending metrics to the consumer project. |
| 829 | # There can be multiple consumer destinations per service, each one must have |
| 830 | # a different monitored resource type. A metric can be used in at most |
| 831 | # one consumer destination. |
| 832 | { # Configuration of a specific billing destination (Currently only support |
| 833 | # bill against consumer project). |
| 834 | "metrics": [ # Names of the metrics to report to this billing destination. |
| 835 | # Each name must be defined in Service.metrics section. |
| 836 | "A String", |
| 837 | ], |
| 838 | "monitoredResource": "A String", # The monitored resource type. The type must be defined in |
| 839 | # Service.monitored_resources section. |
| 840 | }, |
| 841 | ], |
| 842 | }, |
| 843 | "monitoring": { # Monitoring configuration of the service. # Monitoring configuration. |
| 844 | # |
| 845 | # The example below shows how to configure monitored resources and metrics |
| 846 | # for monitoring. In the example, a monitored resource and two metrics are |
| 847 | # defined. The `library.googleapis.com/book/returned_count` metric is sent |
| 848 | # to both producer and consumer projects, whereas the |
| 849 | # `library.googleapis.com/book/num_overdue` metric is only sent to the |
| 850 | # consumer project. |
| 851 | # |
| 852 | # monitored_resources: |
| 853 | # - type: library.googleapis.com/Branch |
| 854 | # display_name: "Library Branch" |
| 855 | # description: "A branch of a library." |
| 856 | # launch_stage: GA |
| 857 | # labels: |
| 858 | # - key: resource_container |
| 859 | # description: "The Cloud container (ie. project id) for the Branch." |
| 860 | # - key: location |
| 861 | # description: "The location of the library branch." |
| 862 | # - key: branch_id |
| 863 | # description: "The id of the branch." |
| 864 | # metrics: |
| 865 | # - name: library.googleapis.com/book/returned_count |
| 866 | # display_name: "Books Returned" |
| 867 | # description: "The count of books that have been returned." |
| 868 | # launch_stage: GA |
| 869 | # metric_kind: DELTA |
| 870 | # value_type: INT64 |
| 871 | # unit: "1" |
| 872 | # labels: |
| 873 | # - key: customer_id |
| 874 | # description: "The id of the customer." |
| 875 | # - name: library.googleapis.com/book/num_overdue |
| 876 | # display_name: "Books Overdue" |
| 877 | # description: "The current number of overdue books." |
| 878 | # launch_stage: GA |
| 879 | # metric_kind: GAUGE |
| 880 | # value_type: INT64 |
| 881 | # unit: "1" |
| 882 | # labels: |
| 883 | # - key: customer_id |
| 884 | # description: "The id of the customer." |
| 885 | # monitoring: |
| 886 | # producer_destinations: |
| 887 | # - monitored_resource: library.googleapis.com/Branch |
| 888 | # metrics: |
| 889 | # - library.googleapis.com/book/returned_count |
| 890 | # consumer_destinations: |
| 891 | # - monitored_resource: library.googleapis.com/Branch |
| 892 | # metrics: |
| 893 | # - library.googleapis.com/book/returned_count |
| 894 | # - library.googleapis.com/book/num_overdue |
| 895 | "producerDestinations": [ # Monitoring configurations for sending metrics to the producer project. |
| 896 | # There can be multiple producer destinations. A monitored resource type may |
| 897 | # appear in multiple monitoring destinations if different aggregations are |
| 898 | # needed for different sets of metrics associated with that monitored |
| 899 | # resource type. A monitored resource and metric pair may only be used once |
| 900 | # in the Monitoring configuration. |
| 901 | { # Configuration of a specific monitoring destination (the producer project |
| 902 | # or the consumer project). |
| 903 | "monitoredResource": "A String", # The monitored resource type. The type must be defined in |
| 904 | # Service.monitored_resources section. |
| 905 | "metrics": [ # Types of the metrics to report to this monitoring destination. |
| 906 | # Each type must be defined in Service.metrics section. |
| 907 | "A String", |
| 908 | ], |
| 909 | }, |
| 910 | ], |
| 911 | "consumerDestinations": [ # Monitoring configurations for sending metrics to the consumer project. |
| 912 | # There can be multiple consumer destinations. A monitored resource type may |
| 913 | # appear in multiple monitoring destinations if different aggregations are |
| 914 | # needed for different sets of metrics associated with that monitored |
| 915 | # resource type. A monitored resource and metric pair may only be used once |
| 916 | # in the Monitoring configuration. |
| 917 | { # Configuration of a specific monitoring destination (the producer project |
| 918 | # or the consumer project). |
| 919 | "monitoredResource": "A String", # The monitored resource type. The type must be defined in |
| 920 | # Service.monitored_resources section. |
| 921 | "metrics": [ # Types of the metrics to report to this monitoring destination. |
| 922 | # Each type must be defined in Service.metrics section. |
| 923 | "A String", |
| 924 | ], |
| 925 | }, |
| 926 | ], |
| 927 | }, |
| 928 | "logging": { # Logging configuration of the service. # Logging configuration. |
| 929 | # |
| 930 | # The following example shows how to configure logs to be sent to the |
| 931 | # producer and consumer projects. In the example, the `activity_history` |
| 932 | # log is sent to both the producer and consumer projects, whereas the |
| 933 | # `purchase_history` log is only sent to the producer project. |
| 934 | # |
| 935 | # monitored_resources: |
| 936 | # - type: library.googleapis.com/branch |
| 937 | # labels: |
| 938 | # - key: /city |
| 939 | # description: The city where the library branch is located in. |
| 940 | # - key: /name |
| 941 | # description: The name of the branch. |
| 942 | # logs: |
| 943 | # - name: activity_history |
| 944 | # labels: |
| 945 | # - key: /customer_id |
| 946 | # - name: purchase_history |
| 947 | # logging: |
| 948 | # producer_destinations: |
| 949 | # - monitored_resource: library.googleapis.com/branch |
| 950 | # logs: |
| 951 | # - activity_history |
| 952 | # - purchase_history |
| 953 | # consumer_destinations: |
| 954 | # - monitored_resource: library.googleapis.com/branch |
| 955 | # logs: |
| 956 | # - activity_history |
| 957 | "producerDestinations": [ # Logging configurations for sending logs to the producer project. |
| 958 | # There can be multiple producer destinations, each one must have a |
| 959 | # different monitored resource type. A log can be used in at most |
| 960 | # one producer destination. |
| 961 | { # Configuration of a specific logging destination (the producer project |
| 962 | # or the consumer project). |
| 963 | "monitoredResource": "A String", # The monitored resource type. The type must be defined in the |
| 964 | # Service.monitored_resources section. |
| 965 | "logs": [ # Names of the logs to be sent to this destination. Each name must |
| 966 | # be defined in the Service.logs section. If the log name is |
| 967 | # not a domain scoped name, it will be automatically prefixed with |
| 968 | # the service name followed by "/". |
| 969 | "A String", |
| 970 | ], |
| 971 | }, |
| 972 | ], |
| 973 | "consumerDestinations": [ # Logging configurations for sending logs to the consumer project. |
| 974 | # There can be multiple consumer destinations, each one must have a |
| 975 | # different monitored resource type. A log can be used in at most |
| 976 | # one consumer destination. |
| 977 | { # Configuration of a specific logging destination (the producer project |
| 978 | # or the consumer project). |
| 979 | "monitoredResource": "A String", # The monitored resource type. The type must be defined in the |
| 980 | # Service.monitored_resources section. |
| 981 | "logs": [ # Names of the logs to be sent to this destination. Each name must |
| 982 | # be defined in the Service.logs section. If the log name is |
| 983 | # not a domain scoped name, it will be automatically prefixed with |
| 984 | # the service name followed by "/". |
| 985 | "A String", |
| 986 | ], |
| 987 | }, |
| 988 | ], |
| 989 | }, |
| 990 | "control": { # Selects and configures the service controller used by the service. The # Configuration for the service control plane. |
| 991 | # service controller handles features like abuse, quota, billing, logging, |
| 992 | # monitoring, etc. |
| 993 | "environment": "A String", # The service control environment to use. If empty, no control plane |
| 994 | # feature (like quota and billing) will be enabled. |
| 995 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 996 | "usage": { # Configuration controlling usage of a service. # Configuration controlling usage of this service. |
| 997 | "requirements": [ # Requirements that must be satisfied before a consumer project can use the |
| 998 | # service. Each requirement is of the form <service.name>/<requirement-id>; |
| 999 | # for example 'serviceusage.googleapis.com/billing-enabled'. |
| 1000 | "A String", |
| 1001 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1002 | "serviceIdentity": { # The per-product per-project service identity for a service. # The configuration of a per-product per-project service identity. |
| 1003 | # |
| 1004 | # |
| 1005 | # Use this field to configure per-product per-project service identity. |
| 1006 | # Example of a service identity configuration. |
| 1007 | # |
| 1008 | # usage: |
| 1009 | # service_identity: |
| 1010 | # - service_account_parent: "projects/123456789" |
| 1011 | # display_name: "Cloud XXX Service Agent" |
| 1012 | # description: "Used as the identity of Cloud XXX to access resources" |
| 1013 | "serviceAccountParent": "A String", # A service account project that hosts the service accounts. |
| 1014 | # |
| 1015 | # An example name would be: |
| 1016 | # `projects/123456789` |
| 1017 | "description": "A String", # Optional. A user-specified opaque description of the service account. |
| 1018 | # Must be less than or equal to 256 UTF-8 bytes. |
| 1019 | "displayName": "A String", # Optional. A user-specified name for the service account. |
| 1020 | # Must be less than or equal to 100 UTF-8 bytes. |
| 1021 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1022 | "rules": [ # A list of usage rules that apply to individual API methods. |
| 1023 | # |
| 1024 | # **NOTE:** All service configuration rules follow "last one wins" order. |
| 1025 | { # Usage configuration rules for the service. |
| 1026 | # |
| 1027 | # NOTE: Under development. |
| 1028 | # |
| 1029 | # |
| 1030 | # Use this rule to configure unregistered calls for the service. Unregistered |
| 1031 | # calls are calls that do not contain consumer project identity. |
| 1032 | # (Example: calls that do not contain an API key). |
| 1033 | # By default, API methods do not allow unregistered calls, and each method call |
| 1034 | # must be identified by a consumer project identity. Use this rule to |
| 1035 | # allow/disallow unregistered calls. |
| 1036 | # |
| 1037 | # Example of an API that wants to allow unregistered calls for entire service. |
| 1038 | # |
| 1039 | # usage: |
| 1040 | # rules: |
| 1041 | # - selector: "*" |
| 1042 | # allow_unregistered_calls: true |
| 1043 | # |
| 1044 | # Example of a method that wants to allow unregistered calls. |
| 1045 | # |
| 1046 | # usage: |
| 1047 | # rules: |
| 1048 | # - selector: "google.example.library.v1.LibraryService.CreateBook" |
| 1049 | # allow_unregistered_calls: true |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1050 | "skipServiceControl": True or False, # If true, the selected method should skip service control and the control |
| 1051 | # plane features, such as quota and billing, will not be available. |
| 1052 | # This flag is used by Google Cloud Endpoints to bypass checks for internal |
| 1053 | # methods, such as service health check methods. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1054 | "selector": "A String", # Selects the methods to which this rule applies. Use '*' to indicate all |
| 1055 | # methods in all APIs. |
| 1056 | # |
| 1057 | # Refer to selector for syntax details. |
| 1058 | "allowUnregisteredCalls": True or False, # If true, the selected method allows unregistered calls, e.g. calls |
| 1059 | # that don't identify any user or application. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1060 | }, |
| 1061 | ], |
| 1062 | "producerNotificationChannel": "A String", # The full resource name of a channel used for sending notifications to the |
| 1063 | # service producer. |
| 1064 | # |
| 1065 | # Google Service Management currently only supports |
| 1066 | # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
| 1067 | # channel. To use Google Cloud Pub/Sub as the channel, this must be the name |
| 1068 | # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
| 1069 | # documented in https://cloud.google.com/pubsub/docs/overview. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1070 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1071 | "types": [ # A list of all proto message types included in this API service. |
| 1072 | # Types referenced directly or indirectly by the `apis` are |
| 1073 | # automatically included. Messages which are not referenced but |
| 1074 | # shall be included, such as types used by the `google.protobuf.Any` type, |
| 1075 | # should be listed here by name. Example: |
| 1076 | # |
| 1077 | # types: |
| 1078 | # - name: google.protobuf.Int32 |
| 1079 | { # A protocol buffer message type. |
| 1080 | "sourceContext": { # `SourceContext` represents information about the source of a # The source context. |
| 1081 | # protobuf element, like the file in which it is defined. |
| 1082 | "fileName": "A String", # The path-qualified name of the .proto file that contained the associated |
| 1083 | # protobuf element. For example: `"google/protobuf/source_context.proto"`. |
| 1084 | }, |
| 1085 | "oneofs": [ # The list of types appearing in `oneof` definitions in this type. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1086 | "A String", |
| 1087 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1088 | "fields": [ # The list of fields. |
| 1089 | { # A single field of a message type. |
| 1090 | "oneofIndex": 42, # The index of the field type in `Type.oneofs`, for message or enumeration |
| 1091 | # types. The first type has index 1; zero means the type is not in the list. |
| 1092 | "name": "A String", # The field name. |
| 1093 | "defaultValue": "A String", # The string value of the default value of this field. Proto2 syntax only. |
| 1094 | "packed": True or False, # Whether to use alternative packed wire representation. |
| 1095 | "typeUrl": "A String", # The field type URL, without the scheme, for message or enumeration |
| 1096 | # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
| 1097 | "cardinality": "A String", # The field cardinality. |
| 1098 | "jsonName": "A String", # The field JSON name. |
| 1099 | "kind": "A String", # The field type. |
| 1100 | "options": [ # The protocol buffer options. |
| 1101 | { # A protocol buffer option, which can be attached to a message, field, |
| 1102 | # enumeration, etc. |
| 1103 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 1104 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 1105 | # should be used. If the value is an enum, it should be stored as an int32 |
| 1106 | # value using the google.protobuf.Int32Value type. |
| 1107 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1108 | }, |
| 1109 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 1110 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 1111 | # For custom options, it should be the fully-qualified name. For example, |
| 1112 | # `"google.api.http"`. |
| 1113 | }, |
| 1114 | ], |
| 1115 | "number": 42, # The field number. |
| 1116 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1117 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1118 | "options": [ # The protocol buffer options. |
| 1119 | { # A protocol buffer option, which can be attached to a message, field, |
| 1120 | # enumeration, etc. |
| 1121 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 1122 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 1123 | # should be used. If the value is an enum, it should be stored as an int32 |
| 1124 | # value using the google.protobuf.Int32Value type. |
| 1125 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1126 | }, |
| 1127 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 1128 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 1129 | # For custom options, it should be the fully-qualified name. For example, |
| 1130 | # `"google.api.http"`. |
| 1131 | }, |
| 1132 | ], |
| 1133 | "syntax": "A String", # The source syntax. |
| 1134 | "name": "A String", # The fully qualified message name. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1135 | }, |
| 1136 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1137 | "http": { # Defines the HTTP configuration for an API service. It contains a list of # HTTP configuration. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1138 | # HttpRule, each specifying the mapping of an RPC method |
| 1139 | # to one or more HTTP REST API methods. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1140 | "fullyDecodeReservedExpansion": True or False, # When set to true, URL path parameters will be fully URI-decoded except in |
| 1141 | # cases of single segment matches in reserved expansion, where "%2F" will be |
| 1142 | # left encoded. |
| 1143 | # |
| 1144 | # The default behavior is to not decode RFC 6570 reserved characters in multi |
| 1145 | # segment matches. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1146 | "rules": [ # A list of HTTP configuration rules that apply to individual API methods. |
| 1147 | # |
| 1148 | # **NOTE:** All service configuration rules follow "last one wins" order. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1149 | { # # gRPC Transcoding |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1150 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1151 | # gRPC Transcoding is a feature for mapping between a gRPC method and one or |
| 1152 | # more HTTP REST endpoints. It allows developers to build a single API service |
| 1153 | # that supports both gRPC APIs and REST APIs. Many systems, including [Google |
| 1154 | # APIs](https://github.com/googleapis/googleapis), |
| 1155 | # [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC |
| 1156 | # Gateway](https://github.com/grpc-ecosystem/grpc-gateway), |
| 1157 | # and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature |
| 1158 | # and use it for large scale production services. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1159 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1160 | # `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies |
| 1161 | # how different portions of the gRPC request message are mapped to the URL |
| 1162 | # path, URL query parameters, and HTTP request body. It also controls how the |
| 1163 | # gRPC response message is mapped to the HTTP response body. `HttpRule` is |
| 1164 | # typically specified as an `google.api.http` annotation on the gRPC method. |
| 1165 | # |
| 1166 | # Each mapping specifies a URL path template and an HTTP method. The path |
| 1167 | # template may refer to one or more fields in the gRPC request message, as long |
| 1168 | # as each field is a non-repeated field with a primitive (non-message) type. |
| 1169 | # The path template controls how fields of the request message are mapped to |
| 1170 | # the URL path. |
| 1171 | # |
| 1172 | # Example: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1173 | # |
| 1174 | # service Messaging { |
| 1175 | # rpc GetMessage(GetMessageRequest) returns (Message) { |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1176 | # option (google.api.http) = { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1177 | # get: "/v1/{name=messages/*}" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1178 | # }; |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1179 | # } |
| 1180 | # } |
| 1181 | # message GetMessageRequest { |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1182 | # string name = 1; // Mapped to URL path. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1183 | # } |
| 1184 | # message Message { |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1185 | # string text = 1; // The resource content. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1186 | # } |
| 1187 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1188 | # This enables an HTTP REST to gRPC mapping as below: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1189 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1190 | # HTTP | gRPC |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1191 | # -----|----- |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1192 | # `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1193 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1194 | # Any fields in the request message which are not bound by the path template |
| 1195 | # automatically become HTTP query parameters if there is no HTTP request body. |
| 1196 | # For example: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1197 | # |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1198 | # service Messaging { |
| 1199 | # rpc GetMessage(GetMessageRequest) returns (Message) { |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1200 | # option (google.api.http) = { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1201 | # get:"/v1/messages/{message_id}" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1202 | # }; |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 1203 | # } |
| 1204 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1205 | # message GetMessageRequest { |
| 1206 | # message SubMessage { |
| 1207 | # string subfield = 1; |
| 1208 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1209 | # string message_id = 1; // Mapped to URL path. |
| 1210 | # int64 revision = 2; // Mapped to URL query parameter `revision`. |
| 1211 | # SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1212 | # } |
| 1213 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1214 | # This enables a HTTP JSON to RPC mapping as below: |
| 1215 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1216 | # HTTP | gRPC |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1217 | # -----|----- |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1218 | # `GET /v1/messages/123456?revision=2&sub.subfield=foo` | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1219 | # `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: |
| 1220 | # "foo"))` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1221 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1222 | # Note that fields which are mapped to URL query parameters must have a |
| 1223 | # primitive type or a repeated primitive type or a non-repeated message type. |
| 1224 | # In the case of a repeated type, the parameter can be repeated in the URL |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1225 | # as `...?param=A&param=B`. In the case of a message type, each field of the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1226 | # message is mapped to a separate parameter, such as |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1227 | # `...?foo.a=A&foo.b=B&foo.c=C`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1228 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1229 | # For HTTP methods that allow a request body, the `body` field |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1230 | # specifies the mapping. Consider a REST update method on the |
| 1231 | # message resource collection: |
| 1232 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1233 | # service Messaging { |
| 1234 | # rpc UpdateMessage(UpdateMessageRequest) returns (Message) { |
| 1235 | # option (google.api.http) = { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1236 | # patch: "/v1/messages/{message_id}" |
| 1237 | # body: "message" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1238 | # }; |
| 1239 | # } |
| 1240 | # } |
| 1241 | # message UpdateMessageRequest { |
| 1242 | # string message_id = 1; // mapped to the URL |
| 1243 | # Message message = 2; // mapped to the body |
| 1244 | # } |
| 1245 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1246 | # The following HTTP JSON to RPC mapping is enabled, where the |
| 1247 | # representation of the JSON in the request body is determined by |
| 1248 | # protos JSON encoding: |
| 1249 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1250 | # HTTP | gRPC |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1251 | # -----|----- |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1252 | # `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: |
| 1253 | # "123456" message { text: "Hi!" })` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1254 | # |
| 1255 | # The special name `*` can be used in the body mapping to define that |
| 1256 | # every field not bound by the path template should be mapped to the |
| 1257 | # request body. This enables the following alternative definition of |
| 1258 | # the update method: |
| 1259 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1260 | # service Messaging { |
| 1261 | # rpc UpdateMessage(Message) returns (Message) { |
| 1262 | # option (google.api.http) = { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1263 | # patch: "/v1/messages/{message_id}" |
| 1264 | # body: "*" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1265 | # }; |
| 1266 | # } |
| 1267 | # } |
| 1268 | # message Message { |
| 1269 | # string message_id = 1; |
| 1270 | # string text = 2; |
| 1271 | # } |
| 1272 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1273 | # |
| 1274 | # The following HTTP JSON to RPC mapping is enabled: |
| 1275 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1276 | # HTTP | gRPC |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1277 | # -----|----- |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1278 | # `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: |
| 1279 | # "123456" text: "Hi!")` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1280 | # |
| 1281 | # Note that when using `*` in the body mapping, it is not possible to |
| 1282 | # have HTTP parameters, as all fields not bound by the path end in |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1283 | # the body. This makes this option more rarely used in practice when |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1284 | # defining REST APIs. The common usage of `*` is in custom methods |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1285 | # which don't use the URL at all for transferring data. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1286 | # |
| 1287 | # It is possible to define multiple HTTP methods for one RPC by using |
| 1288 | # the `additional_bindings` option. Example: |
| 1289 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1290 | # service Messaging { |
| 1291 | # rpc GetMessage(GetMessageRequest) returns (Message) { |
| 1292 | # option (google.api.http) = { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1293 | # get: "/v1/messages/{message_id}" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1294 | # additional_bindings { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1295 | # get: "/v1/users/{user_id}/messages/{message_id}" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1296 | # } |
| 1297 | # }; |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1298 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1299 | # } |
| 1300 | # message GetMessageRequest { |
| 1301 | # string message_id = 1; |
| 1302 | # string user_id = 2; |
| 1303 | # } |
| 1304 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1305 | # This enables the following two alternative HTTP JSON to RPC mappings: |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1306 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1307 | # HTTP | gRPC |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1308 | # -----|----- |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1309 | # `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` |
| 1310 | # `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: |
| 1311 | # "123456")` |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1312 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1313 | # ## Rules for HTTP mapping |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1314 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1315 | # 1. Leaf request fields (recursive expansion nested messages in the request |
| 1316 | # message) are classified into three categories: |
| 1317 | # - Fields referred by the path template. They are passed via the URL path. |
| 1318 | # - Fields referred by the HttpRule.body. They are passed via the HTTP |
| 1319 | # request body. |
| 1320 | # - All other fields are passed via the URL query parameters, and the |
| 1321 | # parameter name is the field path in the request message. A repeated |
| 1322 | # field can be represented as multiple query parameters under the same |
| 1323 | # name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1324 | # 2. If HttpRule.body is "*", there is no URL query parameter, all fields |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1325 | # are passed via URL path and HTTP request body. |
| 1326 | # 3. If HttpRule.body is omitted, there is no HTTP request body, all |
| 1327 | # fields are passed via URL path and URL query parameters. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1328 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1329 | # ### Path template syntax |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1330 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1331 | # Template = "/" Segments [ Verb ] ; |
| 1332 | # Segments = Segment { "/" Segment } ; |
| 1333 | # Segment = "*" | "**" | LITERAL | Variable ; |
| 1334 | # Variable = "{" FieldPath [ "=" Segments ] "}" ; |
| 1335 | # FieldPath = IDENT { "." IDENT } ; |
| 1336 | # Verb = ":" LITERAL ; |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1337 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1338 | # The syntax `*` matches a single URL path segment. The syntax `**` matches |
| 1339 | # zero or more URL path segments, which must be the last part of the URL path |
| 1340 | # except the `Verb`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1341 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1342 | # The syntax `Variable` matches part of the URL path as specified by its |
| 1343 | # template. A variable template must not contain other variables. If a variable |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1344 | # matches a single path segment, its template may be omitted, e.g. `{var}` |
| 1345 | # is equivalent to `{var=*}`. |
| 1346 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1347 | # The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` |
| 1348 | # contains any reserved character, such characters should be percent-encoded |
| 1349 | # before the matching. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1350 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1351 | # If a variable contains exactly one path segment, such as `"{var}"` or |
| 1352 | # `"{var=*}"`, when such a variable is expanded into a URL path on the client |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1353 | # side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The |
| 1354 | # server side does the reverse decoding. Such variables show up in the |
| 1355 | # [Discovery |
| 1356 | # Document](https://developers.google.com/discovery/v1/reference/apis) as |
| 1357 | # `{var}`. |
| 1358 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1359 | # If a variable contains multiple path segments, such as `"{var=foo/*}"` |
| 1360 | # or `"{var=**}"`, when such a variable is expanded into a URL path on the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1361 | # client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1362 | # The server side does the reverse decoding, except "%2F" and "%2f" are left |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1363 | # unchanged. Such variables show up in the |
| 1364 | # [Discovery |
| 1365 | # Document](https://developers.google.com/discovery/v1/reference/apis) as |
| 1366 | # `{+var}`. |
| 1367 | # |
| 1368 | # ## Using gRPC API Service Configuration |
| 1369 | # |
| 1370 | # gRPC API Service Configuration (service config) is a configuration language |
| 1371 | # for configuring a gRPC service to become a user-facing product. The |
| 1372 | # service config is simply the YAML representation of the `google.api.Service` |
| 1373 | # proto message. |
| 1374 | # |
| 1375 | # As an alternative to annotating your proto file, you can configure gRPC |
| 1376 | # transcoding in your service config YAML files. You do this by specifying a |
| 1377 | # `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same |
| 1378 | # effect as the proto annotation. This can be particularly useful if you |
| 1379 | # have a proto that is reused in multiple services. Note that any transcoding |
| 1380 | # specified in the service config will override any matching transcoding |
| 1381 | # configuration in the proto. |
| 1382 | # |
| 1383 | # Example: |
| 1384 | # |
| 1385 | # http: |
| 1386 | # rules: |
| 1387 | # # Selects a gRPC method and applies HttpRule to it. |
| 1388 | # - selector: example.v1.Messaging.GetMessage |
| 1389 | # get: /v1/messages/{message_id}/{sub.subfield} |
| 1390 | # |
| 1391 | # ## Special notes |
| 1392 | # |
| 1393 | # When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the |
| 1394 | # proto to JSON conversion must follow the [proto3 |
| 1395 | # specification](https://developers.google.com/protocol-buffers/docs/proto3#json). |
| 1396 | # |
| 1397 | # While the single segment variable follows the semantics of |
| 1398 | # [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String |
| 1399 | # Expansion, the multi segment variable **does not** follow RFC 6570 Section |
| 1400 | # 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion |
| 1401 | # does not expand special characters like `?` and `#`, which would lead |
| 1402 | # to invalid URLs. As the result, gRPC Transcoding uses a custom encoding |
| 1403 | # for multi segment variables. |
| 1404 | # |
| 1405 | # The path variables **must not** refer to any repeated or mapped field, |
| 1406 | # because client libraries are not capable of handling such variable expansion. |
| 1407 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1408 | # The path variables **must not** capture the leading "/" character. The reason |
| 1409 | # is that the most common use case "{var}" does not capture the leading "/" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1410 | # character. For consistency, all path variables must share the same behavior. |
| 1411 | # |
| 1412 | # Repeated message fields must not be mapped to URL query parameters, because |
| 1413 | # no client library can support such complicated mapping. |
| 1414 | # |
| 1415 | # If an API needs to use a JSON array for request or response body, it can map |
| 1416 | # the request or response body to a repeated field. However, some gRPC |
| 1417 | # Transcoding implementations may not support this feature. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1418 | "put": "A String", # Maps to HTTP PUT. Used for replacing a resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1419 | "selector": "A String", # Selects a method to which this rule applies. |
| 1420 | # |
| 1421 | # Refer to selector for syntax details. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1422 | "post": "A String", # Maps to HTTP POST. Used for creating a resource or performing an action. |
| 1423 | "responseBody": "A String", # Optional. The name of the response field whose value is mapped to the HTTP |
| 1424 | # response body. When omitted, the entire response message will be used |
| 1425 | # as the HTTP response body. |
| 1426 | # |
| 1427 | # NOTE: The referred field must be present at the top-level of the response |
| 1428 | # message type. |
| 1429 | "body": "A String", # The name of the request field whose value is mapped to the HTTP request |
| 1430 | # body, or `*` for mapping all request fields not captured by the path |
| 1431 | # pattern to the HTTP body, or omitted for not having any HTTP request body. |
| 1432 | # |
| 1433 | # NOTE: the referred field must be present at the top-level of the request |
| 1434 | # message type. |
| 1435 | "patch": "A String", # Maps to HTTP PATCH. Used for updating a resource. |
| 1436 | "additionalBindings": [ # Additional HTTP bindings for the selector. Nested bindings must |
| 1437 | # not contain an `additional_bindings` field themselves (that is, |
| 1438 | # the nesting may only be one level deep). |
| 1439 | # Object with schema name: HttpRule |
| 1440 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1441 | "custom": { # A custom pattern is used for defining custom HTTP verb. # The custom pattern is used for specifying an HTTP method that is not |
| 1442 | # included in the `pattern` field, such as HEAD, or "*" to leave the |
| 1443 | # HTTP method unspecified for this rule. The wild-card rule is useful |
| 1444 | # for services that provide content to Web (HTML) clients. |
| 1445 | "path": "A String", # The path matched by this custom verb. |
| 1446 | "kind": "A String", # The name of this custom HTTP verb. |
| 1447 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1448 | "allowHalfDuplex": True or False, # When this flag is set to true, HTTP requests will be allowed to invoke a |
| 1449 | # half-duplex streaming method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1450 | "delete": "A String", # Maps to HTTP DELETE. Used for deleting a resource. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1451 | "get": "A String", # Maps to HTTP GET. Used for listing and getting information about |
| 1452 | # resources. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1453 | }, |
| 1454 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1455 | }, |
| 1456 | "logs": [ # Defines the logs used by this service. |
| 1457 | { # A description of a log type. Example in YAML format: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1458 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1459 | # - name: library.googleapis.com/activity_history |
| 1460 | # description: The history of borrowing and returning library items. |
| 1461 | # display_name: Activity |
| 1462 | # labels: |
| 1463 | # - key: /customer_id |
| 1464 | # description: Identifier of a library customer |
| 1465 | "description": "A String", # A human-readable description of this log. This information appears in |
| 1466 | # the documentation and can contain details. |
| 1467 | "labels": [ # The set of labels that are available to describe a specific log entry. |
| 1468 | # Runtime requests that contain labels not specified here are |
| 1469 | # considered invalid. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1470 | { # A description of a label. |
| 1471 | "valueType": "A String", # The type of data that can be assigned to the label. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1472 | "description": "A String", # A human-readable description for the label. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1473 | "key": "A String", # The label key. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1474 | }, |
| 1475 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1476 | "displayName": "A String", # The human-readable name for this log. This information appears on |
| 1477 | # the user interface and should be concise. |
| 1478 | "name": "A String", # The name of the log. It must be less than 512 characters long and can |
| 1479 | # include the following characters: upper- and lower-case alphanumeric |
| 1480 | # characters [A-Za-z0-9], and punctuation characters including |
| 1481 | # slash, underscore, hyphen, period [/_-.]. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1482 | }, |
| 1483 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1484 | "metrics": [ # Defines the metrics used by this service. |
| 1485 | { # Defines a metric type and its schema. Once a metric descriptor is created, |
| 1486 | # deleting or altering it stops data collection and makes the metric type's |
| 1487 | # existing data unusable. |
| 1488 | # |
| 1489 | # The following are specific rules for service defined Monitoring metric |
| 1490 | # descriptors: |
| 1491 | # |
| 1492 | # * `type`, `metric_kind`, `value_type`, `description`, and `display_name` |
| 1493 | # fields are all required. The `unit` field must be specified |
| 1494 | # if the `value_type` is any of DOUBLE, INT64, DISTRIBUTION. |
| 1495 | # * Maximum of default 500 metric descriptors per service is allowed. |
| 1496 | # * Maximum of default 10 labels per metric descriptor is allowed. |
| 1497 | # |
| 1498 | # The default maximum limit can be overridden. Please follow |
| 1499 | # https://cloud.google.com/monitoring/quotas |
| 1500 | "unit": "A String", # The units in which the metric value is reported. It is only applicable |
| 1501 | # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` |
| 1502 | # defines the representation of the stored metric values. |
| 1503 | # |
| 1504 | # Different systems may scale the values to be more easily displayed (so a |
| 1505 | # value of `0.02KBy` _might_ be displayed as `20By`, and a value of |
| 1506 | # `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is |
| 1507 | # `KBy`, then the value of the metric is always in thousands of bytes, no |
| 1508 | # matter how it may be displayed.. |
| 1509 | # |
| 1510 | # If you want a custom metric to record the exact number of CPU-seconds used |
| 1511 | # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is |
| 1512 | # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 |
| 1513 | # CPU-seconds, then the value is written as `12005`. |
| 1514 | # |
| 1515 | # Alternatively, if you want a custom metric to record data in a more |
| 1516 | # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is |
| 1517 | # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), |
| 1518 | # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). |
| 1519 | # |
| 1520 | # The supported units are a subset of [The Unified Code for Units of |
| 1521 | # Measure](http://unitsofmeasure.org/ucum.html) standard: |
| 1522 | # |
| 1523 | # **Basic units (UNIT)** |
| 1524 | # |
| 1525 | # * `bit` bit |
| 1526 | # * `By` byte |
| 1527 | # * `s` second |
| 1528 | # * `min` minute |
| 1529 | # * `h` hour |
| 1530 | # * `d` day |
| 1531 | # * `1` dimensionless |
| 1532 | # |
| 1533 | # **Prefixes (PREFIX)** |
| 1534 | # |
| 1535 | # * `k` kilo (10^3) |
| 1536 | # * `M` mega (10^6) |
| 1537 | # * `G` giga (10^9) |
| 1538 | # * `T` tera (10^12) |
| 1539 | # * `P` peta (10^15) |
| 1540 | # * `E` exa (10^18) |
| 1541 | # * `Z` zetta (10^21) |
| 1542 | # * `Y` yotta (10^24) |
| 1543 | # |
| 1544 | # * `m` milli (10^-3) |
| 1545 | # * `u` micro (10^-6) |
| 1546 | # * `n` nano (10^-9) |
| 1547 | # * `p` pico (10^-12) |
| 1548 | # * `f` femto (10^-15) |
| 1549 | # * `a` atto (10^-18) |
| 1550 | # * `z` zepto (10^-21) |
| 1551 | # * `y` yocto (10^-24) |
| 1552 | # |
| 1553 | # * `Ki` kibi (2^10) |
| 1554 | # * `Mi` mebi (2^20) |
| 1555 | # * `Gi` gibi (2^30) |
| 1556 | # * `Ti` tebi (2^40) |
| 1557 | # * `Pi` pebi (2^50) |
| 1558 | # |
| 1559 | # **Grammar** |
| 1560 | # |
| 1561 | # The grammar also includes these connectors: |
| 1562 | # |
| 1563 | # * `/` division or ratio (as an infix operator). For examples, |
| 1564 | # `kBy/{email}` or `MiBy/10ms` (although you should almost never |
| 1565 | # have `/s` in a metric `unit`; rates should always be computed at |
| 1566 | # query time from the underlying cumulative or delta value). |
| 1567 | # * `.` multiplication or composition (as an infix operator). For |
| 1568 | # examples, `GBy.d` or `k{watt}.h`. |
| 1569 | # |
| 1570 | # The grammar for a unit is as follows: |
| 1571 | # |
| 1572 | # Expression = Component { "." Component } { "/" Component } ; |
| 1573 | # |
| 1574 | # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] |
| 1575 | # | Annotation |
| 1576 | # | "1" |
| 1577 | # ; |
| 1578 | # |
| 1579 | # Annotation = "{" NAME "}" ; |
| 1580 | # |
| 1581 | # Notes: |
| 1582 | # |
| 1583 | # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation |
| 1584 | # is used alone, then the unit is equivalent to `1`. For examples, |
| 1585 | # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. |
| 1586 | # * `NAME` is a sequence of non-blank printable ASCII characters not |
| 1587 | # containing `{` or `}`. |
| 1588 | # * `1` represents a unitary [dimensionless |
| 1589 | # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such |
| 1590 | # as in `1/s`. It is typically used when none of the basic units are |
| 1591 | # appropriate. For example, "new users per day" can be represented as |
| 1592 | # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new |
| 1593 | # users). Alternatively, "thousands of page views per day" would be |
| 1594 | # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric |
| 1595 | # value of `5.3` would mean "5300 page views per day"). |
| 1596 | # * `%` represents dimensionless value of 1/100, and annotates values giving |
| 1597 | # a percentage (so the metric values are typically in the range of 0..100, |
| 1598 | # and a metric value `3` means "3 percent"). |
| 1599 | # * `10^2.%` indicates a metric contains a ratio, typically in the range |
| 1600 | # 0..1, that will be multiplied by 100 and displayed as a percentage |
| 1601 | # (so a metric value `0.03` means "3 percent"). |
| 1602 | "displayName": "A String", # A concise name for the metric, which can be displayed in user interfaces. |
| 1603 | # Use sentence case without an ending period, for example "Request count". |
| 1604 | # This field is optional but it is recommended to be set for any metrics |
| 1605 | # associated with user-visible concepts, such as Quota. |
| 1606 | "monitoredResourceTypes": [ # Read-only. If present, then a time |
| 1607 | # series, which is identified partially by |
| 1608 | # a metric type and a MonitoredResourceDescriptor, that is associated |
| 1609 | # with this metric type can only be associated with one of the monitored |
| 1610 | # resource types listed here. |
| 1611 | "A String", |
| 1612 | ], |
| 1613 | "metadata": { # Additional annotations that can be used to guide the usage of a metric. # Optional. Metadata which can be used to guide usage of the metric. |
| 1614 | "samplePeriod": "A String", # The sampling period of metric data points. For metrics which are written |
| 1615 | # periodically, consecutive data points are stored at this time interval, |
| 1616 | # excluding data loss due to errors. Metrics with a higher granularity have |
| 1617 | # a smaller sampling period. |
| 1618 | "ingestDelay": "A String", # The delay of data points caused by ingestion. Data points older than this |
| 1619 | # age are guaranteed to be ingested and available to be read, excluding |
| 1620 | # data loss due to errors. |
| 1621 | "launchStage": "A String", # Deprecated. Must use the MetricDescriptor.launch_stage instead. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1622 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1623 | "name": "A String", # The resource name of the metric descriptor. |
| 1624 | "valueType": "A String", # Whether the measurement is an integer, a floating-point number, etc. |
| 1625 | # Some combinations of `metric_kind` and `value_type` might not be supported. |
| 1626 | "launchStage": "A String", # Optional. The launch stage of the metric definition. |
| 1627 | "type": "A String", # The metric type, including its DNS name prefix. The type is not |
| 1628 | # URL-encoded. |
| 1629 | # |
| 1630 | # All service defined metrics must be prefixed with the service name, in the |
| 1631 | # format of `{service name}/{relative metric name}`, such as |
| 1632 | # `cloudsql.googleapis.com/database/cpu/utilization`. The relative metric |
| 1633 | # name must follow: |
| 1634 | # |
| 1635 | # * Only upper and lower-case letters, digits, '/' and underscores '_' are |
| 1636 | # allowed. |
| 1637 | # * The maximum number of characters allowed for the relative_metric_name is |
| 1638 | # 100. |
| 1639 | # |
| 1640 | # All user-defined metric types have the DNS name |
| 1641 | # `custom.googleapis.com`, `external.googleapis.com`, or |
| 1642 | # `logging.googleapis.com/user/`. |
| 1643 | # |
| 1644 | # Metric types should use a natural hierarchical grouping. For example: |
| 1645 | # |
| 1646 | # "custom.googleapis.com/invoice/paid/amount" |
| 1647 | # "external.googleapis.com/prometheus/up" |
| 1648 | # "appengine.googleapis.com/http/server/response_latencies" |
| 1649 | "description": "A String", # A detailed description of the metric, which can be used in documentation. |
| 1650 | "labels": [ # The set of labels that can be used to describe a specific |
| 1651 | # instance of this metric type. |
| 1652 | # |
| 1653 | # The label key name must follow: |
| 1654 | # |
| 1655 | # * Only upper and lower-case letters, digits and underscores (_) are |
| 1656 | # allowed. |
| 1657 | # * Label name must start with a letter or digit. |
| 1658 | # * The maximum length of a label name is 100 characters. |
| 1659 | # |
| 1660 | # For example, the |
| 1661 | # `appengine.googleapis.com/http/server/response_latencies` metric |
| 1662 | # type has a label for the HTTP response code, `response_code`, so |
| 1663 | # you can look at latencies for successful responses or just |
| 1664 | # for responses that failed. |
| 1665 | { # A description of a label. |
| 1666 | "valueType": "A String", # The type of data that can be assigned to the label. |
| 1667 | "description": "A String", # A human-readable description for the label. |
| 1668 | "key": "A String", # The label key. |
| 1669 | }, |
| 1670 | ], |
| 1671 | "metricKind": "A String", # Whether the metric records instantaneous values, changes to a value, etc. |
| 1672 | # Some combinations of `metric_kind` and `value_type` might not be supported. |
| 1673 | }, |
| 1674 | ], |
| 1675 | "documentation": { # `Documentation` provides the information for describing a service. # Additional API documentation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1676 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1677 | # Example: |
| 1678 | # <pre><code>documentation: |
| 1679 | # summary: > |
| 1680 | # The Google Calendar API gives access |
| 1681 | # to most calendar features. |
| 1682 | # pages: |
| 1683 | # - name: Overview |
| 1684 | # content: &#40;== include google/foo/overview.md ==&#41; |
| 1685 | # - name: Tutorial |
| 1686 | # content: &#40;== include google/foo/tutorial.md ==&#41; |
| 1687 | # subpages; |
| 1688 | # - name: Java |
| 1689 | # content: &#40;== include google/foo/tutorial_java.md ==&#41; |
| 1690 | # rules: |
| 1691 | # - selector: google.calendar.Calendar.Get |
| 1692 | # description: > |
| 1693 | # ... |
| 1694 | # - selector: google.calendar.Calendar.Put |
| 1695 | # description: > |
| 1696 | # ... |
| 1697 | # </code></pre> |
| 1698 | # Documentation is provided in markdown syntax. In addition to |
| 1699 | # standard markdown features, definition lists, tables and fenced |
| 1700 | # code blocks are supported. Section headers can be provided and are |
| 1701 | # interpreted relative to the section nesting of the context where |
| 1702 | # a documentation fragment is embedded. |
| 1703 | # |
| 1704 | # Documentation from the IDL is merged with documentation defined |
| 1705 | # via the config at normalization time, where documentation provided |
| 1706 | # by config rules overrides IDL provided. |
| 1707 | # |
| 1708 | # A number of constructs specific to the API platform are supported |
| 1709 | # in documentation text. |
| 1710 | # |
| 1711 | # In order to reference a proto element, the following |
| 1712 | # notation can be used: |
| 1713 | # <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre> |
| 1714 | # To override the display text used for the link, this can be used: |
| 1715 | # <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre> |
| 1716 | # Text can be excluded from doc using the following notation: |
| 1717 | # <pre><code>&#40;-- internal comment --&#41;</code></pre> |
| 1718 | # |
| 1719 | # A few directives are available in documentation. Note that |
| 1720 | # directives must appear on a single line to be properly |
| 1721 | # identified. The `include` directive includes a markdown file from |
| 1722 | # an external source: |
| 1723 | # <pre><code>&#40;== include path/to/file ==&#41;</code></pre> |
| 1724 | # The `resource_for` directive marks a message to be the resource of |
| 1725 | # a collection in REST view. If it is not specified, tools attempt |
| 1726 | # to infer the resource from the operations in a collection: |
| 1727 | # <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre> |
| 1728 | # The directive `suppress_warning` does not directly affect documentation |
| 1729 | # and is documented together with service config validation. |
| 1730 | "serviceRootUrl": "A String", # Specifies the service root url if the default one (the service name |
| 1731 | # from the yaml file) is not suitable. This can be seen in any fully |
| 1732 | # specified service urls as well as sections that show a base that other |
| 1733 | # urls are relative to. |
| 1734 | "overview": "A String", # Declares a single overview page. For example: |
| 1735 | # <pre><code>documentation: |
| 1736 | # summary: ... |
| 1737 | # overview: &#40;== include overview.md ==&#41; |
| 1738 | # </code></pre> |
| 1739 | # This is a shortcut for the following declaration (using pages style): |
| 1740 | # <pre><code>documentation: |
| 1741 | # summary: ... |
| 1742 | # pages: |
| 1743 | # - name: Overview |
| 1744 | # content: &#40;== include overview.md ==&#41; |
| 1745 | # </code></pre> |
| 1746 | # Note: you cannot specify both `overview` field and `pages` field. |
| 1747 | "documentationRootUrl": "A String", # The URL to the root of documentation. |
| 1748 | "rules": [ # A list of documentation rules that apply to individual API elements. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1749 | # |
| 1750 | # **NOTE:** All service configuration rules follow "last one wins" order. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1751 | { # A documentation rule provides information about individual API elements. |
| 1752 | "deprecationDescription": "A String", # Deprecation description of the selected element(s). It can be provided if |
| 1753 | # an element is marked as `deprecated`. |
| 1754 | "description": "A String", # Description of the selected API(s). |
| 1755 | "selector": "A String", # The selector is a comma-separated list of patterns. Each pattern is a |
| 1756 | # qualified name of the element which may end in "*", indicating a wildcard. |
| 1757 | # Wildcards are only allowed at the end and for a whole component of the |
| 1758 | # qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A |
| 1759 | # wildcard will match one or more components. To specify a default for all |
| 1760 | # applicable elements, the whole pattern "*" is used. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1761 | }, |
| 1762 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1763 | "pages": [ # The top level pages for the documentation set. |
| 1764 | { # Represents a documentation page. A page can contain subpages to represent |
| 1765 | # nested documentation set structure. |
| 1766 | "content": "A String", # The Markdown content of the page. You can use <code>&#40;== include {path} |
| 1767 | # ==&#41;</code> to include content from a Markdown file. |
| 1768 | "name": "A String", # The name of the page. It will be used as an identity of the page to |
| 1769 | # generate URI of the page, text of the link to this page in navigation, |
| 1770 | # etc. The full page name (start from the root page name to this page |
| 1771 | # concatenated with `.`) can be used as reference to the page in your |
| 1772 | # documentation. For example: |
| 1773 | # <pre><code>pages: |
| 1774 | # - name: Tutorial |
| 1775 | # content: &#40;== include tutorial.md ==&#41; |
| 1776 | # subpages: |
| 1777 | # - name: Java |
| 1778 | # content: &#40;== include tutorial_java.md ==&#41; |
| 1779 | # </code></pre> |
| 1780 | # You can reference `Java` page using Markdown reference link syntax: |
| 1781 | # `Java`. |
| 1782 | "subpages": [ # Subpages of this page. The order of subpages specified here will be |
| 1783 | # honored in the generated docset. |
| 1784 | # Object with schema name: Page |
| 1785 | ], |
| 1786 | }, |
| 1787 | ], |
| 1788 | "summary": "A String", # A short summary of what the service does. Can only be provided by |
| 1789 | # plain text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1790 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1791 | "configVersion": 42, # The semantic version of the service configuration. The config version |
| 1792 | # affects the interpretation of the service configuration. For example, |
| 1793 | # certain features are enabled by default for certain config versions. |
| 1794 | # |
| 1795 | # The latest config version is `3`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1796 | "quota": { # Quota configuration helps to achieve fairness and budgeting in service # Quota configuration. |
| 1797 | # usage. |
| 1798 | # |
| 1799 | # The metric based quota configuration works this way: |
| 1800 | # - The service configuration defines a set of metrics. |
| 1801 | # - For API calls, the quota.metric_rules maps methods to metrics with |
| 1802 | # corresponding costs. |
| 1803 | # - The quota.limits defines limits on the metrics, which will be used for |
| 1804 | # quota checks at runtime. |
| 1805 | # |
| 1806 | # An example quota configuration in yaml format: |
| 1807 | # |
| 1808 | # quota: |
| 1809 | # limits: |
| 1810 | # |
| 1811 | # - name: apiWriteQpsPerProject |
| 1812 | # metric: library.googleapis.com/write_calls |
| 1813 | # unit: "1/min/{project}" # rate limit for consumer projects |
| 1814 | # values: |
| 1815 | # STANDARD: 10000 |
| 1816 | # |
| 1817 | # |
| 1818 | # # The metric rules bind all methods to the read_calls metric, |
| 1819 | # # except for the UpdateBook and DeleteBook methods. These two methods |
| 1820 | # # are mapped to the write_calls metric, with the UpdateBook method |
| 1821 | # # consuming at twice rate as the DeleteBook method. |
| 1822 | # metric_rules: |
| 1823 | # - selector: "*" |
| 1824 | # metric_costs: |
| 1825 | # library.googleapis.com/read_calls: 1 |
| 1826 | # - selector: google.example.library.v1.LibraryService.UpdateBook |
| 1827 | # metric_costs: |
| 1828 | # library.googleapis.com/write_calls: 2 |
| 1829 | # - selector: google.example.library.v1.LibraryService.DeleteBook |
| 1830 | # metric_costs: |
| 1831 | # library.googleapis.com/write_calls: 1 |
| 1832 | # |
| 1833 | # Corresponding Metric definition: |
| 1834 | # |
| 1835 | # metrics: |
| 1836 | # - name: library.googleapis.com/read_calls |
| 1837 | # display_name: Read requests |
| 1838 | # metric_kind: DELTA |
| 1839 | # value_type: INT64 |
| 1840 | # |
| 1841 | # - name: library.googleapis.com/write_calls |
| 1842 | # display_name: Write requests |
| 1843 | # metric_kind: DELTA |
| 1844 | # value_type: INT64 |
| 1845 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1846 | "metricRules": [ # List of `MetricRule` definitions, each one mapping a selected method to one |
| 1847 | # or more metrics. |
| 1848 | { # Bind API methods to metrics. Binding a method to a metric causes that |
| 1849 | # metric's configured quota behaviors to apply to the method call. |
| 1850 | "selector": "A String", # Selects the methods to which this rule applies. |
| 1851 | # |
| 1852 | # Refer to selector for syntax details. |
| 1853 | "metricCosts": { # Metrics to update when the selected methods are called, and the associated |
| 1854 | # cost applied to each metric. |
| 1855 | # |
| 1856 | # The key of the map is the metric name, and the values are the amount |
| 1857 | # increased for the metric against which the quota limits are defined. |
| 1858 | # The value must not be negative. |
| 1859 | "a_key": "A String", |
| 1860 | }, |
| 1861 | }, |
| 1862 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1863 | "limits": [ # List of `QuotaLimit` definitions for the service. |
| 1864 | { # `QuotaLimit` defines a specific limit that applies over a specified duration |
| 1865 | # for a limit type. There can be at most one limit for a duration and limit |
| 1866 | # type combination defined within a `QuotaGroup`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1867 | "values": { # Tiered limit values. You must specify this as a key:value pair, with an |
| 1868 | # integer value that is the maximum number of requests allowed for the |
| 1869 | # specified unit. Currently only STANDARD is supported. |
| 1870 | "a_key": "A String", |
| 1871 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1872 | "duration": "A String", # Duration of this limit in textual notation. Must be "100s" or "1d". |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1873 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1874 | # Used by group-based quotas only. |
| 1875 | "freeTier": "A String", # Free tier value displayed in the Developers Console for this limit. |
| 1876 | # The free tier is the number of tokens that will be subtracted from the |
| 1877 | # billed amount when billing is enabled. |
| 1878 | # This field can only be set on a limit with duration "1d", in a billable |
| 1879 | # group; it is invalid on any other limit. If this field is not set, it |
| 1880 | # defaults to 0, indicating that there is no free tier for this service. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1881 | # |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1882 | # Used by group-based quotas only. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1883 | "displayName": "A String", # User-visible display name for this limit. |
| 1884 | # Optional. If not set, the UI will provide a default display name based on |
| 1885 | # the quota configuration. This field can be used to override the default |
| 1886 | # display name generated from the configuration. |
| 1887 | "description": "A String", # Optional. User-visible, extended description for this quota limit. |
| 1888 | # Should be used only when more context is needed to understand this limit |
| 1889 | # than provided by the limit's display name (see: `display_name`). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1890 | "defaultLimit": "A String", # Default number of tokens that can be consumed during the specified |
| 1891 | # duration. This is the number of tokens assigned when a client |
| 1892 | # application developer activates the service for his/her project. |
| 1893 | # |
| 1894 | # Specifying a value of 0 will block all requests. This can be used if you |
| 1895 | # are provisioning quota to selected consumers and blocking others. |
| 1896 | # Similarly, a value of -1 will indicate an unlimited quota. No other |
| 1897 | # negative values are allowed. |
| 1898 | # |
| 1899 | # Used by group-based quotas only. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1900 | "name": "A String", # Name of the quota limit. |
| 1901 | # |
| 1902 | # The name must be provided, and it must be unique within the service. The |
| 1903 | # name can only include alphanumeric characters as well as '-'. |
| 1904 | # |
| 1905 | # The maximum length of the limit name is 64 characters. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1906 | "maxLimit": "A String", # Maximum number of tokens that can be consumed during the specified |
| 1907 | # duration. Client application developers can override the default limit up |
| 1908 | # to this maximum. If specified, this value cannot be set to a value less |
| 1909 | # than the default limit. If not specified, it is set to the default limit. |
| 1910 | # |
| 1911 | # To allow clients to apply overrides with no upper bound, set this to -1, |
| 1912 | # indicating unlimited maximum quota. |
| 1913 | # |
| 1914 | # Used by group-based quotas only. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1915 | "metric": "A String", # The name of the metric this quota limit applies to. The quota limits with |
| 1916 | # the same metric will be checked together during runtime. The metric must be |
| 1917 | # defined within the service config. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1918 | "unit": "A String", # Specify the unit of the quota limit. It uses the same syntax as |
| 1919 | # Metric.unit. The supported unit kinds are determined by the quota |
| 1920 | # backend system. |
| 1921 | # |
| 1922 | # Here are some examples: |
| 1923 | # * "1/min/{project}" for quota per minute per project. |
| 1924 | # |
| 1925 | # Note: the order of unit components is insignificant. |
| 1926 | # The "1" at the beginning is required to follow the metric unit syntax. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1927 | }, |
| 1928 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1929 | }, |
| 1930 | "customError": { # Customize service error responses. For example, list any service # Custom error configuration. |
| 1931 | # specific protobuf types that can appear in error detail lists of |
| 1932 | # error responses. |
| 1933 | # |
| 1934 | # Example: |
| 1935 | # |
| 1936 | # custom_error: |
| 1937 | # types: |
| 1938 | # - google.foo.v1.CustomError |
| 1939 | # - google.foo.v1.AnotherError |
| 1940 | "types": [ # The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. |
| 1941 | "A String", |
| 1942 | ], |
| 1943 | "rules": [ # The list of custom error rules that apply to individual API messages. |
| 1944 | # |
| 1945 | # **NOTE:** All service configuration rules follow "last one wins" order. |
| 1946 | { # A custom error rule. |
| 1947 | "selector": "A String", # Selects messages to which this rule applies. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1948 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1949 | # Refer to selector for syntax details. |
| 1950 | "isErrorType": True or False, # Mark this message as possible payload in error response. Otherwise, |
| 1951 | # objects of this type will be filtered when they appear in error payload. |
| 1952 | }, |
| 1953 | ], |
| 1954 | }, |
| 1955 | "authentication": { # `Authentication` defines the authentication configuration for an API. # Auth configuration. |
| 1956 | # |
| 1957 | # Example for an API targeted for external use: |
| 1958 | # |
| 1959 | # name: calendar.googleapis.com |
| 1960 | # authentication: |
| 1961 | # providers: |
| 1962 | # - id: google_calendar_auth |
| 1963 | # jwks_uri: https://www.googleapis.com/oauth2/v1/certs |
| 1964 | # issuer: https://securetoken.google.com |
| 1965 | # rules: |
| 1966 | # - selector: "*" |
| 1967 | # requirements: |
| 1968 | # provider_id: google_calendar_auth |
| 1969 | "rules": [ # A list of authentication rules that apply to individual API methods. |
| 1970 | # |
| 1971 | # **NOTE:** All service configuration rules follow "last one wins" order. |
| 1972 | { # Authentication rules for the service. |
| 1973 | # |
| 1974 | # By default, if a method has any authentication requirements, every request |
| 1975 | # must include a valid credential matching one of the requirements. |
| 1976 | # It's an error to include more than one kind of credential in a single |
| 1977 | # request. |
| 1978 | # |
| 1979 | # If a method doesn't have any auth requirements, request credentials will be |
| 1980 | # ignored. |
| 1981 | "oauth": { # OAuth scopes are a way to define data and permissions on data. For example, # The requirements for OAuth credentials. |
| 1982 | # there are scopes defined for "Read-only access to Google Calendar" and |
| 1983 | # "Access to Cloud Platform". Users can consent to a scope for an application, |
| 1984 | # giving it permission to access that data on their behalf. |
| 1985 | # |
| 1986 | # OAuth scope specifications should be fairly coarse grained; a user will need |
| 1987 | # to see and understand the text description of what your scope means. |
| 1988 | # |
| 1989 | # In most cases: use one or at most two OAuth scopes for an entire family of |
| 1990 | # products. If your product has multiple APIs, you should probably be sharing |
| 1991 | # the OAuth scope across all of those APIs. |
| 1992 | # |
| 1993 | # When you need finer grained OAuth consent screens: talk with your product |
| 1994 | # management about how developers will use them in practice. |
| 1995 | # |
| 1996 | # Please note that even though each of the canonical scopes is enough for a |
| 1997 | # request to be accepted and passed to the backend, a request can still fail |
| 1998 | # due to the backend requiring additional scopes or permissions. |
| 1999 | "canonicalScopes": "A String", # The list of publicly documented OAuth scopes that are allowed access. An |
| 2000 | # OAuth token containing any of these scopes will be accepted. |
| 2001 | # |
| 2002 | # Example: |
| 2003 | # |
| 2004 | # canonical_scopes: https://www.googleapis.com/auth/calendar, |
| 2005 | # https://www.googleapis.com/auth/calendar.read |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2006 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2007 | "requirements": [ # Requirements for additional authentication providers. |
| 2008 | { # User-defined authentication requirements, including support for |
| 2009 | # [JSON Web Token |
| 2010 | # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
| 2011 | "providerId": "A String", # id from authentication provider. |
| 2012 | # |
| 2013 | # Example: |
| 2014 | # |
| 2015 | # provider_id: bookstore_auth |
| 2016 | "audiences": "A String", # NOTE: This will be deprecated soon, once AuthProvider.audiences is |
| 2017 | # implemented and accepted in all the runtime components. |
| 2018 | # |
| 2019 | # The list of JWT |
| 2020 | # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 2021 | # that are allowed to access. A JWT containing any of these audiences will |
| 2022 | # be accepted. When this setting is absent, only JWTs with audience |
| 2023 | # "https://Service_name/API_name" |
| 2024 | # will be accepted. For example, if no audiences are in the setting, |
| 2025 | # LibraryService API will only accept JWTs with the following audience |
| 2026 | # "https://library-example.googleapis.com/google.example.library.v1.LibraryService". |
| 2027 | # |
| 2028 | # Example: |
| 2029 | # |
| 2030 | # audiences: bookstore_android.apps.googleusercontent.com, |
| 2031 | # bookstore_web.apps.googleusercontent.com |
| 2032 | }, |
| 2033 | ], |
| 2034 | "allowWithoutCredential": True or False, # If true, the service accepts API keys without any other credential. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2035 | "selector": "A String", # Selects the methods to which this rule applies. |
| 2036 | # |
| 2037 | # Refer to selector for syntax details. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2038 | }, |
| 2039 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2040 | "providers": [ # Defines a set of authentication providers that a service supports. |
| 2041 | { # Configuration for an authentication provider, including support for |
| 2042 | # [JSON Web Token |
| 2043 | # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
| 2044 | "id": "A String", # The unique identifier of the auth provider. It will be referred to by |
| 2045 | # `AuthRequirement.provider_id`. |
| 2046 | # |
| 2047 | # Example: "bookstore_auth". |
| 2048 | "issuer": "A String", # Identifies the principal that issued the JWT. See |
| 2049 | # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 |
| 2050 | # Usually a URL or an email address. |
| 2051 | # |
| 2052 | # Example: https://securetoken.google.com |
| 2053 | # Example: 1234567-compute@developer.gserviceaccount.com |
| 2054 | "jwksUri": "A String", # URL of the provider's public key set to validate signature of the JWT. See |
| 2055 | # [OpenID |
| 2056 | # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). |
| 2057 | # Optional if the key set document: |
| 2058 | # - can be retrieved from |
| 2059 | # [OpenID |
| 2060 | # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of |
| 2061 | # the issuer. |
| 2062 | # - can be inferred from the email domain of the issuer (e.g. a Google |
| 2063 | # service account). |
| 2064 | # |
| 2065 | # Example: https://www.googleapis.com/oauth2/v1/certs |
| 2066 | "audiences": "A String", # The list of JWT |
| 2067 | # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). |
| 2068 | # that are allowed to access. A JWT containing any of these audiences will |
| 2069 | # be accepted. When this setting is absent, JWTs with audiences: |
| 2070 | # - "https://[service.name]/[google.protobuf.Api.name]" |
| 2071 | # - "https://[service.name]/" |
| 2072 | # will be accepted. |
| 2073 | # For example, if no audiences are in the setting, LibraryService API will |
| 2074 | # accept JWTs with the following audiences: |
| 2075 | # - |
| 2076 | # https://library-example.googleapis.com/google.example.library.v1.LibraryService |
| 2077 | # - https://library-example.googleapis.com/ |
| 2078 | # |
| 2079 | # Example: |
| 2080 | # |
| 2081 | # audiences: bookstore_android.apps.googleusercontent.com, |
| 2082 | # bookstore_web.apps.googleusercontent.com |
| 2083 | "authorizationUrl": "A String", # Redirect URL if JWT token is required but not present or is expired. |
| 2084 | # Implement authorizationUrl of securityDefinitions in OpenAPI spec. |
| 2085 | "jwtLocations": [ # Defines the locations to extract the JWT. |
| 2086 | # |
| 2087 | # JWT locations can be either from HTTP headers or URL query parameters. |
| 2088 | # The rule is that the first match wins. The checking order is: checking |
| 2089 | # all headers first, then URL query parameters. |
| 2090 | # |
| 2091 | # If not specified, default to use following 3 locations: |
| 2092 | # 1) Authorization: Bearer |
| 2093 | # 2) x-goog-iap-jwt-assertion |
| 2094 | # 3) access_token query parameter |
| 2095 | # |
| 2096 | # Default locations can be specified as followings: |
| 2097 | # jwt_locations: |
| 2098 | # - header: Authorization |
| 2099 | # value_prefix: "Bearer " |
| 2100 | # - header: x-goog-iap-jwt-assertion |
| 2101 | # - query: access_token |
| 2102 | { # Specifies a location to extract JWT from an API request. |
| 2103 | "query": "A String", # Specifies URL query parameter name to extract JWT token. |
| 2104 | "valuePrefix": "A String", # The value prefix. The value format is "value_prefix{token}" |
| 2105 | # Only applies to "in" header type. Must be empty for "in" query type. |
| 2106 | # If not empty, the header value has to match (case sensitive) this prefix. |
| 2107 | # If not matched, JWT will not be extracted. If matched, JWT will be |
| 2108 | # extracted after the prefix is removed. |
| 2109 | # |
| 2110 | # For example, for "Authorization: Bearer {JWT}", |
| 2111 | # value_prefix="Bearer " with a space at the end. |
| 2112 | "header": "A String", # Specifies HTTP header name to extract JWT token. |
| 2113 | }, |
| 2114 | ], |
| 2115 | }, |
| 2116 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2117 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2118 | "title": "A String", # The product title for this service. |
| 2119 | "producerProjectId": "A String", # The Google project that owns this service. |
| 2120 | "apis": [ # A list of API interfaces exported by this service. Only the `name` field |
| 2121 | # of the google.protobuf.Api needs to be provided by the configuration |
| 2122 | # author, as the remaining fields will be derived from the IDL during the |
| 2123 | # normalization process. It is an error to specify an API interface here |
| 2124 | # which cannot be resolved against the associated IDL files. |
| 2125 | { # Api is a light-weight descriptor for an API Interface. |
| 2126 | # |
| 2127 | # Interfaces are also described as "protocol buffer services" in some contexts, |
| 2128 | # such as by the "service" keyword in a .proto file, but they are different |
| 2129 | # from API Services, which represent a concrete implementation of an interface |
| 2130 | # as opposed to simply a description of methods and bindings. They are also |
| 2131 | # sometimes simply referred to as "APIs" in other contexts, such as the name of |
| 2132 | # this message itself. See https://cloud.google.com/apis/design/glossary for |
| 2133 | # detailed terminology. |
| 2134 | "sourceContext": { # `SourceContext` represents information about the source of a # Source context for the protocol buffer service represented by this |
| 2135 | # message. |
| 2136 | # protobuf element, like the file in which it is defined. |
| 2137 | "fileName": "A String", # The path-qualified name of the .proto file that contained the associated |
| 2138 | # protobuf element. For example: `"google/protobuf/source_context.proto"`. |
| 2139 | }, |
| 2140 | "syntax": "A String", # The source syntax of the service. |
| 2141 | "methods": [ # The methods of this interface, in unspecified order. |
| 2142 | { # Method represents a method of an API interface. |
| 2143 | "options": [ # Any metadata attached to the method. |
| 2144 | { # A protocol buffer option, which can be attached to a message, field, |
| 2145 | # enumeration, etc. |
| 2146 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 2147 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 2148 | # should be used. If the value is an enum, it should be stored as an int32 |
| 2149 | # value using the google.protobuf.Int32Value type. |
| 2150 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 2151 | }, |
| 2152 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 2153 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 2154 | # For custom options, it should be the fully-qualified name. For example, |
| 2155 | # `"google.api.http"`. |
| 2156 | }, |
| 2157 | ], |
| 2158 | "responseStreaming": True or False, # If true, the response is streamed. |
| 2159 | "syntax": "A String", # The source syntax of this method. |
| 2160 | "requestTypeUrl": "A String", # A URL of the input message type. |
| 2161 | "name": "A String", # The simple name of this method. |
| 2162 | "responseTypeUrl": "A String", # The URL of the output message type. |
| 2163 | "requestStreaming": True or False, # If true, the request is streamed. |
| 2164 | }, |
| 2165 | ], |
| 2166 | "name": "A String", # The fully qualified name of this interface, including package name |
| 2167 | # followed by the interface's simple name. |
| 2168 | "version": "A String", # A version string for this interface. If specified, must have the form |
| 2169 | # `major-version.minor-version`, as in `1.10`. If the minor version is |
| 2170 | # omitted, it defaults to zero. If the entire version field is empty, the |
| 2171 | # major version is derived from the package name, as outlined below. If the |
| 2172 | # field is not empty, the version in the package name will be verified to be |
| 2173 | # consistent with what is provided here. |
| 2174 | # |
| 2175 | # The versioning schema uses [semantic |
| 2176 | # versioning](http://semver.org) where the major version number |
| 2177 | # indicates a breaking change and the minor version an additive, |
| 2178 | # non-breaking change. Both version numbers are signals to users |
| 2179 | # what to expect from different versions, and should be carefully |
| 2180 | # chosen based on the product plan. |
| 2181 | # |
| 2182 | # The major version is also reflected in the package name of the |
| 2183 | # interface, which must end in `v<major-version>`, as in |
| 2184 | # `google.feature.v1`. For major versions 0 and 1, the suffix can |
| 2185 | # be omitted. Zero major versions must only be used for |
| 2186 | # experimental, non-GA interfaces. |
| 2187 | "options": [ # Any metadata attached to the interface. |
| 2188 | { # A protocol buffer option, which can be attached to a message, field, |
| 2189 | # enumeration, etc. |
| 2190 | "value": { # The option's value packed in an Any message. If the value is a primitive, |
| 2191 | # the corresponding wrapper type defined in google/protobuf/wrappers.proto |
| 2192 | # should be used. If the value is an enum, it should be stored as an int32 |
| 2193 | # value using the google.protobuf.Int32Value type. |
| 2194 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 2195 | }, |
| 2196 | "name": "A String", # The option's name. For protobuf built-in options (options defined in |
| 2197 | # descriptor.proto), this is the short name. For example, `"map_entry"`. |
| 2198 | # For custom options, it should be the fully-qualified name. For example, |
| 2199 | # `"google.api.http"`. |
| 2200 | }, |
| 2201 | ], |
| 2202 | "mixins": [ # Included interfaces. See Mixin. |
| 2203 | { # Declares an API Interface to be included in this interface. The including |
| 2204 | # interface must redeclare all the methods from the included interface, but |
| 2205 | # documentation and options are inherited as follows: |
| 2206 | # |
| 2207 | # - If after comment and whitespace stripping, the documentation |
| 2208 | # string of the redeclared method is empty, it will be inherited |
| 2209 | # from the original method. |
| 2210 | # |
| 2211 | # - Each annotation belonging to the service config (http, |
| 2212 | # visibility) which is not set in the redeclared method will be |
| 2213 | # inherited. |
| 2214 | # |
| 2215 | # - If an http annotation is inherited, the path pattern will be |
| 2216 | # modified as follows. Any version prefix will be replaced by the |
| 2217 | # version of the including interface plus the root path if |
| 2218 | # specified. |
| 2219 | # |
| 2220 | # Example of a simple mixin: |
| 2221 | # |
| 2222 | # package google.acl.v1; |
| 2223 | # service AccessControl { |
| 2224 | # // Get the underlying ACL object. |
| 2225 | # rpc GetAcl(GetAclRequest) returns (Acl) { |
| 2226 | # option (google.api.http).get = "/v1/{resource=**}:getAcl"; |
| 2227 | # } |
| 2228 | # } |
| 2229 | # |
| 2230 | # package google.storage.v2; |
| 2231 | # service Storage { |
| 2232 | # // rpc GetAcl(GetAclRequest) returns (Acl); |
| 2233 | # |
| 2234 | # // Get a data record. |
| 2235 | # rpc GetData(GetDataRequest) returns (Data) { |
| 2236 | # option (google.api.http).get = "/v2/{resource=**}"; |
| 2237 | # } |
| 2238 | # } |
| 2239 | # |
| 2240 | # Example of a mixin configuration: |
| 2241 | # |
| 2242 | # apis: |
| 2243 | # - name: google.storage.v2.Storage |
| 2244 | # mixins: |
| 2245 | # - name: google.acl.v1.AccessControl |
| 2246 | # |
| 2247 | # The mixin construct implies that all methods in `AccessControl` are |
| 2248 | # also declared with same name and request/response types in |
| 2249 | # `Storage`. A documentation generator or annotation processor will |
| 2250 | # see the effective `Storage.GetAcl` method after inherting |
| 2251 | # documentation and annotations as follows: |
| 2252 | # |
| 2253 | # service Storage { |
| 2254 | # // Get the underlying ACL object. |
| 2255 | # rpc GetAcl(GetAclRequest) returns (Acl) { |
| 2256 | # option (google.api.http).get = "/v2/{resource=**}:getAcl"; |
| 2257 | # } |
| 2258 | # ... |
| 2259 | # } |
| 2260 | # |
| 2261 | # Note how the version in the path pattern changed from `v1` to `v2`. |
| 2262 | # |
| 2263 | # If the `root` field in the mixin is specified, it should be a |
| 2264 | # relative path under which inherited HTTP paths are placed. Example: |
| 2265 | # |
| 2266 | # apis: |
| 2267 | # - name: google.storage.v2.Storage |
| 2268 | # mixins: |
| 2269 | # - name: google.acl.v1.AccessControl |
| 2270 | # root: acls |
| 2271 | # |
| 2272 | # This implies the following inherited HTTP annotation: |
| 2273 | # |
| 2274 | # service Storage { |
| 2275 | # // Get the underlying ACL object. |
| 2276 | # rpc GetAcl(GetAclRequest) returns (Acl) { |
| 2277 | # option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; |
| 2278 | # } |
| 2279 | # ... |
| 2280 | # } |
| 2281 | "root": "A String", # If non-empty specifies a path under which inherited HTTP paths |
| 2282 | # are rooted. |
| 2283 | "name": "A String", # The fully qualified name of the interface which is included. |
| 2284 | }, |
| 2285 | ], |
| 2286 | }, |
| 2287 | ], |
| 2288 | "id": "A String", # A unique ID for a specific instance of this message, typically assigned |
| 2289 | # by the client for tracking purpose. Must be no longer than 63 characters |
| 2290 | # and only lower case letters, digits, '.', '_' and '-' are allowed. If |
| 2291 | # empty, the server may choose to generate one instead. |
| 2292 | "endpoints": [ # Configuration for network endpoints. If this is empty, then an endpoint |
| 2293 | # with the same name as the service is automatically generated to service all |
| 2294 | # defined APIs. |
| 2295 | { # `Endpoint` describes a network endpoint that serves a set of APIs. |
| 2296 | # A service may expose any number of endpoints, and all endpoints share the |
| 2297 | # same service configuration, such as quota configuration and monitoring |
| 2298 | # configuration. |
| 2299 | # |
| 2300 | # Example service configuration: |
| 2301 | # |
| 2302 | # name: library-example.googleapis.com |
| 2303 | # endpoints: |
| 2304 | # # Below entry makes 'google.example.library.v1.Library' |
| 2305 | # # API be served from endpoint address library-example.googleapis.com. |
| 2306 | # # It also allows HTTP OPTIONS calls to be passed to the backend, for |
| 2307 | # # it to decide whether the subsequent cross-origin request is |
| 2308 | # # allowed to proceed. |
| 2309 | # - name: library-example.googleapis.com |
| 2310 | # allow_cors: true |
| 2311 | "name": "A String", # The canonical name of this endpoint. |
| 2312 | "allowCors": True or False, # Allowing |
| 2313 | # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka |
| 2314 | # cross-domain traffic, would allow the backends served from this endpoint to |
| 2315 | # receive and respond to HTTP OPTIONS requests. The response will be used by |
| 2316 | # the browser to determine whether the subsequent cross-origin request is |
| 2317 | # allowed to proceed. |
| 2318 | "target": "A String", # The specification of an Internet routable address of API frontend that will |
| 2319 | # handle requests to this [API |
| 2320 | # Endpoint](https://cloud.google.com/apis/design/glossary). It should be |
| 2321 | # either a valid IPv4 address or a fully-qualified domain name. For example, |
| 2322 | # "8.8.8.8" or "myservice.appspot.com". |
| 2323 | "aliases": [ # DEPRECATED: This field is no longer supported. Instead of using aliases, |
| 2324 | # please specify multiple google.api.Endpoint for each of the intended |
| 2325 | # aliases. |
| 2326 | # |
| 2327 | # Additional names that this endpoint will be hosted on. |
| 2328 | "A String", |
| 2329 | ], |
| 2330 | }, |
| 2331 | ], |
| 2332 | "systemParameters": { # ### System parameter configuration # System parameter configuration. |
| 2333 | # |
| 2334 | # A system parameter is a special kind of parameter defined by the API |
| 2335 | # system, not by an individual API. It is typically mapped to an HTTP header |
| 2336 | # and/or a URL query parameter. This configuration specifies which methods |
| 2337 | # change the names of the system parameters. |
| 2338 | "rules": [ # Define system parameters. |
| 2339 | # |
| 2340 | # The parameters defined here will override the default parameters |
| 2341 | # implemented by the system. If this field is missing from the service |
| 2342 | # config, default system parameters will be used. Default system parameters |
| 2343 | # and names is implementation-dependent. |
| 2344 | # |
| 2345 | # Example: define api key for all methods |
| 2346 | # |
| 2347 | # system_parameters |
| 2348 | # rules: |
| 2349 | # - selector: "*" |
| 2350 | # parameters: |
| 2351 | # - name: api_key |
| 2352 | # url_query_parameter: api_key |
| 2353 | # |
| 2354 | # |
| 2355 | # Example: define 2 api key names for a specific method. |
| 2356 | # |
| 2357 | # system_parameters |
| 2358 | # rules: |
| 2359 | # - selector: "/ListShelves" |
| 2360 | # parameters: |
| 2361 | # - name: api_key |
| 2362 | # http_header: Api-Key1 |
| 2363 | # - name: api_key |
| 2364 | # http_header: Api-Key2 |
| 2365 | # |
| 2366 | # **NOTE:** All service configuration rules follow "last one wins" order. |
| 2367 | { # Define a system parameter rule mapping system parameter definitions to |
| 2368 | # methods. |
| 2369 | "parameters": [ # Define parameters. Multiple names may be defined for a parameter. |
| 2370 | # For a given method call, only one of them should be used. If multiple |
| 2371 | # names are used the behavior is implementation-dependent. |
| 2372 | # If none of the specified names are present the behavior is |
| 2373 | # parameter-dependent. |
| 2374 | { # Define a parameter's name and location. The parameter may be passed as either |
| 2375 | # an HTTP header or a URL query parameter, and if both are passed the behavior |
| 2376 | # is implementation-dependent. |
| 2377 | "name": "A String", # Define the name of the parameter, such as "api_key" . It is case sensitive. |
| 2378 | "httpHeader": "A String", # Define the HTTP header name to use for the parameter. It is case |
| 2379 | # insensitive. |
| 2380 | "urlQueryParameter": "A String", # Define the URL query parameter name to use for the parameter. It is case |
| 2381 | # sensitive. |
| 2382 | }, |
| 2383 | ], |
| 2384 | "selector": "A String", # Selects the methods to which this rule applies. Use '*' to indicate all |
| 2385 | # methods in all APIs. |
| 2386 | # |
| 2387 | # Refer to selector for syntax details. |
| 2388 | }, |
| 2389 | ], |
| 2390 | }, |
| 2391 | "monitoredResources": [ # Defines the monitored resources used by this service. This is required |
| 2392 | # by the Service.monitoring and Service.logging configurations. |
| 2393 | { # An object that describes the schema of a MonitoredResource object using a |
| 2394 | # type name and a set of labels. For example, the monitored resource |
| 2395 | # descriptor for Google Compute Engine VM instances has a type of |
| 2396 | # `"gce_instance"` and specifies the use of the labels `"instance_id"` and |
| 2397 | # `"zone"` to identify particular VM instances. |
| 2398 | # |
| 2399 | # Different services can support different monitored resource types. |
| 2400 | # |
| 2401 | # The following are specific rules to service defined monitored resources for |
| 2402 | # Monitoring and Logging: |
| 2403 | # |
| 2404 | # * The `type`, `display_name`, `description`, `labels` and `launch_stage` |
| 2405 | # fields are all required. |
| 2406 | # * The first label of the monitored resource descriptor must be |
| 2407 | # `resource_container`. There are legacy monitored resource descritptors |
| 2408 | # start with `project_id`. |
| 2409 | # * It must include a `location` label. |
| 2410 | # * Maximum of default 5 service defined monitored resource descriptors |
| 2411 | # is allowed per service. |
| 2412 | # * Maximum of default 10 labels per monitored resource is allowed. |
| 2413 | # |
| 2414 | # The default maximum limit can be overridden. Please follow |
| 2415 | # https://cloud.google.com/monitoring/quotas |
| 2416 | "name": "A String", # Optional. The resource name of the monitored resource descriptor: |
| 2417 | # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where |
| 2418 | # {type} is the value of the `type` field in this object and |
| 2419 | # {project_id} is a project ID that provides API-specific context for |
| 2420 | # accessing the type. APIs that do not use project information can use the |
| 2421 | # resource name format `"monitoredResourceDescriptors/{type}"`. |
| 2422 | "launchStage": "A String", # Optional. The launch stage of the monitored resource definition. |
| 2423 | "displayName": "A String", # Optional. A concise name for the monitored resource type that might be |
| 2424 | # displayed in user interfaces. It should be a Title Cased Noun Phrase, |
| 2425 | # without any article or other determiners. For example, |
| 2426 | # `"Google Cloud SQL Database"`. |
| 2427 | "labels": [ # Required. A set of labels used to describe instances of this monitored |
| 2428 | # resource type. |
| 2429 | # The label key name must follow: |
| 2430 | # |
| 2431 | # * Only upper and lower-case letters, digits and underscores (_) are |
| 2432 | # allowed. |
| 2433 | # * Label name must start with a letter or digit. |
| 2434 | # * The maximum length of a label name is 100 characters. |
| 2435 | # |
| 2436 | # For example, an individual Google Cloud SQL database is |
| 2437 | # identified by values for the labels `database_id` and `location`. |
| 2438 | { # A description of a label. |
| 2439 | "valueType": "A String", # The type of data that can be assigned to the label. |
| 2440 | "description": "A String", # A human-readable description for the label. |
| 2441 | "key": "A String", # The label key. |
| 2442 | }, |
| 2443 | ], |
| 2444 | "description": "A String", # Optional. A detailed description of the monitored resource type that might |
| 2445 | # be used in documentation. |
| 2446 | "type": "A String", # Required. The monitored resource type. For example, the type |
| 2447 | # `cloudsql_database` represents databases in Google Cloud SQL. |
| 2448 | # |
| 2449 | # All service defined monitored resource types must be prefixed with the |
| 2450 | # service name, in the format of `{service name}/{relative resource name}`. |
| 2451 | # The relative resource name must follow: |
| 2452 | # |
| 2453 | # * Only upper and lower-case letters and digits are allowed. |
| 2454 | # * It must start with upper case character and is recommended to use Upper |
| 2455 | # Camel Case style. |
| 2456 | # * The maximum number of characters allowed for the relative_resource_name |
| 2457 | # is 100. |
| 2458 | # |
| 2459 | # Note there are legacy service monitored resources not following this rule. |
| 2460 | }, |
| 2461 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2462 | "context": { # `Context` defines which contexts an API requests. # Context configuration. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2463 | # |
| 2464 | # Example: |
| 2465 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2466 | # context: |
| 2467 | # rules: |
| 2468 | # - selector: "*" |
| 2469 | # requested: |
| 2470 | # - google.rpc.context.ProjectContext |
| 2471 | # - google.rpc.context.OriginContext |
| 2472 | # |
| 2473 | # The above specifies that all methods in the API request |
| 2474 | # `google.rpc.context.ProjectContext` and |
| 2475 | # `google.rpc.context.OriginContext`. |
| 2476 | # |
| 2477 | # Available context types are defined in package |
| 2478 | # `google.rpc.context`. |
| 2479 | # |
| 2480 | # This also provides mechanism to whitelist any protobuf message extension that |
| 2481 | # can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and |
| 2482 | # “x-goog-ext-<extension_id>-jspb” format. For example, list any service |
| 2483 | # specific protobuf types that can appear in grpc metadata as follows in your |
| 2484 | # yaml file: |
| 2485 | # |
| 2486 | # Example: |
| 2487 | # |
| 2488 | # context: |
| 2489 | # rules: |
| 2490 | # - selector: "google.example.library.v1.LibraryService.CreateBook" |
| 2491 | # allowed_request_extensions: |
| 2492 | # - google.foo.v1.NewExtension |
| 2493 | # allowed_response_extensions: |
| 2494 | # - google.foo.v1.NewExtension |
| 2495 | # |
| 2496 | # You can also specify extension ID instead of fully qualified extension name |
| 2497 | # here. |
| 2498 | "rules": [ # A list of RPC context rules that apply to individual API methods. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2499 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2500 | # **NOTE:** All service configuration rules follow "last one wins" order. |
| 2501 | { # A context rule provides information about the context for an individual API |
| 2502 | # element. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2503 | "selector": "A String", # Selects the methods to which this rule applies. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2504 | # |
| 2505 | # Refer to selector for syntax details. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2506 | "requested": [ # A list of full type names of requested contexts. |
| 2507 | "A String", |
| 2508 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2509 | "provided": [ # A list of full type names of provided contexts. |
| 2510 | "A String", |
| 2511 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2512 | "allowedRequestExtensions": [ # A list of full type names or extension IDs of extensions allowed in grpc |
| 2513 | # side channel from client to backend. |
| 2514 | "A String", |
| 2515 | ], |
| 2516 | "allowedResponseExtensions": [ # A list of full type names or extension IDs of extensions allowed in grpc |
| 2517 | # side channel from backend to client. |
| 2518 | "A String", |
| 2519 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2520 | }, |
| 2521 | ], |
| 2522 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2523 | }</pre> |
| 2524 | </div> |
| 2525 | |
| 2526 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2527 | <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2528 | <pre>Gets the access control policy for a resource. |
| 2529 | Returns an empty policy if the resource exists and does not have a policy |
| 2530 | set. |
| 2531 | |
| 2532 | Args: |
| 2533 | resource: string, REQUIRED: The resource for which the policy is being requested. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2534 | See the operation documentation for the appropriate value for this field. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2535 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2536 | The object takes the form of: |
| 2537 | |
| 2538 | { # Request message for `GetIamPolicy` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2539 | "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to |
| 2540 | # `GetIamPolicy`. |
| 2541 | "requestedPolicyVersion": 42, # Optional. The policy format version to be returned. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2542 | # |
| 2543 | # Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 2544 | # rejected. |
| 2545 | # |
| 2546 | # Requests for policies with any conditional bindings must specify version 3. |
| 2547 | # Policies without any conditional bindings may specify any valid value or |
| 2548 | # leave the field unset. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2549 | # |
| 2550 | # To learn which resources support conditions in their IAM policies, see the |
| 2551 | # [IAM |
| 2552 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2553 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2554 | } |
| 2555 | |
| 2556 | x__xgafv: string, V1 error format. |
| 2557 | Allowed values |
| 2558 | 1 - v1 error format |
| 2559 | 2 - v2 error format |
| 2560 | |
| 2561 | Returns: |
| 2562 | An object of the form: |
| 2563 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2564 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 2565 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2566 | # |
| 2567 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2568 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 2569 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 2570 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 2571 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 2572 | # custom role. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2573 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2574 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 2575 | # `condition`, which is a logical expression that allows access to a resource |
| 2576 | # only if the expression evaluates to `true`. A condition can add constraints |
| 2577 | # based on attributes of the request, the resource, or both. To learn which |
| 2578 | # resources support conditions in their IAM policies, see the |
| 2579 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2580 | # |
| 2581 | # **JSON example:** |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2582 | # |
| 2583 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2584 | # "bindings": [ |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2585 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2586 | # "role": "roles/resourcemanager.organizationAdmin", |
| 2587 | # "members": [ |
| 2588 | # "user:mike@example.com", |
| 2589 | # "group:admins@example.com", |
| 2590 | # "domain:google.com", |
| 2591 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2592 | # ] |
| 2593 | # }, |
| 2594 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2595 | # "role": "roles/resourcemanager.organizationViewer", |
| 2596 | # "members": [ |
| 2597 | # "user:eve@example.com" |
| 2598 | # ], |
| 2599 | # "condition": { |
| 2600 | # "title": "expirable access", |
| 2601 | # "description": "Does not grant access after Sep 2020", |
| 2602 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2603 | # } |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2604 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2605 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2606 | # "etag": "BwWWja0YfJA=", |
| 2607 | # "version": 3 |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2608 | # } |
| 2609 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2610 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2611 | # |
| 2612 | # bindings: |
| 2613 | # - members: |
| 2614 | # - user:mike@example.com |
| 2615 | # - group:admins@example.com |
| 2616 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2617 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 2618 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2619 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2620 | # - user:eve@example.com |
| 2621 | # role: roles/resourcemanager.organizationViewer |
| 2622 | # condition: |
| 2623 | # title: expirable access |
| 2624 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2625 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2626 | # - etag: BwWWja0YfJA= |
| 2627 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2628 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2629 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2630 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2631 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 2632 | # prevent simultaneous updates of a policy from overwriting each other. |
| 2633 | # It is strongly suggested that systems make use of the `etag` in the |
| 2634 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 2635 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 2636 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 2637 | # ensure that their change will be applied to the same version of the policy. |
| 2638 | # |
| 2639 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 2640 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 2641 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 2642 | # the conditions in the version `3` policy are lost. |
| 2643 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 2644 | # `condition` that determines how and when the `bindings` are applied. Each |
| 2645 | # of the `bindings` must contain at least one member. |
| 2646 | { # Associates `members` with a `role`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2647 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 2648 | # |
| 2649 | # If the condition evaluates to `true`, then this binding applies to the |
| 2650 | # current request. |
| 2651 | # |
| 2652 | # If the condition evaluates to `false`, then this binding does not apply to |
| 2653 | # the current request. However, a different role binding might grant the same |
| 2654 | # role to one or more of the members in this binding. |
| 2655 | # |
| 2656 | # To learn which resources support conditions in their IAM policies, see the |
| 2657 | # [IAM |
| 2658 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 2659 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 2660 | # are documented at https://github.com/google/cel-spec. |
| 2661 | # |
| 2662 | # Example (Comparison): |
| 2663 | # |
| 2664 | # title: "Summary size limit" |
| 2665 | # description: "Determines if a summary is less than 100 chars" |
| 2666 | # expression: "document.summary.size() < 100" |
| 2667 | # |
| 2668 | # Example (Equality): |
| 2669 | # |
| 2670 | # title: "Requestor is owner" |
| 2671 | # description: "Determines if requestor is the document owner" |
| 2672 | # expression: "document.owner == request.auth.claims.email" |
| 2673 | # |
| 2674 | # Example (Logic): |
| 2675 | # |
| 2676 | # title: "Public documents" |
| 2677 | # description: "Determine whether the document should be publicly visible" |
| 2678 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 2679 | # |
| 2680 | # Example (Data Manipulation): |
| 2681 | # |
| 2682 | # title: "Notification string" |
| 2683 | # description: "Create a notification string with a timestamp." |
| 2684 | # expression: "'New message received at ' + string(document.create_time)" |
| 2685 | # |
| 2686 | # The exact variables and functions that may be referenced within an expression |
| 2687 | # are determined by the service that evaluates it. See the service |
| 2688 | # documentation for additional information. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2689 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 2690 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2691 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 2692 | # reporting, e.g. a file name and a position in the file. |
| 2693 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 2694 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 2695 | # expression. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2696 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 2697 | # syntax. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2698 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2699 | "role": "A String", # Role that is assigned to `members`. |
| 2700 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2701 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 2702 | # `members` can have the following values: |
| 2703 | # |
| 2704 | # * `allUsers`: A special identifier that represents anyone who is |
| 2705 | # on the internet; with or without a Google account. |
| 2706 | # |
| 2707 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 2708 | # who is authenticated with a Google account or a service account. |
| 2709 | # |
| 2710 | # * `user:{emailid}`: An email address that represents a specific Google |
| 2711 | # account. For example, `alice@example.com` . |
| 2712 | # |
| 2713 | # |
| 2714 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 2715 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 2716 | # |
| 2717 | # * `group:{emailid}`: An email address that represents a Google group. |
| 2718 | # For example, `admins@example.com`. |
| 2719 | # |
| 2720 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 2721 | # identifier) representing a user that has been recently deleted. For |
| 2722 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 2723 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 2724 | # retains the role in the binding. |
| 2725 | # |
| 2726 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 2727 | # unique identifier) representing a service account that has been recently |
| 2728 | # deleted. For example, |
| 2729 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 2730 | # If the service account is undeleted, this value reverts to |
| 2731 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 2732 | # role in the binding. |
| 2733 | # |
| 2734 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 2735 | # identifier) representing a Google group that has been recently |
| 2736 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 2737 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 2738 | # recovered group retains the role in the binding. |
| 2739 | # |
| 2740 | # |
| 2741 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 2742 | # users of that domain. For example, `google.com` or `example.com`. |
| 2743 | # |
| 2744 | "A String", |
| 2745 | ], |
| 2746 | }, |
| 2747 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2748 | "version": 42, # Specifies the format of the policy. |
| 2749 | # |
| 2750 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 2751 | # are rejected. |
| 2752 | # |
| 2753 | # Any operation that affects conditional role bindings must specify version |
| 2754 | # `3`. This requirement applies to the following operations: |
| 2755 | # |
| 2756 | # * Getting a policy that includes a conditional role binding |
| 2757 | # * Adding a conditional role binding to a policy |
| 2758 | # * Changing a conditional role binding in a policy |
| 2759 | # * Removing any role binding, with or without a condition, from a policy |
| 2760 | # that includes conditions |
| 2761 | # |
| 2762 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 2763 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 2764 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 2765 | # the conditions in the version `3` policy are lost. |
| 2766 | # |
| 2767 | # If a policy does not include any conditions, operations on that policy may |
| 2768 | # specify any valid version or leave the field unset. |
| 2769 | # |
| 2770 | # To learn which resources support conditions in their IAM policies, see the |
| 2771 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2772 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 2773 | { # Specifies the audit configuration for a service. |
| 2774 | # The configuration determines which permission types are logged, and what |
| 2775 | # identities, if any, are exempted from logging. |
| 2776 | # An AuditConfig must have one or more AuditLogConfigs. |
| 2777 | # |
| 2778 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 2779 | # the union of the two AuditConfigs is used for that service: the log_types |
| 2780 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 2781 | # AuditLogConfig are exempted. |
| 2782 | # |
| 2783 | # Example Policy with multiple AuditConfigs: |
| 2784 | # |
| 2785 | # { |
| 2786 | # "audit_configs": [ |
| 2787 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2788 | # "service": "allServices", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2789 | # "audit_log_configs": [ |
| 2790 | # { |
| 2791 | # "log_type": "DATA_READ", |
| 2792 | # "exempted_members": [ |
| 2793 | # "user:jose@example.com" |
| 2794 | # ] |
| 2795 | # }, |
| 2796 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2797 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2798 | # }, |
| 2799 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2800 | # "log_type": "ADMIN_READ" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2801 | # } |
| 2802 | # ] |
| 2803 | # }, |
| 2804 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2805 | # "service": "sampleservice.googleapis.com", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2806 | # "audit_log_configs": [ |
| 2807 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2808 | # "log_type": "DATA_READ" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2809 | # }, |
| 2810 | # { |
| 2811 | # "log_type": "DATA_WRITE", |
| 2812 | # "exempted_members": [ |
| 2813 | # "user:aliya@example.com" |
| 2814 | # ] |
| 2815 | # } |
| 2816 | # ] |
| 2817 | # } |
| 2818 | # ] |
| 2819 | # } |
| 2820 | # |
| 2821 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 2822 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 2823 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2824 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 2825 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 2826 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2827 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 2828 | { # Provides the configuration for logging a type of permissions. |
| 2829 | # Example: |
| 2830 | # |
| 2831 | # { |
| 2832 | # "audit_log_configs": [ |
| 2833 | # { |
| 2834 | # "log_type": "DATA_READ", |
| 2835 | # "exempted_members": [ |
| 2836 | # "user:jose@example.com" |
| 2837 | # ] |
| 2838 | # }, |
| 2839 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2840 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2841 | # } |
| 2842 | # ] |
| 2843 | # } |
| 2844 | # |
| 2845 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 2846 | # jose@example.com from DATA_READ logging. |
| 2847 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 2848 | # permission. |
| 2849 | # Follows the same format of Binding.members. |
| 2850 | "A String", |
| 2851 | ], |
| 2852 | "logType": "A String", # The log type that this config enables. |
| 2853 | }, |
| 2854 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2855 | }, |
| 2856 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2857 | }</pre> |
| 2858 | </div> |
| 2859 | |
| 2860 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2861 | <code class="details" id="list">list(pageToken=None, consumerId=None, producerProjectId=None, pageSize=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2862 | <pre>Lists managed services. |
| 2863 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2864 | Returns all public services. For authenticated users, also returns all |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2865 | services the calling user has "servicemanagement.services.get" permission |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2866 | for. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2867 | |
| 2868 | **BETA:** If the caller specifies the `consumer_id`, it returns only the |
| 2869 | services enabled on the consumer. The `consumer_id` must have the format |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2870 | of "project:{PROJECT-ID}". |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2871 | |
| 2872 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2873 | pageToken: string, Token identifying which result to start with; returned by a previous list |
| 2874 | call. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2875 | consumerId: string, Include services consumed by the specified consumer. |
| 2876 | |
| 2877 | The Google Service Management implementation accepts the following |
| 2878 | forms: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2879 | - project:<project_id> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2880 | producerProjectId: string, Include services produced by the specified project. |
| 2881 | pageSize: integer, The max number of items to include in the response list. Page size is 50 |
| 2882 | if not specified. Maximum value is 100. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2883 | x__xgafv: string, V1 error format. |
| 2884 | Allowed values |
| 2885 | 1 - v1 error format |
| 2886 | 2 - v2 error format |
| 2887 | |
| 2888 | Returns: |
| 2889 | An object of the form: |
| 2890 | |
| 2891 | { # Response message for `ListServices` method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2892 | "nextPageToken": "A String", # Token that can be passed to `ListServices` to resume a paginated query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2893 | "services": [ # The returned services will only have the name field set. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2894 | { # The full representation of a Service that is managed by |
| 2895 | # Google Service Management. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2896 | "serviceName": "A String", # The name of the service. See the [overview](/service-management/overview) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2897 | # for naming requirements. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 2898 | "producerProjectId": "A String", # ID of the project that produces and owns this service. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2899 | }, |
| 2900 | ], |
| 2901 | }</pre> |
| 2902 | </div> |
| 2903 | |
| 2904 | <div class="method"> |
| 2905 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 2906 | <pre>Retrieves the next page of results. |
| 2907 | |
| 2908 | Args: |
| 2909 | previous_request: The request for the previous page. (required) |
| 2910 | previous_response: The response from the request for the previous page. (required) |
| 2911 | |
| 2912 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2913 | A request object that you can call 'execute()' on to request the next |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2914 | page. Returns None if there are no more items in the collection. |
| 2915 | </pre> |
| 2916 | </div> |
| 2917 | |
| 2918 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2919 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2920 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 2921 | existing policy. |
| 2922 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2923 | Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2924 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2925 | Args: |
| 2926 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 2927 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2928 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2929 | The object takes the form of: |
| 2930 | |
| 2931 | { # Request message for `SetIamPolicy` method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 2932 | "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 2933 | # the fields in the mask will be modified. If no mask is provided, the |
| 2934 | # following default mask is used: |
| 2935 | # |
| 2936 | # `paths: "bindings, etag"` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2937 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2938 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 2939 | # valid policy but certain Cloud Platform services (such as Projects) |
| 2940 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2941 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2942 | # |
| 2943 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2944 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 2945 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 2946 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 2947 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 2948 | # custom role. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2949 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2950 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 2951 | # `condition`, which is a logical expression that allows access to a resource |
| 2952 | # only if the expression evaluates to `true`. A condition can add constraints |
| 2953 | # based on attributes of the request, the resource, or both. To learn which |
| 2954 | # resources support conditions in their IAM policies, see the |
| 2955 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2956 | # |
| 2957 | # **JSON example:** |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2958 | # |
| 2959 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2960 | # "bindings": [ |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2961 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2962 | # "role": "roles/resourcemanager.organizationAdmin", |
| 2963 | # "members": [ |
| 2964 | # "user:mike@example.com", |
| 2965 | # "group:admins@example.com", |
| 2966 | # "domain:google.com", |
| 2967 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2968 | # ] |
| 2969 | # }, |
| 2970 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2971 | # "role": "roles/resourcemanager.organizationViewer", |
| 2972 | # "members": [ |
| 2973 | # "user:eve@example.com" |
| 2974 | # ], |
| 2975 | # "condition": { |
| 2976 | # "title": "expirable access", |
| 2977 | # "description": "Does not grant access after Sep 2020", |
| 2978 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2979 | # } |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2980 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2981 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2982 | # "etag": "BwWWja0YfJA=", |
| 2983 | # "version": 3 |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 2984 | # } |
| 2985 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2986 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2987 | # |
| 2988 | # bindings: |
| 2989 | # - members: |
| 2990 | # - user:mike@example.com |
| 2991 | # - group:admins@example.com |
| 2992 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2993 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 2994 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2995 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2996 | # - user:eve@example.com |
| 2997 | # role: roles/resourcemanager.organizationViewer |
| 2998 | # condition: |
| 2999 | # title: expirable access |
| 3000 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3001 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3002 | # - etag: BwWWja0YfJA= |
| 3003 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3004 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3005 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3006 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3007 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 3008 | # prevent simultaneous updates of a policy from overwriting each other. |
| 3009 | # It is strongly suggested that systems make use of the `etag` in the |
| 3010 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 3011 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 3012 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 3013 | # ensure that their change will be applied to the same version of the policy. |
| 3014 | # |
| 3015 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 3016 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 3017 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 3018 | # the conditions in the version `3` policy are lost. |
| 3019 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 3020 | # `condition` that determines how and when the `bindings` are applied. Each |
| 3021 | # of the `bindings` must contain at least one member. |
| 3022 | { # Associates `members` with a `role`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3023 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 3024 | # |
| 3025 | # If the condition evaluates to `true`, then this binding applies to the |
| 3026 | # current request. |
| 3027 | # |
| 3028 | # If the condition evaluates to `false`, then this binding does not apply to |
| 3029 | # the current request. However, a different role binding might grant the same |
| 3030 | # role to one or more of the members in this binding. |
| 3031 | # |
| 3032 | # To learn which resources support conditions in their IAM policies, see the |
| 3033 | # [IAM |
| 3034 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 3035 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 3036 | # are documented at https://github.com/google/cel-spec. |
| 3037 | # |
| 3038 | # Example (Comparison): |
| 3039 | # |
| 3040 | # title: "Summary size limit" |
| 3041 | # description: "Determines if a summary is less than 100 chars" |
| 3042 | # expression: "document.summary.size() < 100" |
| 3043 | # |
| 3044 | # Example (Equality): |
| 3045 | # |
| 3046 | # title: "Requestor is owner" |
| 3047 | # description: "Determines if requestor is the document owner" |
| 3048 | # expression: "document.owner == request.auth.claims.email" |
| 3049 | # |
| 3050 | # Example (Logic): |
| 3051 | # |
| 3052 | # title: "Public documents" |
| 3053 | # description: "Determine whether the document should be publicly visible" |
| 3054 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 3055 | # |
| 3056 | # Example (Data Manipulation): |
| 3057 | # |
| 3058 | # title: "Notification string" |
| 3059 | # description: "Create a notification string with a timestamp." |
| 3060 | # expression: "'New message received at ' + string(document.create_time)" |
| 3061 | # |
| 3062 | # The exact variables and functions that may be referenced within an expression |
| 3063 | # are determined by the service that evaluates it. See the service |
| 3064 | # documentation for additional information. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3065 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 3066 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3067 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 3068 | # reporting, e.g. a file name and a position in the file. |
| 3069 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 3070 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 3071 | # expression. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3072 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 3073 | # syntax. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3074 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3075 | "role": "A String", # Role that is assigned to `members`. |
| 3076 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3077 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 3078 | # `members` can have the following values: |
| 3079 | # |
| 3080 | # * `allUsers`: A special identifier that represents anyone who is |
| 3081 | # on the internet; with or without a Google account. |
| 3082 | # |
| 3083 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 3084 | # who is authenticated with a Google account or a service account. |
| 3085 | # |
| 3086 | # * `user:{emailid}`: An email address that represents a specific Google |
| 3087 | # account. For example, `alice@example.com` . |
| 3088 | # |
| 3089 | # |
| 3090 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 3091 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 3092 | # |
| 3093 | # * `group:{emailid}`: An email address that represents a Google group. |
| 3094 | # For example, `admins@example.com`. |
| 3095 | # |
| 3096 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 3097 | # identifier) representing a user that has been recently deleted. For |
| 3098 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 3099 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 3100 | # retains the role in the binding. |
| 3101 | # |
| 3102 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 3103 | # unique identifier) representing a service account that has been recently |
| 3104 | # deleted. For example, |
| 3105 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 3106 | # If the service account is undeleted, this value reverts to |
| 3107 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 3108 | # role in the binding. |
| 3109 | # |
| 3110 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 3111 | # identifier) representing a Google group that has been recently |
| 3112 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 3113 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 3114 | # recovered group retains the role in the binding. |
| 3115 | # |
| 3116 | # |
| 3117 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 3118 | # users of that domain. For example, `google.com` or `example.com`. |
| 3119 | # |
| 3120 | "A String", |
| 3121 | ], |
| 3122 | }, |
| 3123 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3124 | "version": 42, # Specifies the format of the policy. |
| 3125 | # |
| 3126 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 3127 | # are rejected. |
| 3128 | # |
| 3129 | # Any operation that affects conditional role bindings must specify version |
| 3130 | # `3`. This requirement applies to the following operations: |
| 3131 | # |
| 3132 | # * Getting a policy that includes a conditional role binding |
| 3133 | # * Adding a conditional role binding to a policy |
| 3134 | # * Changing a conditional role binding in a policy |
| 3135 | # * Removing any role binding, with or without a condition, from a policy |
| 3136 | # that includes conditions |
| 3137 | # |
| 3138 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 3139 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 3140 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 3141 | # the conditions in the version `3` policy are lost. |
| 3142 | # |
| 3143 | # If a policy does not include any conditions, operations on that policy may |
| 3144 | # specify any valid version or leave the field unset. |
| 3145 | # |
| 3146 | # To learn which resources support conditions in their IAM policies, see the |
| 3147 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3148 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 3149 | { # Specifies the audit configuration for a service. |
| 3150 | # The configuration determines which permission types are logged, and what |
| 3151 | # identities, if any, are exempted from logging. |
| 3152 | # An AuditConfig must have one or more AuditLogConfigs. |
| 3153 | # |
| 3154 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 3155 | # the union of the two AuditConfigs is used for that service: the log_types |
| 3156 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 3157 | # AuditLogConfig are exempted. |
| 3158 | # |
| 3159 | # Example Policy with multiple AuditConfigs: |
| 3160 | # |
| 3161 | # { |
| 3162 | # "audit_configs": [ |
| 3163 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3164 | # "service": "allServices", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3165 | # "audit_log_configs": [ |
| 3166 | # { |
| 3167 | # "log_type": "DATA_READ", |
| 3168 | # "exempted_members": [ |
| 3169 | # "user:jose@example.com" |
| 3170 | # ] |
| 3171 | # }, |
| 3172 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3173 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3174 | # }, |
| 3175 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3176 | # "log_type": "ADMIN_READ" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3177 | # } |
| 3178 | # ] |
| 3179 | # }, |
| 3180 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3181 | # "service": "sampleservice.googleapis.com", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3182 | # "audit_log_configs": [ |
| 3183 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3184 | # "log_type": "DATA_READ" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3185 | # }, |
| 3186 | # { |
| 3187 | # "log_type": "DATA_WRITE", |
| 3188 | # "exempted_members": [ |
| 3189 | # "user:aliya@example.com" |
| 3190 | # ] |
| 3191 | # } |
| 3192 | # ] |
| 3193 | # } |
| 3194 | # ] |
| 3195 | # } |
| 3196 | # |
| 3197 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 3198 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 3199 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3200 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 3201 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 3202 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3203 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 3204 | { # Provides the configuration for logging a type of permissions. |
| 3205 | # Example: |
| 3206 | # |
| 3207 | # { |
| 3208 | # "audit_log_configs": [ |
| 3209 | # { |
| 3210 | # "log_type": "DATA_READ", |
| 3211 | # "exempted_members": [ |
| 3212 | # "user:jose@example.com" |
| 3213 | # ] |
| 3214 | # }, |
| 3215 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3216 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3217 | # } |
| 3218 | # ] |
| 3219 | # } |
| 3220 | # |
| 3221 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 3222 | # jose@example.com from DATA_READ logging. |
| 3223 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 3224 | # permission. |
| 3225 | # Follows the same format of Binding.members. |
| 3226 | "A String", |
| 3227 | ], |
| 3228 | "logType": "A String", # The log type that this config enables. |
| 3229 | }, |
| 3230 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3231 | }, |
| 3232 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3233 | }, |
| 3234 | } |
| 3235 | |
| 3236 | x__xgafv: string, V1 error format. |
| 3237 | Allowed values |
| 3238 | 1 - v1 error format |
| 3239 | 2 - v2 error format |
| 3240 | |
| 3241 | Returns: |
| 3242 | An object of the form: |
| 3243 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3244 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 3245 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3246 | # |
| 3247 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3248 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 3249 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 3250 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 3251 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 3252 | # custom role. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3253 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3254 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 3255 | # `condition`, which is a logical expression that allows access to a resource |
| 3256 | # only if the expression evaluates to `true`. A condition can add constraints |
| 3257 | # based on attributes of the request, the resource, or both. To learn which |
| 3258 | # resources support conditions in their IAM policies, see the |
| 3259 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3260 | # |
| 3261 | # **JSON example:** |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3262 | # |
| 3263 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3264 | # "bindings": [ |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3265 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3266 | # "role": "roles/resourcemanager.organizationAdmin", |
| 3267 | # "members": [ |
| 3268 | # "user:mike@example.com", |
| 3269 | # "group:admins@example.com", |
| 3270 | # "domain:google.com", |
| 3271 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3272 | # ] |
| 3273 | # }, |
| 3274 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3275 | # "role": "roles/resourcemanager.organizationViewer", |
| 3276 | # "members": [ |
| 3277 | # "user:eve@example.com" |
| 3278 | # ], |
| 3279 | # "condition": { |
| 3280 | # "title": "expirable access", |
| 3281 | # "description": "Does not grant access after Sep 2020", |
| 3282 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3283 | # } |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3284 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3285 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3286 | # "etag": "BwWWja0YfJA=", |
| 3287 | # "version": 3 |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3288 | # } |
| 3289 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3290 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3291 | # |
| 3292 | # bindings: |
| 3293 | # - members: |
| 3294 | # - user:mike@example.com |
| 3295 | # - group:admins@example.com |
| 3296 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3297 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 3298 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3299 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3300 | # - user:eve@example.com |
| 3301 | # role: roles/resourcemanager.organizationViewer |
| 3302 | # condition: |
| 3303 | # title: expirable access |
| 3304 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3305 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3306 | # - etag: BwWWja0YfJA= |
| 3307 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3308 | # |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3309 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3310 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3311 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 3312 | # prevent simultaneous updates of a policy from overwriting each other. |
| 3313 | # It is strongly suggested that systems make use of the `etag` in the |
| 3314 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 3315 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 3316 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 3317 | # ensure that their change will be applied to the same version of the policy. |
| 3318 | # |
| 3319 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 3320 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 3321 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 3322 | # the conditions in the version `3` policy are lost. |
| 3323 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 3324 | # `condition` that determines how and when the `bindings` are applied. Each |
| 3325 | # of the `bindings` must contain at least one member. |
| 3326 | { # Associates `members` with a `role`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3327 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 3328 | # |
| 3329 | # If the condition evaluates to `true`, then this binding applies to the |
| 3330 | # current request. |
| 3331 | # |
| 3332 | # If the condition evaluates to `false`, then this binding does not apply to |
| 3333 | # the current request. However, a different role binding might grant the same |
| 3334 | # role to one or more of the members in this binding. |
| 3335 | # |
| 3336 | # To learn which resources support conditions in their IAM policies, see the |
| 3337 | # [IAM |
| 3338 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 3339 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 3340 | # are documented at https://github.com/google/cel-spec. |
| 3341 | # |
| 3342 | # Example (Comparison): |
| 3343 | # |
| 3344 | # title: "Summary size limit" |
| 3345 | # description: "Determines if a summary is less than 100 chars" |
| 3346 | # expression: "document.summary.size() < 100" |
| 3347 | # |
| 3348 | # Example (Equality): |
| 3349 | # |
| 3350 | # title: "Requestor is owner" |
| 3351 | # description: "Determines if requestor is the document owner" |
| 3352 | # expression: "document.owner == request.auth.claims.email" |
| 3353 | # |
| 3354 | # Example (Logic): |
| 3355 | # |
| 3356 | # title: "Public documents" |
| 3357 | # description: "Determine whether the document should be publicly visible" |
| 3358 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 3359 | # |
| 3360 | # Example (Data Manipulation): |
| 3361 | # |
| 3362 | # title: "Notification string" |
| 3363 | # description: "Create a notification string with a timestamp." |
| 3364 | # expression: "'New message received at ' + string(document.create_time)" |
| 3365 | # |
| 3366 | # The exact variables and functions that may be referenced within an expression |
| 3367 | # are determined by the service that evaluates it. See the service |
| 3368 | # documentation for additional information. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3369 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 3370 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3371 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 3372 | # reporting, e.g. a file name and a position in the file. |
| 3373 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 3374 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 3375 | # expression. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3376 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 3377 | # syntax. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3378 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3379 | "role": "A String", # Role that is assigned to `members`. |
| 3380 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3381 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 3382 | # `members` can have the following values: |
| 3383 | # |
| 3384 | # * `allUsers`: A special identifier that represents anyone who is |
| 3385 | # on the internet; with or without a Google account. |
| 3386 | # |
| 3387 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 3388 | # who is authenticated with a Google account or a service account. |
| 3389 | # |
| 3390 | # * `user:{emailid}`: An email address that represents a specific Google |
| 3391 | # account. For example, `alice@example.com` . |
| 3392 | # |
| 3393 | # |
| 3394 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 3395 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 3396 | # |
| 3397 | # * `group:{emailid}`: An email address that represents a Google group. |
| 3398 | # For example, `admins@example.com`. |
| 3399 | # |
| 3400 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 3401 | # identifier) representing a user that has been recently deleted. For |
| 3402 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 3403 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 3404 | # retains the role in the binding. |
| 3405 | # |
| 3406 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 3407 | # unique identifier) representing a service account that has been recently |
| 3408 | # deleted. For example, |
| 3409 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 3410 | # If the service account is undeleted, this value reverts to |
| 3411 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 3412 | # role in the binding. |
| 3413 | # |
| 3414 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 3415 | # identifier) representing a Google group that has been recently |
| 3416 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 3417 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 3418 | # recovered group retains the role in the binding. |
| 3419 | # |
| 3420 | # |
| 3421 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 3422 | # users of that domain. For example, `google.com` or `example.com`. |
| 3423 | # |
| 3424 | "A String", |
| 3425 | ], |
| 3426 | }, |
| 3427 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3428 | "version": 42, # Specifies the format of the policy. |
| 3429 | # |
| 3430 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 3431 | # are rejected. |
| 3432 | # |
| 3433 | # Any operation that affects conditional role bindings must specify version |
| 3434 | # `3`. This requirement applies to the following operations: |
| 3435 | # |
| 3436 | # * Getting a policy that includes a conditional role binding |
| 3437 | # * Adding a conditional role binding to a policy |
| 3438 | # * Changing a conditional role binding in a policy |
| 3439 | # * Removing any role binding, with or without a condition, from a policy |
| 3440 | # that includes conditions |
| 3441 | # |
| 3442 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 3443 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 3444 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 3445 | # the conditions in the version `3` policy are lost. |
| 3446 | # |
| 3447 | # If a policy does not include any conditions, operations on that policy may |
| 3448 | # specify any valid version or leave the field unset. |
| 3449 | # |
| 3450 | # To learn which resources support conditions in their IAM policies, see the |
| 3451 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3452 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 3453 | { # Specifies the audit configuration for a service. |
| 3454 | # The configuration determines which permission types are logged, and what |
| 3455 | # identities, if any, are exempted from logging. |
| 3456 | # An AuditConfig must have one or more AuditLogConfigs. |
| 3457 | # |
| 3458 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 3459 | # the union of the two AuditConfigs is used for that service: the log_types |
| 3460 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 3461 | # AuditLogConfig are exempted. |
| 3462 | # |
| 3463 | # Example Policy with multiple AuditConfigs: |
| 3464 | # |
| 3465 | # { |
| 3466 | # "audit_configs": [ |
| 3467 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3468 | # "service": "allServices", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3469 | # "audit_log_configs": [ |
| 3470 | # { |
| 3471 | # "log_type": "DATA_READ", |
| 3472 | # "exempted_members": [ |
| 3473 | # "user:jose@example.com" |
| 3474 | # ] |
| 3475 | # }, |
| 3476 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3477 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3478 | # }, |
| 3479 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3480 | # "log_type": "ADMIN_READ" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3481 | # } |
| 3482 | # ] |
| 3483 | # }, |
| 3484 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3485 | # "service": "sampleservice.googleapis.com", |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3486 | # "audit_log_configs": [ |
| 3487 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3488 | # "log_type": "DATA_READ" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3489 | # }, |
| 3490 | # { |
| 3491 | # "log_type": "DATA_WRITE", |
| 3492 | # "exempted_members": [ |
| 3493 | # "user:aliya@example.com" |
| 3494 | # ] |
| 3495 | # } |
| 3496 | # ] |
| 3497 | # } |
| 3498 | # ] |
| 3499 | # } |
| 3500 | # |
| 3501 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 3502 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 3503 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3504 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 3505 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 3506 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3507 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 3508 | { # Provides the configuration for logging a type of permissions. |
| 3509 | # Example: |
| 3510 | # |
| 3511 | # { |
| 3512 | # "audit_log_configs": [ |
| 3513 | # { |
| 3514 | # "log_type": "DATA_READ", |
| 3515 | # "exempted_members": [ |
| 3516 | # "user:jose@example.com" |
| 3517 | # ] |
| 3518 | # }, |
| 3519 | # { |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3520 | # "log_type": "DATA_WRITE" |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3521 | # } |
| 3522 | # ] |
| 3523 | # } |
| 3524 | # |
| 3525 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 3526 | # jose@example.com from DATA_READ logging. |
| 3527 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 3528 | # permission. |
| 3529 | # Follows the same format of Binding.members. |
| 3530 | "A String", |
| 3531 | ], |
| 3532 | "logType": "A String", # The log type that this config enables. |
| 3533 | }, |
| 3534 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3535 | }, |
| 3536 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3537 | }</pre> |
| 3538 | </div> |
| 3539 | |
| 3540 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3541 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3542 | <pre>Returns permissions that a caller has on the specified resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3543 | If the resource does not exist, this will return an empty set of |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3544 | permissions, not a `NOT_FOUND` error. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3545 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 3546 | Note: This operation is designed to be used for building permission-aware |
| 3547 | UIs and command-line tools, not for authorization checking. This operation |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3548 | may "fail open" without warning. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 3549 | |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3550 | Args: |
| 3551 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 3552 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3553 | body: object, The request body. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3554 | The object takes the form of: |
| 3555 | |
| 3556 | { # Request message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3557 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 3558 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3559 | # information see |
| 3560 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3561 | "A String", |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3562 | ], |
| 3563 | } |
| 3564 | |
| 3565 | x__xgafv: string, V1 error format. |
| 3566 | Allowed values |
| 3567 | 1 - v1 error format |
| 3568 | 2 - v2 error format |
| 3569 | |
| 3570 | Returns: |
| 3571 | An object of the form: |
| 3572 | |
| 3573 | { # Response message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3574 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3575 | # allowed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3576 | "A String", |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3577 | ], |
| 3578 | }</pre> |
| 3579 | </div> |
| 3580 | |
| 3581 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 3582 | <code class="details" id="undelete">undelete(serviceName, x__xgafv=None)</code> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3583 | <pre>Revives a previously deleted managed service. The method restores the |
| 3584 | service using the configuration at the time the service was deleted. |
| 3585 | The target service must exist and must have been deleted within the |
| 3586 | last 30 days. |
| 3587 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3588 | Operation<response: UndeleteServiceResponse> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3589 | |
| 3590 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3591 | serviceName: string, Required. The name of the service. See the [overview](/service-management/overview) |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3592 | for naming requirements. For example: `example.googleapis.com`. (required) |
| 3593 | x__xgafv: string, V1 error format. |
| 3594 | Allowed values |
| 3595 | 1 - v1 error format |
| 3596 | 2 - v2 error format |
| 3597 | |
| 3598 | Returns: |
| 3599 | An object of the form: |
| 3600 | |
| 3601 | { # This resource represents a long-running operation that is the result of a |
| 3602 | # network API call. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3603 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 3604 | # different programming environments, including REST APIs and RPC APIs. It is |
| 3605 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 3606 | # three pieces of data: error code, error message, and error details. |
| 3607 | # |
| 3608 | # You can find out more about this error model and how to work with it in the |
| 3609 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3610 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 3611 | # message types for APIs to use. |
| 3612 | { |
| 3613 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 3614 | }, |
| 3615 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3616 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 3617 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 3618 | # user-facing error message should be localized and sent in the |
| 3619 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 3620 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3621 | "metadata": { # Service-specific metadata associated with the operation. It typically |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 3622 | # contains progress information and common metadata such as create time. |
| 3623 | # Some services might not provide such metadata. Any method that returns a |
| 3624 | # long-running operation should document the metadata type, if any. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3625 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 3626 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3627 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3628 | # If `true`, the operation is completed, and either `error` or `response` is |
| 3629 | # available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3630 | "response": { # The normal response of the operation in case of success. If the original |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3631 | # method returns no data on success, such as `Delete`, the response is |
| 3632 | # `google.protobuf.Empty`. If the original method is standard |
| 3633 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 3634 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 3635 | # is the original method name. For example, if the original method name |
| 3636 | # is `TakeSnapshot()`, the inferred response type is |
| 3637 | # `TakeSnapshotResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3638 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3639 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 3640 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 3641 | # originally returns it. If you use the default HTTP mapping, the |
| 3642 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 3643 | }</pre> |
| 3644 | </div> |
| 3645 | |
| 3646 | </body></html> |