Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -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 | |
| 75 | <h1><a href="cloudiot_v1.html">Cloud IoT API</a> . <a href="cloudiot_v1.projects.html">projects</a> . <a href="cloudiot_v1.projects.locations.html">locations</a> . <a href="cloudiot_v1.projects.locations.registries.html">registries</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="cloudiot_v1.projects.locations.registries.devices.html">devices()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the devices Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
| 83 | <code><a href="cloudiot_v1.projects.locations.registries.groups.html">groups()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the groups Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 88 | <code><a href="#bindDeviceToGateway">bindDeviceToGateway(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 89 | <p class="firstline">Associates the device with the gateway.</p> |
| 90 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 91 | <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 92 | <p class="firstline">Creates a device registry that contains devices.</p> |
| 93 | <p class="toc_element"> |
| 94 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 95 | <p class="firstline">Deletes a device registry configuration.</p> |
| 96 | <p class="toc_element"> |
| 97 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 98 | <p class="firstline">Gets a device registry configuration.</p> |
| 99 | <p class="toc_element"> |
| 100 | <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
| 101 | <p class="firstline">Gets the access control policy for a resource.</p> |
| 102 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 103 | <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 104 | <p class="firstline">Lists device registries.</p> |
| 105 | <p class="toc_element"> |
| 106 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 107 | <p class="firstline">Retrieves the next page of results.</p> |
| 108 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | <p class="firstline">Updates a device registry configuration.</p> |
| 111 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 113 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
| 114 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 115 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 116 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 117 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 118 | <code><a href="#unbindDeviceFromGateway">unbindDeviceFromGateway(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 119 | <p class="firstline">Deletes the association between the device and the gateway.</p> |
| 120 | <h3>Method Details</h3> |
| 121 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 122 | <code class="details" id="bindDeviceToGateway">bindDeviceToGateway(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 123 | <pre>Associates the device with the gateway. |
| 124 | |
| 125 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | parent: string, Required. The name of the registry. For example, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 127 | `projects/example-project/locations/us-central1/registries/my-registry`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 128 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 129 | The object takes the form of: |
| 130 | |
| 131 | { # Request for `BindDeviceToGateway`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 132 | "deviceId": "A String", # Required. The device to associate with the specified gateway. The value of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 133 | # `device_id` can be either the device numeric ID or the user-defined device |
| 134 | # identifier. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 135 | "gatewayId": "A String", # Required. The value of `gateway_id` can be either the device numeric ID or the |
| 136 | # user-defined device identifier. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | x__xgafv: string, V1 error format. |
| 140 | Allowed values |
| 141 | 1 - v1 error format |
| 142 | 2 - v2 error format |
| 143 | |
| 144 | Returns: |
| 145 | An object of the form: |
| 146 | |
| 147 | { # Response for `BindDeviceToGateway`. |
| 148 | }</pre> |
| 149 | </div> |
| 150 | |
| 151 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 152 | <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 153 | <pre>Creates a device registry that contains devices. |
| 154 | |
| 155 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 156 | parent: string, Required. The project and cloud region where this device registry must be created. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 157 | For example, `projects/example-project/locations/us-central1`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 158 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 159 | The object takes the form of: |
| 160 | |
| 161 | { # A container for a group of devices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 162 | "credentials": [ # The credentials used to verify the device credentials. No more than 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 163 | # credentials can be bound to a single registry at a time. The verification |
| 164 | # process occurs at the time of device creation or update. If this field is |
| 165 | # empty, no verification is performed. Otherwise, the credentials of a newly |
| 166 | # created device or added credentials of an updated device should be signed |
| 167 | # with one of these registry credentials. |
| 168 | # |
| 169 | # Note, however, that existing devices will never be affected by |
| 170 | # modifications to this list of credentials: after a device has been |
| 171 | # successfully created in a registry, it should be able to connect even if |
| 172 | # its registry credentials are revoked, deleted, or modified. |
| 173 | { # A server-stored registry credential used to validate device credentials. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 174 | "publicKeyCertificate": { # A public key certificate format and data. # A public key certificate used to verify the device credentials. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 175 | "certificate": "A String", # The certificate data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 176 | "x509Details": { # Details of an X.509 certificate. For informational purposes only. # [Output only] The certificate details. Used only for X.509 certificates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 177 | "signatureAlgorithm": "A String", # The algorithm used to sign the certificate. |
| 178 | "startTime": "A String", # The time the certificate becomes valid. |
| 179 | "expiryTime": "A String", # The time the certificate becomes invalid. |
| 180 | "subject": "A String", # The entity the certificate and public key belong to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 181 | "issuer": "A String", # The entity that signed the certificate. |
| 182 | "publicKeyType": "A String", # The type of public key in the certificate. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 183 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 184 | "format": "A String", # The certificate format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 185 | }, |
| 186 | }, |
| 187 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 188 | "name": "A String", # The resource path name. For example, |
| 189 | # `projects/example-project/locations/us-central1/registries/my-registry`. |
| 190 | "eventNotificationConfigs": [ # The configuration for notification of telemetry events received from the |
| 191 | # device. All telemetry events that were successfully published by the |
| 192 | # device and acknowledged by Cloud IoT Core are guaranteed to be |
| 193 | # delivered to Cloud Pub/Sub. If multiple configurations match a message, |
| 194 | # only the first matching configuration is used. If you try to publish a |
| 195 | # device telemetry event using MQTT without specifying a Cloud Pub/Sub topic |
| 196 | # for the device's registry, the connection closes automatically. If you try |
| 197 | # to do so using an HTTP connection, an error is returned. Up to 10 |
| 198 | # configurations may be provided. |
| 199 | { # The configuration for forwarding telemetry events. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 200 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 201 | # `projects/myProject/topics/deviceEvents`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 202 | "subfolderMatches": "A String", # If the subfolder name matches this string exactly, this configuration will |
| 203 | # be used. The string must not include the leading '/' character. If empty, |
| 204 | # all strings are matched. This field is used only for telemetry events; |
| 205 | # subfolders are not supported for state changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 206 | }, |
| 207 | ], |
| 208 | "logLevel": "A String", # **Beta Feature** |
| 209 | # |
| 210 | # The default logging verbosity for activity from devices in this registry. |
| 211 | # The verbosity level can be overridden by Device.log_level. |
| 212 | "httpConfig": { # The configuration of the HTTP bridge for a device registry. # The DeviceService (HTTP) configuration for this device registry. |
| 213 | "httpEnabledState": "A String", # If enabled, allows devices to use DeviceService via the HTTP protocol. |
| 214 | # Otherwise, any requests to DeviceService will fail for this registry. |
| 215 | }, |
| 216 | "id": "A String", # The identifier of this device registry. For example, `myRegistry`. |
| 217 | "mqttConfig": { # The configuration of MQTT for a device registry. # The MQTT configuration for this device registry. |
| 218 | "mqttEnabledState": "A String", # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT |
| 219 | # connections to this registry will fail. |
| 220 | }, |
| 221 | "stateNotificationConfig": { # The configuration for notification of new states received from the device. # The configuration for notification of new states received from the device. |
| 222 | # State updates are guaranteed to be stored in the state history, but |
| 223 | # notifications to Cloud Pub/Sub are not guaranteed. For example, if |
| 224 | # permissions are misconfigured or the specified topic doesn't exist, no |
| 225 | # notification will be published but the state will still be stored in Cloud |
| 226 | # IoT Core. |
| 227 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 228 | # `projects/myProject/topics/deviceEvents`. |
| 229 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 230 | } |
| 231 | |
| 232 | x__xgafv: string, V1 error format. |
| 233 | Allowed values |
| 234 | 1 - v1 error format |
| 235 | 2 - v2 error format |
| 236 | |
| 237 | Returns: |
| 238 | An object of the form: |
| 239 | |
| 240 | { # A container for a group of devices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 241 | "credentials": [ # The credentials used to verify the device credentials. No more than 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 242 | # credentials can be bound to a single registry at a time. The verification |
| 243 | # process occurs at the time of device creation or update. If this field is |
| 244 | # empty, no verification is performed. Otherwise, the credentials of a newly |
| 245 | # created device or added credentials of an updated device should be signed |
| 246 | # with one of these registry credentials. |
| 247 | # |
| 248 | # Note, however, that existing devices will never be affected by |
| 249 | # modifications to this list of credentials: after a device has been |
| 250 | # successfully created in a registry, it should be able to connect even if |
| 251 | # its registry credentials are revoked, deleted, or modified. |
| 252 | { # A server-stored registry credential used to validate device credentials. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 253 | "publicKeyCertificate": { # A public key certificate format and data. # A public key certificate used to verify the device credentials. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 254 | "certificate": "A String", # The certificate data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 255 | "x509Details": { # Details of an X.509 certificate. For informational purposes only. # [Output only] The certificate details. Used only for X.509 certificates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 256 | "signatureAlgorithm": "A String", # The algorithm used to sign the certificate. |
| 257 | "startTime": "A String", # The time the certificate becomes valid. |
| 258 | "expiryTime": "A String", # The time the certificate becomes invalid. |
| 259 | "subject": "A String", # The entity the certificate and public key belong to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 260 | "issuer": "A String", # The entity that signed the certificate. |
| 261 | "publicKeyType": "A String", # The type of public key in the certificate. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 262 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 263 | "format": "A String", # The certificate format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 264 | }, |
| 265 | }, |
| 266 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 267 | "name": "A String", # The resource path name. For example, |
| 268 | # `projects/example-project/locations/us-central1/registries/my-registry`. |
| 269 | "eventNotificationConfigs": [ # The configuration for notification of telemetry events received from the |
| 270 | # device. All telemetry events that were successfully published by the |
| 271 | # device and acknowledged by Cloud IoT Core are guaranteed to be |
| 272 | # delivered to Cloud Pub/Sub. If multiple configurations match a message, |
| 273 | # only the first matching configuration is used. If you try to publish a |
| 274 | # device telemetry event using MQTT without specifying a Cloud Pub/Sub topic |
| 275 | # for the device's registry, the connection closes automatically. If you try |
| 276 | # to do so using an HTTP connection, an error is returned. Up to 10 |
| 277 | # configurations may be provided. |
| 278 | { # The configuration for forwarding telemetry events. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 279 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 280 | # `projects/myProject/topics/deviceEvents`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 281 | "subfolderMatches": "A String", # If the subfolder name matches this string exactly, this configuration will |
| 282 | # be used. The string must not include the leading '/' character. If empty, |
| 283 | # all strings are matched. This field is used only for telemetry events; |
| 284 | # subfolders are not supported for state changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 285 | }, |
| 286 | ], |
| 287 | "logLevel": "A String", # **Beta Feature** |
| 288 | # |
| 289 | # The default logging verbosity for activity from devices in this registry. |
| 290 | # The verbosity level can be overridden by Device.log_level. |
| 291 | "httpConfig": { # The configuration of the HTTP bridge for a device registry. # The DeviceService (HTTP) configuration for this device registry. |
| 292 | "httpEnabledState": "A String", # If enabled, allows devices to use DeviceService via the HTTP protocol. |
| 293 | # Otherwise, any requests to DeviceService will fail for this registry. |
| 294 | }, |
| 295 | "id": "A String", # The identifier of this device registry. For example, `myRegistry`. |
| 296 | "mqttConfig": { # The configuration of MQTT for a device registry. # The MQTT configuration for this device registry. |
| 297 | "mqttEnabledState": "A String", # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT |
| 298 | # connections to this registry will fail. |
| 299 | }, |
| 300 | "stateNotificationConfig": { # The configuration for notification of new states received from the device. # The configuration for notification of new states received from the device. |
| 301 | # State updates are guaranteed to be stored in the state history, but |
| 302 | # notifications to Cloud Pub/Sub are not guaranteed. For example, if |
| 303 | # permissions are misconfigured or the specified topic doesn't exist, no |
| 304 | # notification will be published but the state will still be stored in Cloud |
| 305 | # IoT Core. |
| 306 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 307 | # `projects/myProject/topics/deviceEvents`. |
| 308 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 309 | }</pre> |
| 310 | </div> |
| 311 | |
| 312 | <div class="method"> |
| 313 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 314 | <pre>Deletes a device registry configuration. |
| 315 | |
| 316 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 317 | name: string, Required. The name of the device registry. For example, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 318 | `projects/example-project/locations/us-central1/registries/my-registry`. (required) |
| 319 | x__xgafv: string, V1 error format. |
| 320 | Allowed values |
| 321 | 1 - v1 error format |
| 322 | 2 - v2 error format |
| 323 | |
| 324 | Returns: |
| 325 | An object of the form: |
| 326 | |
| 327 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 328 | # empty messages in your APIs. A typical example is to use it as the request |
| 329 | # or the response type of an API method. For instance: |
| 330 | # |
| 331 | # service Foo { |
| 332 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 333 | # } |
| 334 | # |
| 335 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 336 | }</pre> |
| 337 | </div> |
| 338 | |
| 339 | <div class="method"> |
| 340 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 341 | <pre>Gets a device registry configuration. |
| 342 | |
| 343 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 344 | name: string, Required. The name of the device registry. For example, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 345 | `projects/example-project/locations/us-central1/registries/my-registry`. (required) |
| 346 | x__xgafv: string, V1 error format. |
| 347 | Allowed values |
| 348 | 1 - v1 error format |
| 349 | 2 - v2 error format |
| 350 | |
| 351 | Returns: |
| 352 | An object of the form: |
| 353 | |
| 354 | { # A container for a group of devices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 355 | "credentials": [ # The credentials used to verify the device credentials. No more than 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 356 | # credentials can be bound to a single registry at a time. The verification |
| 357 | # process occurs at the time of device creation or update. If this field is |
| 358 | # empty, no verification is performed. Otherwise, the credentials of a newly |
| 359 | # created device or added credentials of an updated device should be signed |
| 360 | # with one of these registry credentials. |
| 361 | # |
| 362 | # Note, however, that existing devices will never be affected by |
| 363 | # modifications to this list of credentials: after a device has been |
| 364 | # successfully created in a registry, it should be able to connect even if |
| 365 | # its registry credentials are revoked, deleted, or modified. |
| 366 | { # A server-stored registry credential used to validate device credentials. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 367 | "publicKeyCertificate": { # A public key certificate format and data. # A public key certificate used to verify the device credentials. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 368 | "certificate": "A String", # The certificate data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 369 | "x509Details": { # Details of an X.509 certificate. For informational purposes only. # [Output only] The certificate details. Used only for X.509 certificates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 370 | "signatureAlgorithm": "A String", # The algorithm used to sign the certificate. |
| 371 | "startTime": "A String", # The time the certificate becomes valid. |
| 372 | "expiryTime": "A String", # The time the certificate becomes invalid. |
| 373 | "subject": "A String", # The entity the certificate and public key belong to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 374 | "issuer": "A String", # The entity that signed the certificate. |
| 375 | "publicKeyType": "A String", # The type of public key in the certificate. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 376 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 377 | "format": "A String", # The certificate format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 378 | }, |
| 379 | }, |
| 380 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 381 | "name": "A String", # The resource path name. For example, |
| 382 | # `projects/example-project/locations/us-central1/registries/my-registry`. |
| 383 | "eventNotificationConfigs": [ # The configuration for notification of telemetry events received from the |
| 384 | # device. All telemetry events that were successfully published by the |
| 385 | # device and acknowledged by Cloud IoT Core are guaranteed to be |
| 386 | # delivered to Cloud Pub/Sub. If multiple configurations match a message, |
| 387 | # only the first matching configuration is used. If you try to publish a |
| 388 | # device telemetry event using MQTT without specifying a Cloud Pub/Sub topic |
| 389 | # for the device's registry, the connection closes automatically. If you try |
| 390 | # to do so using an HTTP connection, an error is returned. Up to 10 |
| 391 | # configurations may be provided. |
| 392 | { # The configuration for forwarding telemetry events. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 393 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 394 | # `projects/myProject/topics/deviceEvents`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 395 | "subfolderMatches": "A String", # If the subfolder name matches this string exactly, this configuration will |
| 396 | # be used. The string must not include the leading '/' character. If empty, |
| 397 | # all strings are matched. This field is used only for telemetry events; |
| 398 | # subfolders are not supported for state changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 399 | }, |
| 400 | ], |
| 401 | "logLevel": "A String", # **Beta Feature** |
| 402 | # |
| 403 | # The default logging verbosity for activity from devices in this registry. |
| 404 | # The verbosity level can be overridden by Device.log_level. |
| 405 | "httpConfig": { # The configuration of the HTTP bridge for a device registry. # The DeviceService (HTTP) configuration for this device registry. |
| 406 | "httpEnabledState": "A String", # If enabled, allows devices to use DeviceService via the HTTP protocol. |
| 407 | # Otherwise, any requests to DeviceService will fail for this registry. |
| 408 | }, |
| 409 | "id": "A String", # The identifier of this device registry. For example, `myRegistry`. |
| 410 | "mqttConfig": { # The configuration of MQTT for a device registry. # The MQTT configuration for this device registry. |
| 411 | "mqttEnabledState": "A String", # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT |
| 412 | # connections to this registry will fail. |
| 413 | }, |
| 414 | "stateNotificationConfig": { # The configuration for notification of new states received from the device. # The configuration for notification of new states received from the device. |
| 415 | # State updates are guaranteed to be stored in the state history, but |
| 416 | # notifications to Cloud Pub/Sub are not guaranteed. For example, if |
| 417 | # permissions are misconfigured or the specified topic doesn't exist, no |
| 418 | # notification will be published but the state will still be stored in Cloud |
| 419 | # IoT Core. |
| 420 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 421 | # `projects/myProject/topics/deviceEvents`. |
| 422 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | }</pre> |
| 424 | </div> |
| 425 | |
| 426 | <div class="method"> |
| 427 | <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code> |
| 428 | <pre>Gets the access control policy for a resource. |
| 429 | Returns an empty policy if the resource exists and does not have a policy |
| 430 | set. |
| 431 | |
| 432 | Args: |
| 433 | resource: string, REQUIRED: The resource for which the policy is being requested. |
| 434 | See the operation documentation for the appropriate value for this field. (required) |
| 435 | body: object, The request body. |
| 436 | The object takes the form of: |
| 437 | |
| 438 | { # Request message for `GetIamPolicy` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 439 | "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 440 | # `GetIamPolicy`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 441 | "requestedPolicyVersion": 42, # Optional. The policy format version to be returned. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 442 | # |
| 443 | # Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 444 | # rejected. |
| 445 | # |
| 446 | # Requests for policies with any conditional bindings must specify version 3. |
| 447 | # Policies without any conditional bindings may specify any valid value or |
| 448 | # leave the field unset. |
| 449 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 450 | } |
| 451 | |
| 452 | x__xgafv: string, V1 error format. |
| 453 | Allowed values |
| 454 | 1 - v1 error format |
| 455 | 2 - v2 error format |
| 456 | |
| 457 | Returns: |
| 458 | An object of the form: |
| 459 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 460 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 461 | # controls for Google Cloud resources. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 462 | # |
| 463 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 464 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 465 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 466 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 467 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 468 | # custom role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 469 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 470 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 471 | # expression that allows access to a resource only if the expression evaluates |
| 472 | # to `true`. A condition can add constraints based on attributes of the |
| 473 | # request, the resource, or both. |
| 474 | # |
| 475 | # **JSON example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 476 | # |
| 477 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 478 | # "bindings": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 479 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 480 | # "role": "roles/resourcemanager.organizationAdmin", |
| 481 | # "members": [ |
| 482 | # "user:mike@example.com", |
| 483 | # "group:admins@example.com", |
| 484 | # "domain:google.com", |
| 485 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 486 | # ] |
| 487 | # }, |
| 488 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 489 | # "role": "roles/resourcemanager.organizationViewer", |
| 490 | # "members": ["user:eve@example.com"], |
| 491 | # "condition": { |
| 492 | # "title": "expirable access", |
| 493 | # "description": "Does not grant access after Sep 2020", |
| 494 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 495 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 496 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 497 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 498 | # "etag": "BwWWja0YfJA=", |
| 499 | # "version": 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 500 | # } |
| 501 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 502 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 503 | # |
| 504 | # bindings: |
| 505 | # - members: |
| 506 | # - user:mike@example.com |
| 507 | # - group:admins@example.com |
| 508 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 509 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 510 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 511 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 512 | # - user:eve@example.com |
| 513 | # role: roles/resourcemanager.organizationViewer |
| 514 | # condition: |
| 515 | # title: expirable access |
| 516 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 517 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 518 | # - etag: BwWWja0YfJA= |
| 519 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 520 | # |
| 521 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 522 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 523 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 524 | # prevent simultaneous updates of a policy from overwriting each other. |
| 525 | # It is strongly suggested that systems make use of the `etag` in the |
| 526 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 527 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 528 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 529 | # ensure that their change will be applied to the same version of the policy. |
| 530 | # |
| 531 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 532 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 533 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 534 | # the conditions in the version `3` policy are lost. |
| 535 | "version": 42, # Specifies the format of the policy. |
| 536 | # |
| 537 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 538 | # are rejected. |
| 539 | # |
| 540 | # Any operation that affects conditional role bindings must specify version |
| 541 | # `3`. This requirement applies to the following operations: |
| 542 | # |
| 543 | # * Getting a policy that includes a conditional role binding |
| 544 | # * Adding a conditional role binding to a policy |
| 545 | # * Changing a conditional role binding in a policy |
| 546 | # * Removing any role binding, with or without a condition, from a policy |
| 547 | # that includes conditions |
| 548 | # |
| 549 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 550 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 551 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 552 | # the conditions in the version `3` policy are lost. |
| 553 | # |
| 554 | # If a policy does not include any conditions, operations on that policy may |
| 555 | # specify any valid version or leave the field unset. |
| 556 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 557 | # `condition` that determines how and when the `bindings` are applied. Each |
| 558 | # of the `bindings` must contain at least one member. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 559 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 560 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 561 | # `members` can have the following values: |
| 562 | # |
| 563 | # * `allUsers`: A special identifier that represents anyone who is |
| 564 | # on the internet; with or without a Google account. |
| 565 | # |
| 566 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 567 | # who is authenticated with a Google account or a service account. |
| 568 | # |
| 569 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 570 | # account. For example, `alice@example.com` . |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 571 | # |
| 572 | # |
| 573 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 574 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 575 | # |
| 576 | # * `group:{emailid}`: An email address that represents a Google group. |
| 577 | # For example, `admins@example.com`. |
| 578 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 579 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 580 | # identifier) representing a user that has been recently deleted. For |
| 581 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 582 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 583 | # retains the role in the binding. |
| 584 | # |
| 585 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 586 | # unique identifier) representing a service account that has been recently |
| 587 | # deleted. For example, |
| 588 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 589 | # If the service account is undeleted, this value reverts to |
| 590 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 591 | # role in the binding. |
| 592 | # |
| 593 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 594 | # identifier) representing a Google group that has been recently |
| 595 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 596 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 597 | # recovered group retains the role in the binding. |
| 598 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 599 | # |
| 600 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 601 | # users of that domain. For example, `google.com` or `example.com`. |
| 602 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 603 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 604 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 605 | "role": "A String", # Role that is assigned to `members`. |
| 606 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 607 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 608 | # NOTE: An unsatisfied condition will not allow user access via current |
| 609 | # binding. Different bindings, including their conditions, are examined |
| 610 | # independently. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 611 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 612 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 613 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 614 | # Example (Comparison): |
| 615 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 616 | # title: "Summary size limit" |
| 617 | # description: "Determines if a summary is less than 100 chars" |
| 618 | # expression: "document.summary.size() < 100" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 619 | # |
| 620 | # Example (Equality): |
| 621 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 622 | # title: "Requestor is owner" |
| 623 | # description: "Determines if requestor is the document owner" |
| 624 | # expression: "document.owner == request.auth.claims.email" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 625 | # |
| 626 | # Example (Logic): |
| 627 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 628 | # title: "Public documents" |
| 629 | # description: "Determine whether the document should be publicly visible" |
| 630 | # expression: "document.type != 'private' && document.type != 'internal'" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 631 | # |
| 632 | # Example (Data Manipulation): |
| 633 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 634 | # title: "Notification string" |
| 635 | # description: "Create a notification string with a timestamp." |
| 636 | # expression: "'New message received at ' + string(document.create_time)" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 637 | # |
| 638 | # The exact variables and functions that may be referenced within an expression |
| 639 | # are determined by the service that evaluates it. See the service |
| 640 | # documentation for additional information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 641 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 642 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 643 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 644 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 645 | # reporting, e.g. a file name and a position in the file. |
| 646 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 647 | # describes the expression, e.g. when hovered over it in a UI. |
| 648 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 649 | # syntax. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 650 | }, |
| 651 | }, |
| 652 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 653 | }</pre> |
| 654 | </div> |
| 655 | |
| 656 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 657 | <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 658 | <pre>Lists device registries. |
| 659 | |
| 660 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 661 | parent: string, Required. The project and cloud region path. For example, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 662 | `projects/example-project/locations/us-central1`. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 663 | pageToken: string, The value returned by the last `ListDeviceRegistriesResponse`; indicates |
| 664 | that this is a continuation of a prior `ListDeviceRegistries` call and |
| 665 | the system should return the next page of data. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 666 | pageSize: integer, The maximum number of registries to return in the response. If this value |
| 667 | is zero, the service will select a default size. A call may return fewer |
| 668 | objects than requested. A non-empty `next_page_token` in the response |
| 669 | indicates that more data is available. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 670 | x__xgafv: string, V1 error format. |
| 671 | Allowed values |
| 672 | 1 - v1 error format |
| 673 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 674 | |
| 675 | Returns: |
| 676 | An object of the form: |
| 677 | |
| 678 | { # Response for `ListDeviceRegistries`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 679 | "deviceRegistries": [ # The registries that matched the query. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 680 | { # A container for a group of devices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 681 | "credentials": [ # The credentials used to verify the device credentials. No more than 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 682 | # credentials can be bound to a single registry at a time. The verification |
| 683 | # process occurs at the time of device creation or update. If this field is |
| 684 | # empty, no verification is performed. Otherwise, the credentials of a newly |
| 685 | # created device or added credentials of an updated device should be signed |
| 686 | # with one of these registry credentials. |
| 687 | # |
| 688 | # Note, however, that existing devices will never be affected by |
| 689 | # modifications to this list of credentials: after a device has been |
| 690 | # successfully created in a registry, it should be able to connect even if |
| 691 | # its registry credentials are revoked, deleted, or modified. |
| 692 | { # A server-stored registry credential used to validate device credentials. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 693 | "publicKeyCertificate": { # A public key certificate format and data. # A public key certificate used to verify the device credentials. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 694 | "certificate": "A String", # The certificate data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 695 | "x509Details": { # Details of an X.509 certificate. For informational purposes only. # [Output only] The certificate details. Used only for X.509 certificates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 696 | "signatureAlgorithm": "A String", # The algorithm used to sign the certificate. |
| 697 | "startTime": "A String", # The time the certificate becomes valid. |
| 698 | "expiryTime": "A String", # The time the certificate becomes invalid. |
| 699 | "subject": "A String", # The entity the certificate and public key belong to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 700 | "issuer": "A String", # The entity that signed the certificate. |
| 701 | "publicKeyType": "A String", # The type of public key in the certificate. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 702 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 703 | "format": "A String", # The certificate format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 704 | }, |
| 705 | }, |
| 706 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 707 | "name": "A String", # The resource path name. For example, |
| 708 | # `projects/example-project/locations/us-central1/registries/my-registry`. |
| 709 | "eventNotificationConfigs": [ # The configuration for notification of telemetry events received from the |
| 710 | # device. All telemetry events that were successfully published by the |
| 711 | # device and acknowledged by Cloud IoT Core are guaranteed to be |
| 712 | # delivered to Cloud Pub/Sub. If multiple configurations match a message, |
| 713 | # only the first matching configuration is used. If you try to publish a |
| 714 | # device telemetry event using MQTT without specifying a Cloud Pub/Sub topic |
| 715 | # for the device's registry, the connection closes automatically. If you try |
| 716 | # to do so using an HTTP connection, an error is returned. Up to 10 |
| 717 | # configurations may be provided. |
| 718 | { # The configuration for forwarding telemetry events. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 719 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 720 | # `projects/myProject/topics/deviceEvents`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 721 | "subfolderMatches": "A String", # If the subfolder name matches this string exactly, this configuration will |
| 722 | # be used. The string must not include the leading '/' character. If empty, |
| 723 | # all strings are matched. This field is used only for telemetry events; |
| 724 | # subfolders are not supported for state changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 725 | }, |
| 726 | ], |
| 727 | "logLevel": "A String", # **Beta Feature** |
| 728 | # |
| 729 | # The default logging verbosity for activity from devices in this registry. |
| 730 | # The verbosity level can be overridden by Device.log_level. |
| 731 | "httpConfig": { # The configuration of the HTTP bridge for a device registry. # The DeviceService (HTTP) configuration for this device registry. |
| 732 | "httpEnabledState": "A String", # If enabled, allows devices to use DeviceService via the HTTP protocol. |
| 733 | # Otherwise, any requests to DeviceService will fail for this registry. |
| 734 | }, |
| 735 | "id": "A String", # The identifier of this device registry. For example, `myRegistry`. |
| 736 | "mqttConfig": { # The configuration of MQTT for a device registry. # The MQTT configuration for this device registry. |
| 737 | "mqttEnabledState": "A String", # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT |
| 738 | # connections to this registry will fail. |
| 739 | }, |
| 740 | "stateNotificationConfig": { # The configuration for notification of new states received from the device. # The configuration for notification of new states received from the device. |
| 741 | # State updates are guaranteed to be stored in the state history, but |
| 742 | # notifications to Cloud Pub/Sub are not guaranteed. For example, if |
| 743 | # permissions are misconfigured or the specified topic doesn't exist, no |
| 744 | # notification will be published but the state will still be stored in Cloud |
| 745 | # IoT Core. |
| 746 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 747 | # `projects/myProject/topics/deviceEvents`. |
| 748 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 749 | }, |
| 750 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 751 | "nextPageToken": "A String", # If not empty, indicates that there may be more registries that match the |
| 752 | # request; this value should be passed in a new |
| 753 | # `ListDeviceRegistriesRequest`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 754 | }</pre> |
| 755 | </div> |
| 756 | |
| 757 | <div class="method"> |
| 758 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 759 | <pre>Retrieves the next page of results. |
| 760 | |
| 761 | Args: |
| 762 | previous_request: The request for the previous page. (required) |
| 763 | previous_response: The response from the request for the previous page. (required) |
| 764 | |
| 765 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 766 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 767 | page. Returns None if there are no more items in the collection. |
| 768 | </pre> |
| 769 | </div> |
| 770 | |
| 771 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 772 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 773 | <pre>Updates a device registry configuration. |
| 774 | |
| 775 | Args: |
| 776 | name: string, The resource path name. For example, |
| 777 | `projects/example-project/locations/us-central1/registries/my-registry`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 778 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 779 | The object takes the form of: |
| 780 | |
| 781 | { # A container for a group of devices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 782 | "credentials": [ # The credentials used to verify the device credentials. No more than 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 783 | # credentials can be bound to a single registry at a time. The verification |
| 784 | # process occurs at the time of device creation or update. If this field is |
| 785 | # empty, no verification is performed. Otherwise, the credentials of a newly |
| 786 | # created device or added credentials of an updated device should be signed |
| 787 | # with one of these registry credentials. |
| 788 | # |
| 789 | # Note, however, that existing devices will never be affected by |
| 790 | # modifications to this list of credentials: after a device has been |
| 791 | # successfully created in a registry, it should be able to connect even if |
| 792 | # its registry credentials are revoked, deleted, or modified. |
| 793 | { # A server-stored registry credential used to validate device credentials. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 794 | "publicKeyCertificate": { # A public key certificate format and data. # A public key certificate used to verify the device credentials. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 795 | "certificate": "A String", # The certificate data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 796 | "x509Details": { # Details of an X.509 certificate. For informational purposes only. # [Output only] The certificate details. Used only for X.509 certificates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 797 | "signatureAlgorithm": "A String", # The algorithm used to sign the certificate. |
| 798 | "startTime": "A String", # The time the certificate becomes valid. |
| 799 | "expiryTime": "A String", # The time the certificate becomes invalid. |
| 800 | "subject": "A String", # The entity the certificate and public key belong to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 801 | "issuer": "A String", # The entity that signed the certificate. |
| 802 | "publicKeyType": "A String", # The type of public key in the certificate. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 803 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 804 | "format": "A String", # The certificate format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 805 | }, |
| 806 | }, |
| 807 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 808 | "name": "A String", # The resource path name. For example, |
| 809 | # `projects/example-project/locations/us-central1/registries/my-registry`. |
| 810 | "eventNotificationConfigs": [ # The configuration for notification of telemetry events received from the |
| 811 | # device. All telemetry events that were successfully published by the |
| 812 | # device and acknowledged by Cloud IoT Core are guaranteed to be |
| 813 | # delivered to Cloud Pub/Sub. If multiple configurations match a message, |
| 814 | # only the first matching configuration is used. If you try to publish a |
| 815 | # device telemetry event using MQTT without specifying a Cloud Pub/Sub topic |
| 816 | # for the device's registry, the connection closes automatically. If you try |
| 817 | # to do so using an HTTP connection, an error is returned. Up to 10 |
| 818 | # configurations may be provided. |
| 819 | { # The configuration for forwarding telemetry events. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 820 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 821 | # `projects/myProject/topics/deviceEvents`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 822 | "subfolderMatches": "A String", # If the subfolder name matches this string exactly, this configuration will |
| 823 | # be used. The string must not include the leading '/' character. If empty, |
| 824 | # all strings are matched. This field is used only for telemetry events; |
| 825 | # subfolders are not supported for state changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 826 | }, |
| 827 | ], |
| 828 | "logLevel": "A String", # **Beta Feature** |
| 829 | # |
| 830 | # The default logging verbosity for activity from devices in this registry. |
| 831 | # The verbosity level can be overridden by Device.log_level. |
| 832 | "httpConfig": { # The configuration of the HTTP bridge for a device registry. # The DeviceService (HTTP) configuration for this device registry. |
| 833 | "httpEnabledState": "A String", # If enabled, allows devices to use DeviceService via the HTTP protocol. |
| 834 | # Otherwise, any requests to DeviceService will fail for this registry. |
| 835 | }, |
| 836 | "id": "A String", # The identifier of this device registry. For example, `myRegistry`. |
| 837 | "mqttConfig": { # The configuration of MQTT for a device registry. # The MQTT configuration for this device registry. |
| 838 | "mqttEnabledState": "A String", # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT |
| 839 | # connections to this registry will fail. |
| 840 | }, |
| 841 | "stateNotificationConfig": { # The configuration for notification of new states received from the device. # The configuration for notification of new states received from the device. |
| 842 | # State updates are guaranteed to be stored in the state history, but |
| 843 | # notifications to Cloud Pub/Sub are not guaranteed. For example, if |
| 844 | # permissions are misconfigured or the specified topic doesn't exist, no |
| 845 | # notification will be published but the state will still be stored in Cloud |
| 846 | # IoT Core. |
| 847 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 848 | # `projects/myProject/topics/deviceEvents`. |
| 849 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 850 | } |
| 851 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 852 | updateMask: string, Required. Only updates the `device_registry` fields indicated by this mask. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 853 | The field mask must not be empty, and it must not contain fields that |
| 854 | are immutable or only set by the server. |
| 855 | Mutable top-level fields: `event_notification_config`, `http_config`, |
| 856 | `mqtt_config`, and `state_notification_config`. |
| 857 | x__xgafv: string, V1 error format. |
| 858 | Allowed values |
| 859 | 1 - v1 error format |
| 860 | 2 - v2 error format |
| 861 | |
| 862 | Returns: |
| 863 | An object of the form: |
| 864 | |
| 865 | { # A container for a group of devices. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 866 | "credentials": [ # The credentials used to verify the device credentials. No more than 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 867 | # credentials can be bound to a single registry at a time. The verification |
| 868 | # process occurs at the time of device creation or update. If this field is |
| 869 | # empty, no verification is performed. Otherwise, the credentials of a newly |
| 870 | # created device or added credentials of an updated device should be signed |
| 871 | # with one of these registry credentials. |
| 872 | # |
| 873 | # Note, however, that existing devices will never be affected by |
| 874 | # modifications to this list of credentials: after a device has been |
| 875 | # successfully created in a registry, it should be able to connect even if |
| 876 | # its registry credentials are revoked, deleted, or modified. |
| 877 | { # A server-stored registry credential used to validate device credentials. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 878 | "publicKeyCertificate": { # A public key certificate format and data. # A public key certificate used to verify the device credentials. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 879 | "certificate": "A String", # The certificate data. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 880 | "x509Details": { # Details of an X.509 certificate. For informational purposes only. # [Output only] The certificate details. Used only for X.509 certificates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 881 | "signatureAlgorithm": "A String", # The algorithm used to sign the certificate. |
| 882 | "startTime": "A String", # The time the certificate becomes valid. |
| 883 | "expiryTime": "A String", # The time the certificate becomes invalid. |
| 884 | "subject": "A String", # The entity the certificate and public key belong to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 885 | "issuer": "A String", # The entity that signed the certificate. |
| 886 | "publicKeyType": "A String", # The type of public key in the certificate. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 887 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 888 | "format": "A String", # The certificate format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 889 | }, |
| 890 | }, |
| 891 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 892 | "name": "A String", # The resource path name. For example, |
| 893 | # `projects/example-project/locations/us-central1/registries/my-registry`. |
| 894 | "eventNotificationConfigs": [ # The configuration for notification of telemetry events received from the |
| 895 | # device. All telemetry events that were successfully published by the |
| 896 | # device and acknowledged by Cloud IoT Core are guaranteed to be |
| 897 | # delivered to Cloud Pub/Sub. If multiple configurations match a message, |
| 898 | # only the first matching configuration is used. If you try to publish a |
| 899 | # device telemetry event using MQTT without specifying a Cloud Pub/Sub topic |
| 900 | # for the device's registry, the connection closes automatically. If you try |
| 901 | # to do so using an HTTP connection, an error is returned. Up to 10 |
| 902 | # configurations may be provided. |
| 903 | { # The configuration for forwarding telemetry events. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 904 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 905 | # `projects/myProject/topics/deviceEvents`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 906 | "subfolderMatches": "A String", # If the subfolder name matches this string exactly, this configuration will |
| 907 | # be used. The string must not include the leading '/' character. If empty, |
| 908 | # all strings are matched. This field is used only for telemetry events; |
| 909 | # subfolders are not supported for state changes. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 910 | }, |
| 911 | ], |
| 912 | "logLevel": "A String", # **Beta Feature** |
| 913 | # |
| 914 | # The default logging verbosity for activity from devices in this registry. |
| 915 | # The verbosity level can be overridden by Device.log_level. |
| 916 | "httpConfig": { # The configuration of the HTTP bridge for a device registry. # The DeviceService (HTTP) configuration for this device registry. |
| 917 | "httpEnabledState": "A String", # If enabled, allows devices to use DeviceService via the HTTP protocol. |
| 918 | # Otherwise, any requests to DeviceService will fail for this registry. |
| 919 | }, |
| 920 | "id": "A String", # The identifier of this device registry. For example, `myRegistry`. |
| 921 | "mqttConfig": { # The configuration of MQTT for a device registry. # The MQTT configuration for this device registry. |
| 922 | "mqttEnabledState": "A String", # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT |
| 923 | # connections to this registry will fail. |
| 924 | }, |
| 925 | "stateNotificationConfig": { # The configuration for notification of new states received from the device. # The configuration for notification of new states received from the device. |
| 926 | # State updates are guaranteed to be stored in the state history, but |
| 927 | # notifications to Cloud Pub/Sub are not guaranteed. For example, if |
| 928 | # permissions are misconfigured or the specified topic doesn't exist, no |
| 929 | # notification will be published but the state will still be stored in Cloud |
| 930 | # IoT Core. |
| 931 | "pubsubTopicName": "A String", # A Cloud Pub/Sub topic name. For example, |
| 932 | # `projects/myProject/topics/deviceEvents`. |
| 933 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 934 | }</pre> |
| 935 | </div> |
| 936 | |
| 937 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 938 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 939 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 940 | existing policy. |
| 941 | |
| 942 | Args: |
| 943 | resource: string, REQUIRED: The resource for which the policy is being specified. |
| 944 | 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] | 945 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 946 | The object takes the form of: |
| 947 | |
| 948 | { # Request message for `SetIamPolicy` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 949 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 950 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 951 | # valid policy but certain Cloud Platform services (such as Projects) |
| 952 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 953 | # controls for Google Cloud resources. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 954 | # |
| 955 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 956 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 957 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 958 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 959 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 960 | # custom role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 961 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 962 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 963 | # expression that allows access to a resource only if the expression evaluates |
| 964 | # to `true`. A condition can add constraints based on attributes of the |
| 965 | # request, the resource, or both. |
| 966 | # |
| 967 | # **JSON example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 968 | # |
| 969 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 970 | # "bindings": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 971 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 972 | # "role": "roles/resourcemanager.organizationAdmin", |
| 973 | # "members": [ |
| 974 | # "user:mike@example.com", |
| 975 | # "group:admins@example.com", |
| 976 | # "domain:google.com", |
| 977 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 978 | # ] |
| 979 | # }, |
| 980 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 981 | # "role": "roles/resourcemanager.organizationViewer", |
| 982 | # "members": ["user:eve@example.com"], |
| 983 | # "condition": { |
| 984 | # "title": "expirable access", |
| 985 | # "description": "Does not grant access after Sep 2020", |
| 986 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 987 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 988 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 989 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 990 | # "etag": "BwWWja0YfJA=", |
| 991 | # "version": 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 992 | # } |
| 993 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 994 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 995 | # |
| 996 | # bindings: |
| 997 | # - members: |
| 998 | # - user:mike@example.com |
| 999 | # - group:admins@example.com |
| 1000 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1001 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1002 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1003 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1004 | # - user:eve@example.com |
| 1005 | # role: roles/resourcemanager.organizationViewer |
| 1006 | # condition: |
| 1007 | # title: expirable access |
| 1008 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1009 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1010 | # - etag: BwWWja0YfJA= |
| 1011 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1012 | # |
| 1013 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1014 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1015 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1016 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1017 | # It is strongly suggested that systems make use of the `etag` in the |
| 1018 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1019 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1020 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1021 | # ensure that their change will be applied to the same version of the policy. |
| 1022 | # |
| 1023 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1024 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1025 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1026 | # the conditions in the version `3` policy are lost. |
| 1027 | "version": 42, # Specifies the format of the policy. |
| 1028 | # |
| 1029 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1030 | # are rejected. |
| 1031 | # |
| 1032 | # Any operation that affects conditional role bindings must specify version |
| 1033 | # `3`. This requirement applies to the following operations: |
| 1034 | # |
| 1035 | # * Getting a policy that includes a conditional role binding |
| 1036 | # * Adding a conditional role binding to a policy |
| 1037 | # * Changing a conditional role binding in a policy |
| 1038 | # * Removing any role binding, with or without a condition, from a policy |
| 1039 | # that includes conditions |
| 1040 | # |
| 1041 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1042 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1043 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1044 | # the conditions in the version `3` policy are lost. |
| 1045 | # |
| 1046 | # If a policy does not include any conditions, operations on that policy may |
| 1047 | # specify any valid version or leave the field unset. |
| 1048 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1049 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1050 | # of the `bindings` must contain at least one member. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1051 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1052 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1053 | # `members` can have the following values: |
| 1054 | # |
| 1055 | # * `allUsers`: A special identifier that represents anyone who is |
| 1056 | # on the internet; with or without a Google account. |
| 1057 | # |
| 1058 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1059 | # who is authenticated with a Google account or a service account. |
| 1060 | # |
| 1061 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1062 | # account. For example, `alice@example.com` . |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1063 | # |
| 1064 | # |
| 1065 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1066 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1067 | # |
| 1068 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1069 | # For example, `admins@example.com`. |
| 1070 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1071 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1072 | # identifier) representing a user that has been recently deleted. For |
| 1073 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1074 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1075 | # retains the role in the binding. |
| 1076 | # |
| 1077 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1078 | # unique identifier) representing a service account that has been recently |
| 1079 | # deleted. For example, |
| 1080 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1081 | # If the service account is undeleted, this value reverts to |
| 1082 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1083 | # role in the binding. |
| 1084 | # |
| 1085 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1086 | # identifier) representing a Google group that has been recently |
| 1087 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1088 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1089 | # recovered group retains the role in the binding. |
| 1090 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1091 | # |
| 1092 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 1093 | # users of that domain. For example, `google.com` or `example.com`. |
| 1094 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1095 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1096 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1097 | "role": "A String", # Role that is assigned to `members`. |
| 1098 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 1099 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1100 | # NOTE: An unsatisfied condition will not allow user access via current |
| 1101 | # binding. Different bindings, including their conditions, are examined |
| 1102 | # independently. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1103 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1104 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1105 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1106 | # Example (Comparison): |
| 1107 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1108 | # title: "Summary size limit" |
| 1109 | # description: "Determines if a summary is less than 100 chars" |
| 1110 | # expression: "document.summary.size() < 100" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1111 | # |
| 1112 | # Example (Equality): |
| 1113 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1114 | # title: "Requestor is owner" |
| 1115 | # description: "Determines if requestor is the document owner" |
| 1116 | # expression: "document.owner == request.auth.claims.email" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1117 | # |
| 1118 | # Example (Logic): |
| 1119 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1120 | # title: "Public documents" |
| 1121 | # description: "Determine whether the document should be publicly visible" |
| 1122 | # expression: "document.type != 'private' && document.type != 'internal'" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1123 | # |
| 1124 | # Example (Data Manipulation): |
| 1125 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1126 | # title: "Notification string" |
| 1127 | # description: "Create a notification string with a timestamp." |
| 1128 | # expression: "'New message received at ' + string(document.create_time)" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1129 | # |
| 1130 | # The exact variables and functions that may be referenced within an expression |
| 1131 | # are determined by the service that evaluates it. See the service |
| 1132 | # documentation for additional information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1133 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1134 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1135 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1136 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1137 | # reporting, e.g. a file name and a position in the file. |
| 1138 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1139 | # describes the expression, e.g. when hovered over it in a UI. |
| 1140 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1141 | # syntax. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1142 | }, |
| 1143 | }, |
| 1144 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1145 | }, |
| 1146 | } |
| 1147 | |
| 1148 | x__xgafv: string, V1 error format. |
| 1149 | Allowed values |
| 1150 | 1 - v1 error format |
| 1151 | 2 - v2 error format |
| 1152 | |
| 1153 | Returns: |
| 1154 | An object of the form: |
| 1155 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1156 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 1157 | # controls for Google Cloud resources. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1158 | # |
| 1159 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1160 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1161 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1162 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1163 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1164 | # custom role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1165 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1166 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 1167 | # expression that allows access to a resource only if the expression evaluates |
| 1168 | # to `true`. A condition can add constraints based on attributes of the |
| 1169 | # request, the resource, or both. |
| 1170 | # |
| 1171 | # **JSON example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1172 | # |
| 1173 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1174 | # "bindings": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1175 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1176 | # "role": "roles/resourcemanager.organizationAdmin", |
| 1177 | # "members": [ |
| 1178 | # "user:mike@example.com", |
| 1179 | # "group:admins@example.com", |
| 1180 | # "domain:google.com", |
| 1181 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1182 | # ] |
| 1183 | # }, |
| 1184 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1185 | # "role": "roles/resourcemanager.organizationViewer", |
| 1186 | # "members": ["user:eve@example.com"], |
| 1187 | # "condition": { |
| 1188 | # "title": "expirable access", |
| 1189 | # "description": "Does not grant access after Sep 2020", |
| 1190 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1191 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1192 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1193 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1194 | # "etag": "BwWWja0YfJA=", |
| 1195 | # "version": 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1196 | # } |
| 1197 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1198 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1199 | # |
| 1200 | # bindings: |
| 1201 | # - members: |
| 1202 | # - user:mike@example.com |
| 1203 | # - group:admins@example.com |
| 1204 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1205 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1206 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1207 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1208 | # - user:eve@example.com |
| 1209 | # role: roles/resourcemanager.organizationViewer |
| 1210 | # condition: |
| 1211 | # title: expirable access |
| 1212 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1213 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1214 | # - etag: BwWWja0YfJA= |
| 1215 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1216 | # |
| 1217 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1218 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1219 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1220 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1221 | # It is strongly suggested that systems make use of the `etag` in the |
| 1222 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1223 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1224 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1225 | # ensure that their change will be applied to the same version of the policy. |
| 1226 | # |
| 1227 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1228 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1229 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1230 | # the conditions in the version `3` policy are lost. |
| 1231 | "version": 42, # Specifies the format of the policy. |
| 1232 | # |
| 1233 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1234 | # are rejected. |
| 1235 | # |
| 1236 | # Any operation that affects conditional role bindings must specify version |
| 1237 | # `3`. This requirement applies to the following operations: |
| 1238 | # |
| 1239 | # * Getting a policy that includes a conditional role binding |
| 1240 | # * Adding a conditional role binding to a policy |
| 1241 | # * Changing a conditional role binding in a policy |
| 1242 | # * Removing any role binding, with or without a condition, from a policy |
| 1243 | # that includes conditions |
| 1244 | # |
| 1245 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1246 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1247 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1248 | # the conditions in the version `3` policy are lost. |
| 1249 | # |
| 1250 | # If a policy does not include any conditions, operations on that policy may |
| 1251 | # specify any valid version or leave the field unset. |
| 1252 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1253 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1254 | # of the `bindings` must contain at least one member. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1255 | { # Associates `members` with a `role`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1256 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1257 | # `members` can have the following values: |
| 1258 | # |
| 1259 | # * `allUsers`: A special identifier that represents anyone who is |
| 1260 | # on the internet; with or without a Google account. |
| 1261 | # |
| 1262 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1263 | # who is authenticated with a Google account or a service account. |
| 1264 | # |
| 1265 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1266 | # account. For example, `alice@example.com` . |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1267 | # |
| 1268 | # |
| 1269 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1270 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1271 | # |
| 1272 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1273 | # For example, `admins@example.com`. |
| 1274 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1275 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1276 | # identifier) representing a user that has been recently deleted. For |
| 1277 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1278 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1279 | # retains the role in the binding. |
| 1280 | # |
| 1281 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1282 | # unique identifier) representing a service account that has been recently |
| 1283 | # deleted. For example, |
| 1284 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1285 | # If the service account is undeleted, this value reverts to |
| 1286 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1287 | # role in the binding. |
| 1288 | # |
| 1289 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1290 | # identifier) representing a Google group that has been recently |
| 1291 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1292 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1293 | # recovered group retains the role in the binding. |
| 1294 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1295 | # |
| 1296 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 1297 | # users of that domain. For example, `google.com` or `example.com`. |
| 1298 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1299 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1300 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1301 | "role": "A String", # Role that is assigned to `members`. |
| 1302 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 1303 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1304 | # NOTE: An unsatisfied condition will not allow user access via current |
| 1305 | # binding. Different bindings, including their conditions, are examined |
| 1306 | # independently. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1307 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1308 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1309 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1310 | # Example (Comparison): |
| 1311 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1312 | # title: "Summary size limit" |
| 1313 | # description: "Determines if a summary is less than 100 chars" |
| 1314 | # expression: "document.summary.size() < 100" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1315 | # |
| 1316 | # Example (Equality): |
| 1317 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1318 | # title: "Requestor is owner" |
| 1319 | # description: "Determines if requestor is the document owner" |
| 1320 | # expression: "document.owner == request.auth.claims.email" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1321 | # |
| 1322 | # Example (Logic): |
| 1323 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1324 | # title: "Public documents" |
| 1325 | # description: "Determine whether the document should be publicly visible" |
| 1326 | # expression: "document.type != 'private' && document.type != 'internal'" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1327 | # |
| 1328 | # Example (Data Manipulation): |
| 1329 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1330 | # title: "Notification string" |
| 1331 | # description: "Create a notification string with a timestamp." |
| 1332 | # expression: "'New message received at ' + string(document.create_time)" |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1333 | # |
| 1334 | # The exact variables and functions that may be referenced within an expression |
| 1335 | # are determined by the service that evaluates it. See the service |
| 1336 | # documentation for additional information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1337 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1338 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1339 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1340 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1341 | # reporting, e.g. a file name and a position in the file. |
| 1342 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1343 | # describes the expression, e.g. when hovered over it in a UI. |
| 1344 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1345 | # syntax. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1346 | }, |
| 1347 | }, |
| 1348 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1349 | }</pre> |
| 1350 | </div> |
| 1351 | |
| 1352 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1353 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1354 | <pre>Returns permissions that a caller has on the specified resource. |
| 1355 | If the resource does not exist, this will return an empty set of |
| 1356 | permissions, not a NOT_FOUND error. |
| 1357 | |
| 1358 | Args: |
| 1359 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
| 1360 | 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] | 1361 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1362 | The object takes the form of: |
| 1363 | |
| 1364 | { # Request message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1365 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1366 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1367 | # information see |
| 1368 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1369 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1370 | ], |
| 1371 | } |
| 1372 | |
| 1373 | x__xgafv: string, V1 error format. |
| 1374 | Allowed values |
| 1375 | 1 - v1 error format |
| 1376 | 2 - v2 error format |
| 1377 | |
| 1378 | Returns: |
| 1379 | An object of the form: |
| 1380 | |
| 1381 | { # Response message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1382 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1383 | # allowed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1384 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1385 | ], |
| 1386 | }</pre> |
| 1387 | </div> |
| 1388 | |
| 1389 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1390 | <code class="details" id="unbindDeviceFromGateway">unbindDeviceFromGateway(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1391 | <pre>Deletes the association between the device and the gateway. |
| 1392 | |
| 1393 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1394 | parent: string, Required. The name of the registry. For example, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1395 | `projects/example-project/locations/us-central1/registries/my-registry`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1396 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1397 | The object takes the form of: |
| 1398 | |
| 1399 | { # Request for `UnbindDeviceFromGateway`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1400 | "gatewayId": "A String", # Required. The value of `gateway_id` can be either the device numeric ID or the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1401 | # user-defined device identifier. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1402 | "deviceId": "A String", # Required. The device to disassociate from the specified gateway. The value of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1403 | # `device_id` can be either the device numeric ID or the user-defined device |
| 1404 | # identifier. |
| 1405 | } |
| 1406 | |
| 1407 | x__xgafv: string, V1 error format. |
| 1408 | Allowed values |
| 1409 | 1 - v1 error format |
| 1410 | 2 - v2 error format |
| 1411 | |
| 1412 | Returns: |
| 1413 | An object of the form: |
| 1414 | |
| 1415 | { # Response for `UnbindDeviceFromGateway`. |
| 1416 | }</pre> |
| 1417 | </div> |
| 1418 | |
| 1419 | </body></html> |