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="cloudfunctions_v1.html">Cloud Functions API</a> . <a href="cloudfunctions_v1.projects.html">projects</a> . <a href="cloudfunctions_v1.projects.locations.html">locations</a> . <a href="cloudfunctions_v1.projects.locations.functions.html">functions</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 78 | <code><a href="#call">call(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Synchronously invokes a deployed Cloud Function. To be used for testing</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 81 | <code><a href="#create">create(location, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 82 | <p class="firstline">Creates a new function. If a function with the given name already exists in</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Deletes a function with the given name from the specified project. If the</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 87 | <code><a href="#generateDownloadUrl">generateDownloadUrl(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <p class="firstline">Returns a signed URL for downloading deployed function source code.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#generateUploadUrl">generateUploadUrl(parent, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Returns a signed URL for uploading a function source code.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Returns a function with the given name from the requested project.</p> |
| 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 96 | <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Gets the IAM access control policy for a function.</p> |
| 98 | <p class="toc_element"> |
| 99 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
| 100 | <p class="firstline">Returns a list of functions that belong to the requested project.</p> |
| 101 | <p class="toc_element"> |
| 102 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 103 | <p class="firstline">Retrieves the next page of results.</p> |
| 104 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 105 | <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] | 106 | <p class="firstline">Updates existing function.</p> |
| 107 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 108 | <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] | 109 | <p class="firstline">Sets the IAM access control policy on the specified function.</p> |
| 110 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 111 | <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] | 112 | <p class="firstline">Tests the specified permissions against the IAM access control policy</p> |
| 113 | <h3>Method Details</h3> |
| 114 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 115 | <code class="details" id="call">call(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 116 | <pre>Synchronously invokes a deployed Cloud Function. To be used for testing |
| 117 | purposes as very limited traffic is allowed. For more information on |
| 118 | the actual limits, refer to |
| 119 | [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). |
| 120 | |
| 121 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 122 | name: string, Required. The name of the function to be called. (required) |
| 123 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 124 | The object takes the form of: |
| 125 | |
| 126 | { # Request for the `CallFunction` method. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 127 | "data": "A String", # Required. Input to be passed to the function. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | x__xgafv: string, V1 error format. |
| 131 | Allowed values |
| 132 | 1 - v1 error format |
| 133 | 2 - v2 error format |
| 134 | |
| 135 | Returns: |
| 136 | An object of the form: |
| 137 | |
| 138 | { # Response of `CallFunction` method. |
| 139 | "executionId": "A String", # Execution id of function invocation. |
| 140 | "result": "A String", # Result populated for successful execution of synchronous function. Will |
| 141 | # not be populated if function does not return a result through context. |
| 142 | "error": "A String", # Either system or user-function generated error. Set if execution |
| 143 | # was not successful. |
| 144 | }</pre> |
| 145 | </div> |
| 146 | |
| 147 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 148 | <code class="details" id="create">create(location, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 149 | <pre>Creates a new function. If a function with the given name already exists in |
| 150 | the specified project, the long running operation will return |
| 151 | `ALREADY_EXISTS` error. |
| 152 | |
| 153 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 154 | location: string, Required. The project and location in which the function should be created, specified |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 155 | in the format `projects/*/locations/*` (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 156 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 157 | The object takes the form of: |
| 158 | |
| 159 | { # Describes a Cloud Function that contains user computation executed in |
| 160 | # response to an event. It encapsulate function and triggers configurations. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 161 | "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service. |
| 162 | # service. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 163 | "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions. |
| 164 | # If empty, then defaults to ignoring failures (i.e. not retrying them). |
| 165 | "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure. |
| 166 | # A function execution will be retried on any failure. |
| 167 | # A failed execution will be retried up to 7 days with an exponential backoff |
| 168 | # (capped at 10 seconds). |
| 169 | # Retried execution is charged as any other execution. |
| 170 | }, |
| 171 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 172 | "resource": "A String", # Required. The resource(s) from which to observe events, for example, |
| 173 | # `projects/_/buckets/myBucket`. |
| 174 | # |
| 175 | # Not all syntactically correct values are accepted by all services. For |
| 176 | # example: |
| 177 | # |
| 178 | # 1. The authorization model must support it. Google Cloud Functions |
| 179 | # only allows EventTriggers to be deployed that observe resources in the |
| 180 | # same project as the `CloudFunction`. |
| 181 | # 2. The resource type must match the pattern expected for an |
| 182 | # `event_type`. For example, an `EventTrigger` that has an |
| 183 | # `event_type` of "google.pubsub.topic.publish" should have a resource |
| 184 | # that matches Google Cloud Pub/Sub topics. |
| 185 | # |
| 186 | # Additionally, some services may support short names when creating an |
| 187 | # `EventTrigger`. These will always be returned in the normalized "long" |
| 188 | # format. |
| 189 | # |
| 190 | # See each *service's* documentation for supported formats. |
| 191 | "service": "A String", # The hostname of the service that should be observed. |
| 192 | # |
| 193 | # If no string is provided, the default service implementing the API will |
| 194 | # be used. For example, `storage.googleapis.com` is the default for all |
| 195 | # event types in the `google.storage` namespace. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 196 | "eventType": "A String", # Required. The type of event to observe. For example: |
| 197 | # `providers/cloud.storage/eventTypes/object.change` and |
| 198 | # `providers/cloud.pubsub/eventTypes/topic.publish`. |
| 199 | # |
| 200 | # Event types match pattern `providers/*/eventTypes/*.*`. |
| 201 | # The pattern contains: |
| 202 | # |
| 203 | # 1. namespace: For example, `cloud.storage` and |
| 204 | # `google.firebase.analytics`. |
| 205 | # 2. resource type: The type of resource on which event occurs. For |
| 206 | # example, the Google Cloud Storage API includes the type `object`. |
| 207 | # 3. action: The action that generates the event. For example, action for |
| 208 | # a Google Cloud Storage Object is 'change'. |
| 209 | # These parts are lower case. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 210 | }, |
| 211 | "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 212 | "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature** |
| 213 | # |
| 214 | # The source repository where a function is hosted. |
| 215 | # source repository where a function is hosted. |
| 216 | "url": "A String", # The URL pointing to the hosted repository where the function is defined. |
| 217 | # There are supported Cloud Source Repository URLs in the following |
| 218 | # formats: |
| 219 | # |
| 220 | # To refer to a specific commit: |
| 221 | # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` |
| 222 | # To refer to a moveable alias (branch): |
| 223 | # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` |
| 224 | # In particular, to refer to HEAD use `master` moveable alias. |
| 225 | # To refer to a specific fixed alias (tag): |
| 226 | # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` |
| 227 | # |
| 228 | # You may omit `paths/*` if you want to use the main directory. |
| 229 | "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function |
| 230 | # were defined at the time of deployment. It always points to a specific |
| 231 | # commit in the format described above. |
| 232 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 233 | "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL. |
| 234 | "url": "A String", # Output only. The deployed url for the function. |
| 235 | }, |
| 236 | "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip |
| 237 | # archive which contains the function. |
| 238 | "labels": { # Labels associated with this Cloud Function. |
| 239 | "a_key": "A String", |
| 240 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 241 | "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted |
| 242 | # through it. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 243 | "network": "A String", # The VPC Network that this cloud function can connect to. It can be |
| 244 | # either the fully-qualified URI, or the short name of the network resource. |
| 245 | # If the short network name is used, the network must belong to the same |
| 246 | # project. Otherwise, it must belong to a project within the same |
| 247 | # organization. The format of this field is either |
| 248 | # `projects/{project}/global/networks/{network}` or `{network}`, where |
| 249 | # {project} is a project id where the network is defined, and {network} is |
| 250 | # the short name of the network. |
| 251 | # |
| 252 | # This field is mutually exclusive with `vpc_connector` and will be replaced |
| 253 | # by it. |
| 254 | # |
| 255 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 256 | # more information on connecting Cloud projects. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 257 | "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated |
| 258 | # by google.cloud.functions.v1.GenerateUploadUrl |
| 259 | "status": "A String", # Output only. Status of the function deployment. |
| 260 | "description": "A String", # User-provided description of a function. |
| 261 | "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a |
| 262 | # given time. |
| 263 | "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt |
| 264 | # results in a new version of a function being created. |
| 265 | "entryPoint": "A String", # The name of the function (as defined in source code) that will be |
| 266 | # executed. Defaults to the resource name suffix, if not specified. For |
| 267 | # backward compatibility, if function with given name is not found, then the |
| 268 | # system will try to use function named "function". |
| 269 | # For Node.js this is name of a function exported by the module specified |
| 270 | # in `source_location`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 271 | "name": "A String", # A user-defined name of the function. Function names must be unique |
| 272 | # globally and match pattern `projects/*/locations/*/functions/*` |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 273 | "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can |
| 274 | # be either the fully-qualified URI, or the short name of the network |
| 275 | # connector resource. The format of this field is |
| 276 | # `projects/*/locations/*/connectors/*` |
| 277 | # |
| 278 | # This field is mutually exclusive with `network` field and will eventually |
| 279 | # replace it. |
| 280 | # |
| 281 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 282 | # more information on connecting Cloud projects. |
| 283 | "environmentVariables": { # Environment variables that shall be available during function execution. |
| 284 | "a_key": "A String", |
| 285 | }, |
| 286 | "availableMemoryMb": 42, # The amount of memory in MB available for a function. |
| 287 | # Defaults to 256MB. |
| 288 | "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to |
| 289 | # `{project_id}@appspot.gserviceaccount.com`. |
| 290 | "timeout": "A String", # The function execution timeout. Execution is considered failed and |
| 291 | # can be terminated if the function is not completed at the end of the |
| 292 | # timeout period. Defaults to 60 seconds. |
| 293 | "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach |
| 294 | # it. |
| 295 | "runtime": "A String", # The runtime in which to run the function. Required when deploying a new |
| 296 | # function, optional when updating an existing function. For a complete |
| 297 | # list of possible choices, see the |
| 298 | # [`gcloud` command |
| 299 | # reference](/sdk/gcloud/reference/functions/deploy#--runtime). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 300 | } |
| 301 | |
| 302 | x__xgafv: string, V1 error format. |
| 303 | Allowed values |
| 304 | 1 - v1 error format |
| 305 | 2 - v2 error format |
| 306 | |
| 307 | Returns: |
| 308 | An object of the form: |
| 309 | |
| 310 | { # This resource represents a long-running operation that is the result of a |
| 311 | # network API call. |
| 312 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 313 | # contains progress information and common metadata such as create time. |
| 314 | # Some services might not provide such metadata. Any method that returns a |
| 315 | # long-running operation should document the metadata type, if any. |
| 316 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 317 | }, |
| 318 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 319 | # different programming environments, including REST APIs and RPC APIs. It is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 320 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 321 | # three pieces of data: error code, error message, and error details. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 322 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 323 | # You can find out more about this error model and how to work with it in the |
| 324 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 325 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 326 | # user-facing error message should be localized and sent in the |
| 327 | # google.rpc.Status.details field, or localized by the client. |
| 328 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 329 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 330 | # message types for APIs to use. |
| 331 | { |
| 332 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 333 | }, |
| 334 | ], |
| 335 | }, |
| 336 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 337 | # If `true`, the operation is completed, and either `error` or `response` is |
| 338 | # available. |
| 339 | "response": { # The normal response of the operation in case of success. If the original |
| 340 | # method returns no data on success, such as `Delete`, the response is |
| 341 | # `google.protobuf.Empty`. If the original method is standard |
| 342 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 343 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 344 | # is the original method name. For example, if the original method name |
| 345 | # is `TakeSnapshot()`, the inferred response type is |
| 346 | # `TakeSnapshotResponse`. |
| 347 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 348 | }, |
| 349 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 350 | # originally returns it. If you use the default HTTP mapping, the |
| 351 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 352 | }</pre> |
| 353 | </div> |
| 354 | |
| 355 | <div class="method"> |
| 356 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 357 | <pre>Deletes a function with the given name from the specified project. If the |
| 358 | given function is used by some trigger, the trigger will be updated to |
| 359 | remove this function. |
| 360 | |
| 361 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 362 | name: string, Required. The name of the function which should be deleted. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 363 | x__xgafv: string, V1 error format. |
| 364 | Allowed values |
| 365 | 1 - v1 error format |
| 366 | 2 - v2 error format |
| 367 | |
| 368 | Returns: |
| 369 | An object of the form: |
| 370 | |
| 371 | { # This resource represents a long-running operation that is the result of a |
| 372 | # network API call. |
| 373 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 374 | # contains progress information and common metadata such as create time. |
| 375 | # Some services might not provide such metadata. Any method that returns a |
| 376 | # long-running operation should document the metadata type, if any. |
| 377 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 378 | }, |
| 379 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 380 | # different programming environments, including REST APIs and RPC APIs. It is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 381 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 382 | # three pieces of data: error code, error message, and error details. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 383 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 384 | # You can find out more about this error model and how to work with it in the |
| 385 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 386 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 387 | # user-facing error message should be localized and sent in the |
| 388 | # google.rpc.Status.details field, or localized by the client. |
| 389 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 390 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 391 | # message types for APIs to use. |
| 392 | { |
| 393 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 394 | }, |
| 395 | ], |
| 396 | }, |
| 397 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 398 | # If `true`, the operation is completed, and either `error` or `response` is |
| 399 | # available. |
| 400 | "response": { # The normal response of the operation in case of success. If the original |
| 401 | # method returns no data on success, such as `Delete`, the response is |
| 402 | # `google.protobuf.Empty`. If the original method is standard |
| 403 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 404 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 405 | # is the original method name. For example, if the original method name |
| 406 | # is `TakeSnapshot()`, the inferred response type is |
| 407 | # `TakeSnapshotResponse`. |
| 408 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 409 | }, |
| 410 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 411 | # originally returns it. If you use the default HTTP mapping, the |
| 412 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 413 | }</pre> |
| 414 | </div> |
| 415 | |
| 416 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 417 | <code class="details" id="generateDownloadUrl">generateDownloadUrl(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 418 | <pre>Returns a signed URL for downloading deployed function source code. |
| 419 | The URL is only valid for a limited period and should be used within |
| 420 | minutes after generation. |
| 421 | For more information about the signed URL usage see: |
| 422 | https://cloud.google.com/storage/docs/access-control/signed-urls |
| 423 | |
| 424 | Args: |
| 425 | name: string, The name of function for which source code Google Cloud Storage signed |
| 426 | URL should be generated. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 427 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 428 | The object takes the form of: |
| 429 | |
| 430 | { # Request of `GenerateDownloadUrl` method. |
| 431 | "versionId": "A String", # The optional version of function. If not set, default, current version |
| 432 | # is used. |
| 433 | } |
| 434 | |
| 435 | x__xgafv: string, V1 error format. |
| 436 | Allowed values |
| 437 | 1 - v1 error format |
| 438 | 2 - v2 error format |
| 439 | |
| 440 | Returns: |
| 441 | An object of the form: |
| 442 | |
| 443 | { # Response of `GenerateDownloadUrl` method. |
| 444 | "downloadUrl": "A String", # The generated Google Cloud Storage signed URL that should be used for |
| 445 | # function source code download. |
| 446 | }</pre> |
| 447 | </div> |
| 448 | |
| 449 | <div class="method"> |
| 450 | <code class="details" id="generateUploadUrl">generateUploadUrl(parent, body=None, x__xgafv=None)</code> |
| 451 | <pre>Returns a signed URL for uploading a function source code. |
| 452 | For more information about the signed URL usage see: |
| 453 | https://cloud.google.com/storage/docs/access-control/signed-urls. |
| 454 | Once the function source code upload is complete, the used signed |
| 455 | URL should be provided in CreateFunction or UpdateFunction request |
| 456 | as a reference to the function source code. |
| 457 | |
| 458 | When uploading source code to the generated signed URL, please follow |
| 459 | these restrictions: |
| 460 | |
| 461 | * Source file type should be a zip file. |
| 462 | * Source file size should not exceed 100MB limit. |
| 463 | * No credentials should be attached - the signed URLs provide access to the |
| 464 | target bucket using internal service identity; if credentials were |
| 465 | attached, the identity from the credentials would be used, but that |
| 466 | identity does not have permissions to upload files to the URL. |
| 467 | |
| 468 | When making a HTTP PUT request, these two headers need to be specified: |
| 469 | |
| 470 | * `content-type: application/zip` |
| 471 | * `x-goog-content-length-range: 0,104857600` |
| 472 | |
| 473 | And this header SHOULD NOT be specified: |
| 474 | |
| 475 | * `Authorization: Bearer YOUR_TOKEN` |
| 476 | |
| 477 | Args: |
| 478 | parent: string, The project and location in which the Google Cloud Storage signed URL |
| 479 | should be generated, specified in the format `projects/*/locations/*`. (required) |
| 480 | body: object, The request body. |
| 481 | The object takes the form of: |
| 482 | |
| 483 | { # Request of `GenerateSourceUploadUrl` method. |
| 484 | } |
| 485 | |
| 486 | x__xgafv: string, V1 error format. |
| 487 | Allowed values |
| 488 | 1 - v1 error format |
| 489 | 2 - v2 error format |
| 490 | |
| 491 | Returns: |
| 492 | An object of the form: |
| 493 | |
| 494 | { # Response of `GenerateSourceUploadUrl` method. |
| 495 | "uploadUrl": "A String", # The generated Google Cloud Storage signed URL that should be used for a |
| 496 | # function source code upload. The uploaded file should be a zip archive |
| 497 | # which contains a function. |
| 498 | }</pre> |
| 499 | </div> |
| 500 | |
| 501 | <div class="method"> |
| 502 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 503 | <pre>Returns a function with the given name from the requested project. |
| 504 | |
| 505 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 506 | name: string, Required. The name of the function which details should be obtained. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 507 | x__xgafv: string, V1 error format. |
| 508 | Allowed values |
| 509 | 1 - v1 error format |
| 510 | 2 - v2 error format |
| 511 | |
| 512 | Returns: |
| 513 | An object of the form: |
| 514 | |
| 515 | { # Describes a Cloud Function that contains user computation executed in |
| 516 | # response to an event. It encapsulate function and triggers configurations. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 517 | "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service. |
| 518 | # service. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 519 | "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions. |
| 520 | # If empty, then defaults to ignoring failures (i.e. not retrying them). |
| 521 | "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure. |
| 522 | # A function execution will be retried on any failure. |
| 523 | # A failed execution will be retried up to 7 days with an exponential backoff |
| 524 | # (capped at 10 seconds). |
| 525 | # Retried execution is charged as any other execution. |
| 526 | }, |
| 527 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 528 | "resource": "A String", # Required. The resource(s) from which to observe events, for example, |
| 529 | # `projects/_/buckets/myBucket`. |
| 530 | # |
| 531 | # Not all syntactically correct values are accepted by all services. For |
| 532 | # example: |
| 533 | # |
| 534 | # 1. The authorization model must support it. Google Cloud Functions |
| 535 | # only allows EventTriggers to be deployed that observe resources in the |
| 536 | # same project as the `CloudFunction`. |
| 537 | # 2. The resource type must match the pattern expected for an |
| 538 | # `event_type`. For example, an `EventTrigger` that has an |
| 539 | # `event_type` of "google.pubsub.topic.publish" should have a resource |
| 540 | # that matches Google Cloud Pub/Sub topics. |
| 541 | # |
| 542 | # Additionally, some services may support short names when creating an |
| 543 | # `EventTrigger`. These will always be returned in the normalized "long" |
| 544 | # format. |
| 545 | # |
| 546 | # See each *service's* documentation for supported formats. |
| 547 | "service": "A String", # The hostname of the service that should be observed. |
| 548 | # |
| 549 | # If no string is provided, the default service implementing the API will |
| 550 | # be used. For example, `storage.googleapis.com` is the default for all |
| 551 | # event types in the `google.storage` namespace. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 552 | "eventType": "A String", # Required. The type of event to observe. For example: |
| 553 | # `providers/cloud.storage/eventTypes/object.change` and |
| 554 | # `providers/cloud.pubsub/eventTypes/topic.publish`. |
| 555 | # |
| 556 | # Event types match pattern `providers/*/eventTypes/*.*`. |
| 557 | # The pattern contains: |
| 558 | # |
| 559 | # 1. namespace: For example, `cloud.storage` and |
| 560 | # `google.firebase.analytics`. |
| 561 | # 2. resource type: The type of resource on which event occurs. For |
| 562 | # example, the Google Cloud Storage API includes the type `object`. |
| 563 | # 3. action: The action that generates the event. For example, action for |
| 564 | # a Google Cloud Storage Object is 'change'. |
| 565 | # These parts are lower case. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 566 | }, |
| 567 | "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 568 | "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature** |
| 569 | # |
| 570 | # The source repository where a function is hosted. |
| 571 | # source repository where a function is hosted. |
| 572 | "url": "A String", # The URL pointing to the hosted repository where the function is defined. |
| 573 | # There are supported Cloud Source Repository URLs in the following |
| 574 | # formats: |
| 575 | # |
| 576 | # To refer to a specific commit: |
| 577 | # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` |
| 578 | # To refer to a moveable alias (branch): |
| 579 | # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` |
| 580 | # In particular, to refer to HEAD use `master` moveable alias. |
| 581 | # To refer to a specific fixed alias (tag): |
| 582 | # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` |
| 583 | # |
| 584 | # You may omit `paths/*` if you want to use the main directory. |
| 585 | "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function |
| 586 | # were defined at the time of deployment. It always points to a specific |
| 587 | # commit in the format described above. |
| 588 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 589 | "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL. |
| 590 | "url": "A String", # Output only. The deployed url for the function. |
| 591 | }, |
| 592 | "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip |
| 593 | # archive which contains the function. |
| 594 | "labels": { # Labels associated with this Cloud Function. |
| 595 | "a_key": "A String", |
| 596 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 597 | "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted |
| 598 | # through it. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 599 | "network": "A String", # The VPC Network that this cloud function can connect to. It can be |
| 600 | # either the fully-qualified URI, or the short name of the network resource. |
| 601 | # If the short network name is used, the network must belong to the same |
| 602 | # project. Otherwise, it must belong to a project within the same |
| 603 | # organization. The format of this field is either |
| 604 | # `projects/{project}/global/networks/{network}` or `{network}`, where |
| 605 | # {project} is a project id where the network is defined, and {network} is |
| 606 | # the short name of the network. |
| 607 | # |
| 608 | # This field is mutually exclusive with `vpc_connector` and will be replaced |
| 609 | # by it. |
| 610 | # |
| 611 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 612 | # more information on connecting Cloud projects. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 613 | "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated |
| 614 | # by google.cloud.functions.v1.GenerateUploadUrl |
| 615 | "status": "A String", # Output only. Status of the function deployment. |
| 616 | "description": "A String", # User-provided description of a function. |
| 617 | "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a |
| 618 | # given time. |
| 619 | "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt |
| 620 | # results in a new version of a function being created. |
| 621 | "entryPoint": "A String", # The name of the function (as defined in source code) that will be |
| 622 | # executed. Defaults to the resource name suffix, if not specified. For |
| 623 | # backward compatibility, if function with given name is not found, then the |
| 624 | # system will try to use function named "function". |
| 625 | # For Node.js this is name of a function exported by the module specified |
| 626 | # in `source_location`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 627 | "name": "A String", # A user-defined name of the function. Function names must be unique |
| 628 | # globally and match pattern `projects/*/locations/*/functions/*` |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 629 | "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can |
| 630 | # be either the fully-qualified URI, or the short name of the network |
| 631 | # connector resource. The format of this field is |
| 632 | # `projects/*/locations/*/connectors/*` |
| 633 | # |
| 634 | # This field is mutually exclusive with `network` field and will eventually |
| 635 | # replace it. |
| 636 | # |
| 637 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 638 | # more information on connecting Cloud projects. |
| 639 | "environmentVariables": { # Environment variables that shall be available during function execution. |
| 640 | "a_key": "A String", |
| 641 | }, |
| 642 | "availableMemoryMb": 42, # The amount of memory in MB available for a function. |
| 643 | # Defaults to 256MB. |
| 644 | "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to |
| 645 | # `{project_id}@appspot.gserviceaccount.com`. |
| 646 | "timeout": "A String", # The function execution timeout. Execution is considered failed and |
| 647 | # can be terminated if the function is not completed at the end of the |
| 648 | # timeout period. Defaults to 60 seconds. |
| 649 | "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach |
| 650 | # it. |
| 651 | "runtime": "A String", # The runtime in which to run the function. Required when deploying a new |
| 652 | # function, optional when updating an existing function. For a complete |
| 653 | # list of possible choices, see the |
| 654 | # [`gcloud` command |
| 655 | # reference](/sdk/gcloud/reference/functions/deploy#--runtime). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 656 | }</pre> |
| 657 | </div> |
| 658 | |
| 659 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 660 | <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 661 | <pre>Gets the IAM access control policy for a function. |
| 662 | Returns an empty policy if the function exists and does not have a policy |
| 663 | set. |
| 664 | |
| 665 | Args: |
| 666 | resource: string, REQUIRED: The resource for which the policy is being requested. |
| 667 | 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^] | 668 | options_requestedPolicyVersion: integer, Optional. The policy format version to be returned. |
| 669 | |
| 670 | Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 671 | rejected. |
| 672 | |
| 673 | Requests for policies with any conditional bindings must specify version 3. |
| 674 | Policies without any conditional bindings may specify any valid value or |
| 675 | leave the field unset. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 676 | x__xgafv: string, V1 error format. |
| 677 | Allowed values |
| 678 | 1 - v1 error format |
| 679 | 2 - v2 error format |
| 680 | |
| 681 | Returns: |
| 682 | An object of the form: |
| 683 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 684 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 685 | # controls for Google Cloud resources. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 686 | # |
| 687 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 688 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 689 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 690 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 691 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 692 | # custom role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 693 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 694 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 695 | # expression that allows access to a resource only if the expression evaluates |
| 696 | # to `true`. A condition can add constraints based on attributes of the |
| 697 | # request, the resource, or both. |
| 698 | # |
| 699 | # **JSON example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 700 | # |
| 701 | # { |
| 702 | # "bindings": [ |
| 703 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 704 | # "role": "roles/resourcemanager.organizationAdmin", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 705 | # "members": [ |
| 706 | # "user:mike@example.com", |
| 707 | # "group:admins@example.com", |
| 708 | # "domain:google.com", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 709 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 710 | # ] |
| 711 | # }, |
| 712 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 713 | # "role": "roles/resourcemanager.organizationViewer", |
| 714 | # "members": ["user:eve@example.com"], |
| 715 | # "condition": { |
| 716 | # "title": "expirable access", |
| 717 | # "description": "Does not grant access after Sep 2020", |
| 718 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 719 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 720 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 721 | # ], |
| 722 | # "etag": "BwWWja0YfJA=", |
| 723 | # "version": 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 724 | # } |
| 725 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 726 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 727 | # |
| 728 | # bindings: |
| 729 | # - members: |
| 730 | # - user:mike@example.com |
| 731 | # - group:admins@example.com |
| 732 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 733 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 734 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 735 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 736 | # - user:eve@example.com |
| 737 | # role: roles/resourcemanager.organizationViewer |
| 738 | # condition: |
| 739 | # title: expirable access |
| 740 | # description: Does not grant access after Sep 2020 |
| 741 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
| 742 | # - etag: BwWWja0YfJA= |
| 743 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 744 | # |
| 745 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 746 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
| 747 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 748 | # `condition` that determines how and when the `bindings` are applied. Each |
| 749 | # of the `bindings` must contain at least one member. |
| 750 | { # Associates `members` with a `role`. |
| 751 | "role": "A String", # Role that is assigned to `members`. |
| 752 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 753 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 754 | # `members` can have the following values: |
| 755 | # |
| 756 | # * `allUsers`: A special identifier that represents anyone who is |
| 757 | # on the internet; with or without a Google account. |
| 758 | # |
| 759 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 760 | # who is authenticated with a Google account or a service account. |
| 761 | # |
| 762 | # * `user:{emailid}`: An email address that represents a specific Google |
| 763 | # account. For example, `alice@example.com` . |
| 764 | # |
| 765 | # |
| 766 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 767 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 768 | # |
| 769 | # * `group:{emailid}`: An email address that represents a Google group. |
| 770 | # For example, `admins@example.com`. |
| 771 | # |
| 772 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 773 | # identifier) representing a user that has been recently deleted. For |
| 774 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 775 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 776 | # retains the role in the binding. |
| 777 | # |
| 778 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 779 | # unique identifier) representing a service account that has been recently |
| 780 | # deleted. For example, |
| 781 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 782 | # If the service account is undeleted, this value reverts to |
| 783 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 784 | # role in the binding. |
| 785 | # |
| 786 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 787 | # identifier) representing a Google group that has been recently |
| 788 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 789 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 790 | # recovered group retains the role in the binding. |
| 791 | # |
| 792 | # |
| 793 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 794 | # users of that domain. For example, `google.com` or `example.com`. |
| 795 | # |
| 796 | "A String", |
| 797 | ], |
| 798 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 799 | # NOTE: An unsatisfied condition will not allow user access via current |
| 800 | # binding. Different bindings, including their conditions, are examined |
| 801 | # independently. |
| 802 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 803 | # are documented at https://github.com/google/cel-spec. |
| 804 | # |
| 805 | # Example (Comparison): |
| 806 | # |
| 807 | # title: "Summary size limit" |
| 808 | # description: "Determines if a summary is less than 100 chars" |
| 809 | # expression: "document.summary.size() < 100" |
| 810 | # |
| 811 | # Example (Equality): |
| 812 | # |
| 813 | # title: "Requestor is owner" |
| 814 | # description: "Determines if requestor is the document owner" |
| 815 | # expression: "document.owner == request.auth.claims.email" |
| 816 | # |
| 817 | # Example (Logic): |
| 818 | # |
| 819 | # title: "Public documents" |
| 820 | # description: "Determine whether the document should be publicly visible" |
| 821 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 822 | # |
| 823 | # Example (Data Manipulation): |
| 824 | # |
| 825 | # title: "Notification string" |
| 826 | # description: "Create a notification string with a timestamp." |
| 827 | # expression: "'New message received at ' + string(document.create_time)" |
| 828 | # |
| 829 | # The exact variables and functions that may be referenced within an expression |
| 830 | # are determined by the service that evaluates it. See the service |
| 831 | # documentation for additional information. |
| 832 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 833 | # reporting, e.g. a file name and a position in the file. |
| 834 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 835 | # syntax. |
| 836 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 837 | # describes the expression, e.g. when hovered over it in a UI. |
| 838 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 839 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 840 | # expression. |
| 841 | }, |
| 842 | }, |
| 843 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 844 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 845 | { # Specifies the audit configuration for a service. |
| 846 | # The configuration determines which permission types are logged, and what |
| 847 | # identities, if any, are exempted from logging. |
| 848 | # An AuditConfig must have one or more AuditLogConfigs. |
| 849 | # |
| 850 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 851 | # the union of the two AuditConfigs is used for that service: the log_types |
| 852 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 853 | # AuditLogConfig are exempted. |
| 854 | # |
| 855 | # Example Policy with multiple AuditConfigs: |
| 856 | # |
| 857 | # { |
| 858 | # "audit_configs": [ |
| 859 | # { |
| 860 | # "service": "allServices" |
| 861 | # "audit_log_configs": [ |
| 862 | # { |
| 863 | # "log_type": "DATA_READ", |
| 864 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 865 | # "user:jose@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 866 | # ] |
| 867 | # }, |
| 868 | # { |
| 869 | # "log_type": "DATA_WRITE", |
| 870 | # }, |
| 871 | # { |
| 872 | # "log_type": "ADMIN_READ", |
| 873 | # } |
| 874 | # ] |
| 875 | # }, |
| 876 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 877 | # "service": "sampleservice.googleapis.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 878 | # "audit_log_configs": [ |
| 879 | # { |
| 880 | # "log_type": "DATA_READ", |
| 881 | # }, |
| 882 | # { |
| 883 | # "log_type": "DATA_WRITE", |
| 884 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 885 | # "user:aliya@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 886 | # ] |
| 887 | # } |
| 888 | # ] |
| 889 | # } |
| 890 | # ] |
| 891 | # } |
| 892 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 893 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 894 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 895 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 896 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 897 | { # Provides the configuration for logging a type of permissions. |
| 898 | # Example: |
| 899 | # |
| 900 | # { |
| 901 | # "audit_log_configs": [ |
| 902 | # { |
| 903 | # "log_type": "DATA_READ", |
| 904 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 905 | # "user:jose@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 906 | # ] |
| 907 | # }, |
| 908 | # { |
| 909 | # "log_type": "DATA_WRITE", |
| 910 | # } |
| 911 | # ] |
| 912 | # } |
| 913 | # |
| 914 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 915 | # jose@example.com from DATA_READ logging. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 916 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 917 | # permission. |
| 918 | # Follows the same format of Binding.members. |
| 919 | "A String", |
| 920 | ], |
| 921 | "logType": "A String", # The log type that this config enables. |
| 922 | }, |
| 923 | ], |
| 924 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 925 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 926 | # `allServices` is a special value that covers all services. |
| 927 | }, |
| 928 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 929 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 930 | # prevent simultaneous updates of a policy from overwriting each other. |
| 931 | # It is strongly suggested that systems make use of the `etag` in the |
| 932 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 933 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 934 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 935 | # ensure that their change will be applied to the same version of the policy. |
| 936 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 937 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 938 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 939 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 940 | # the conditions in the version `3` policy are lost. |
| 941 | "version": 42, # Specifies the format of the policy. |
| 942 | # |
| 943 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 944 | # are rejected. |
| 945 | # |
| 946 | # Any operation that affects conditional role bindings must specify version |
| 947 | # `3`. This requirement applies to the following operations: |
| 948 | # |
| 949 | # * Getting a policy that includes a conditional role binding |
| 950 | # * Adding a conditional role binding to a policy |
| 951 | # * Changing a conditional role binding in a policy |
| 952 | # * Removing any role binding, with or without a condition, from a policy |
| 953 | # that includes conditions |
| 954 | # |
| 955 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 956 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 957 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 958 | # the conditions in the version `3` policy are lost. |
| 959 | # |
| 960 | # If a policy does not include any conditions, operations on that policy may |
| 961 | # specify any valid version or leave the field unset. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 962 | }</pre> |
| 963 | </div> |
| 964 | |
| 965 | <div class="method"> |
| 966 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 967 | <pre>Returns a list of functions that belong to the requested project. |
| 968 | |
| 969 | Args: |
| 970 | parent: string, The project and location from which the function should be listed, |
| 971 | specified in the format `projects/*/locations/*` |
| 972 | If you want to list functions in all locations, use "-" in place of a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 973 | location. When listing functions in all locations, if one or more |
| 974 | location(s) are unreachable, the response will contain functions from all |
| 975 | reachable locations along with the names of any unreachable locations. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 976 | pageSize: integer, Maximum number of functions to return per call. |
| 977 | pageToken: string, The value returned by the last |
| 978 | `ListFunctionsResponse`; indicates that |
| 979 | this is a continuation of a prior `ListFunctions` call, and that the |
| 980 | system should return the next page of data. |
| 981 | x__xgafv: string, V1 error format. |
| 982 | Allowed values |
| 983 | 1 - v1 error format |
| 984 | 2 - v2 error format |
| 985 | |
| 986 | Returns: |
| 987 | An object of the form: |
| 988 | |
| 989 | { # Response for the `ListFunctions` method. |
| 990 | "nextPageToken": "A String", # If not empty, indicates that there may be more functions that match |
| 991 | # the request; this value should be passed in a new |
| 992 | # google.cloud.functions.v1.ListFunctionsRequest |
| 993 | # to get more functions. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 994 | "unreachable": [ # Locations that could not be reached. The response does not include any |
| 995 | # functions from these locations. |
| 996 | "A String", |
| 997 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 998 | "functions": [ # The functions that match the request. |
| 999 | { # Describes a Cloud Function that contains user computation executed in |
| 1000 | # response to an event. It encapsulate function and triggers configurations. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1001 | "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service. |
| 1002 | # service. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1003 | "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions. |
| 1004 | # If empty, then defaults to ignoring failures (i.e. not retrying them). |
| 1005 | "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure. |
| 1006 | # A function execution will be retried on any failure. |
| 1007 | # A failed execution will be retried up to 7 days with an exponential backoff |
| 1008 | # (capped at 10 seconds). |
| 1009 | # Retried execution is charged as any other execution. |
| 1010 | }, |
| 1011 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1012 | "resource": "A String", # Required. The resource(s) from which to observe events, for example, |
| 1013 | # `projects/_/buckets/myBucket`. |
| 1014 | # |
| 1015 | # Not all syntactically correct values are accepted by all services. For |
| 1016 | # example: |
| 1017 | # |
| 1018 | # 1. The authorization model must support it. Google Cloud Functions |
| 1019 | # only allows EventTriggers to be deployed that observe resources in the |
| 1020 | # same project as the `CloudFunction`. |
| 1021 | # 2. The resource type must match the pattern expected for an |
| 1022 | # `event_type`. For example, an `EventTrigger` that has an |
| 1023 | # `event_type` of "google.pubsub.topic.publish" should have a resource |
| 1024 | # that matches Google Cloud Pub/Sub topics. |
| 1025 | # |
| 1026 | # Additionally, some services may support short names when creating an |
| 1027 | # `EventTrigger`. These will always be returned in the normalized "long" |
| 1028 | # format. |
| 1029 | # |
| 1030 | # See each *service's* documentation for supported formats. |
| 1031 | "service": "A String", # The hostname of the service that should be observed. |
| 1032 | # |
| 1033 | # If no string is provided, the default service implementing the API will |
| 1034 | # be used. For example, `storage.googleapis.com` is the default for all |
| 1035 | # event types in the `google.storage` namespace. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1036 | "eventType": "A String", # Required. The type of event to observe. For example: |
| 1037 | # `providers/cloud.storage/eventTypes/object.change` and |
| 1038 | # `providers/cloud.pubsub/eventTypes/topic.publish`. |
| 1039 | # |
| 1040 | # Event types match pattern `providers/*/eventTypes/*.*`. |
| 1041 | # The pattern contains: |
| 1042 | # |
| 1043 | # 1. namespace: For example, `cloud.storage` and |
| 1044 | # `google.firebase.analytics`. |
| 1045 | # 2. resource type: The type of resource on which event occurs. For |
| 1046 | # example, the Google Cloud Storage API includes the type `object`. |
| 1047 | # 3. action: The action that generates the event. For example, action for |
| 1048 | # a Google Cloud Storage Object is 'change'. |
| 1049 | # These parts are lower case. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1050 | }, |
| 1051 | "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1052 | "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature** |
| 1053 | # |
| 1054 | # The source repository where a function is hosted. |
| 1055 | # source repository where a function is hosted. |
| 1056 | "url": "A String", # The URL pointing to the hosted repository where the function is defined. |
| 1057 | # There are supported Cloud Source Repository URLs in the following |
| 1058 | # formats: |
| 1059 | # |
| 1060 | # To refer to a specific commit: |
| 1061 | # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` |
| 1062 | # To refer to a moveable alias (branch): |
| 1063 | # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` |
| 1064 | # In particular, to refer to HEAD use `master` moveable alias. |
| 1065 | # To refer to a specific fixed alias (tag): |
| 1066 | # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` |
| 1067 | # |
| 1068 | # You may omit `paths/*` if you want to use the main directory. |
| 1069 | "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function |
| 1070 | # were defined at the time of deployment. It always points to a specific |
| 1071 | # commit in the format described above. |
| 1072 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1073 | "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL. |
| 1074 | "url": "A String", # Output only. The deployed url for the function. |
| 1075 | }, |
| 1076 | "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip |
| 1077 | # archive which contains the function. |
| 1078 | "labels": { # Labels associated with this Cloud Function. |
| 1079 | "a_key": "A String", |
| 1080 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1081 | "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted |
| 1082 | # through it. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1083 | "network": "A String", # The VPC Network that this cloud function can connect to. It can be |
| 1084 | # either the fully-qualified URI, or the short name of the network resource. |
| 1085 | # If the short network name is used, the network must belong to the same |
| 1086 | # project. Otherwise, it must belong to a project within the same |
| 1087 | # organization. The format of this field is either |
| 1088 | # `projects/{project}/global/networks/{network}` or `{network}`, where |
| 1089 | # {project} is a project id where the network is defined, and {network} is |
| 1090 | # the short name of the network. |
| 1091 | # |
| 1092 | # This field is mutually exclusive with `vpc_connector` and will be replaced |
| 1093 | # by it. |
| 1094 | # |
| 1095 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 1096 | # more information on connecting Cloud projects. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1097 | "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated |
| 1098 | # by google.cloud.functions.v1.GenerateUploadUrl |
| 1099 | "status": "A String", # Output only. Status of the function deployment. |
| 1100 | "description": "A String", # User-provided description of a function. |
| 1101 | "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a |
| 1102 | # given time. |
| 1103 | "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt |
| 1104 | # results in a new version of a function being created. |
| 1105 | "entryPoint": "A String", # The name of the function (as defined in source code) that will be |
| 1106 | # executed. Defaults to the resource name suffix, if not specified. For |
| 1107 | # backward compatibility, if function with given name is not found, then the |
| 1108 | # system will try to use function named "function". |
| 1109 | # For Node.js this is name of a function exported by the module specified |
| 1110 | # in `source_location`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1111 | "name": "A String", # A user-defined name of the function. Function names must be unique |
| 1112 | # globally and match pattern `projects/*/locations/*/functions/*` |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1113 | "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can |
| 1114 | # be either the fully-qualified URI, or the short name of the network |
| 1115 | # connector resource. The format of this field is |
| 1116 | # `projects/*/locations/*/connectors/*` |
| 1117 | # |
| 1118 | # This field is mutually exclusive with `network` field and will eventually |
| 1119 | # replace it. |
| 1120 | # |
| 1121 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 1122 | # more information on connecting Cloud projects. |
| 1123 | "environmentVariables": { # Environment variables that shall be available during function execution. |
| 1124 | "a_key": "A String", |
| 1125 | }, |
| 1126 | "availableMemoryMb": 42, # The amount of memory in MB available for a function. |
| 1127 | # Defaults to 256MB. |
| 1128 | "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to |
| 1129 | # `{project_id}@appspot.gserviceaccount.com`. |
| 1130 | "timeout": "A String", # The function execution timeout. Execution is considered failed and |
| 1131 | # can be terminated if the function is not completed at the end of the |
| 1132 | # timeout period. Defaults to 60 seconds. |
| 1133 | "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach |
| 1134 | # it. |
| 1135 | "runtime": "A String", # The runtime in which to run the function. Required when deploying a new |
| 1136 | # function, optional when updating an existing function. For a complete |
| 1137 | # list of possible choices, see the |
| 1138 | # [`gcloud` command |
| 1139 | # reference](/sdk/gcloud/reference/functions/deploy#--runtime). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1140 | }, |
| 1141 | ], |
| 1142 | }</pre> |
| 1143 | </div> |
| 1144 | |
| 1145 | <div class="method"> |
| 1146 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1147 | <pre>Retrieves the next page of results. |
| 1148 | |
| 1149 | Args: |
| 1150 | previous_request: The request for the previous page. (required) |
| 1151 | previous_response: The response from the request for the previous page. (required) |
| 1152 | |
| 1153 | Returns: |
| 1154 | A request object that you can call 'execute()' on to request the next |
| 1155 | page. Returns None if there are no more items in the collection. |
| 1156 | </pre> |
| 1157 | </div> |
| 1158 | |
| 1159 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1160 | <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] | 1161 | <pre>Updates existing function. |
| 1162 | |
| 1163 | Args: |
| 1164 | name: string, A user-defined name of the function. Function names must be unique |
| 1165 | globally and match pattern `projects/*/locations/*/functions/*` (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1166 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1167 | The object takes the form of: |
| 1168 | |
| 1169 | { # Describes a Cloud Function that contains user computation executed in |
| 1170 | # response to an event. It encapsulate function and triggers configurations. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1171 | "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service. |
| 1172 | # service. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1173 | "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions. |
| 1174 | # If empty, then defaults to ignoring failures (i.e. not retrying them). |
| 1175 | "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure. |
| 1176 | # A function execution will be retried on any failure. |
| 1177 | # A failed execution will be retried up to 7 days with an exponential backoff |
| 1178 | # (capped at 10 seconds). |
| 1179 | # Retried execution is charged as any other execution. |
| 1180 | }, |
| 1181 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1182 | "resource": "A String", # Required. The resource(s) from which to observe events, for example, |
| 1183 | # `projects/_/buckets/myBucket`. |
| 1184 | # |
| 1185 | # Not all syntactically correct values are accepted by all services. For |
| 1186 | # example: |
| 1187 | # |
| 1188 | # 1. The authorization model must support it. Google Cloud Functions |
| 1189 | # only allows EventTriggers to be deployed that observe resources in the |
| 1190 | # same project as the `CloudFunction`. |
| 1191 | # 2. The resource type must match the pattern expected for an |
| 1192 | # `event_type`. For example, an `EventTrigger` that has an |
| 1193 | # `event_type` of "google.pubsub.topic.publish" should have a resource |
| 1194 | # that matches Google Cloud Pub/Sub topics. |
| 1195 | # |
| 1196 | # Additionally, some services may support short names when creating an |
| 1197 | # `EventTrigger`. These will always be returned in the normalized "long" |
| 1198 | # format. |
| 1199 | # |
| 1200 | # See each *service's* documentation for supported formats. |
| 1201 | "service": "A String", # The hostname of the service that should be observed. |
| 1202 | # |
| 1203 | # If no string is provided, the default service implementing the API will |
| 1204 | # be used. For example, `storage.googleapis.com` is the default for all |
| 1205 | # event types in the `google.storage` namespace. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1206 | "eventType": "A String", # Required. The type of event to observe. For example: |
| 1207 | # `providers/cloud.storage/eventTypes/object.change` and |
| 1208 | # `providers/cloud.pubsub/eventTypes/topic.publish`. |
| 1209 | # |
| 1210 | # Event types match pattern `providers/*/eventTypes/*.*`. |
| 1211 | # The pattern contains: |
| 1212 | # |
| 1213 | # 1. namespace: For example, `cloud.storage` and |
| 1214 | # `google.firebase.analytics`. |
| 1215 | # 2. resource type: The type of resource on which event occurs. For |
| 1216 | # example, the Google Cloud Storage API includes the type `object`. |
| 1217 | # 3. action: The action that generates the event. For example, action for |
| 1218 | # a Google Cloud Storage Object is 'change'. |
| 1219 | # These parts are lower case. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1220 | }, |
| 1221 | "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1222 | "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature** |
| 1223 | # |
| 1224 | # The source repository where a function is hosted. |
| 1225 | # source repository where a function is hosted. |
| 1226 | "url": "A String", # The URL pointing to the hosted repository where the function is defined. |
| 1227 | # There are supported Cloud Source Repository URLs in the following |
| 1228 | # formats: |
| 1229 | # |
| 1230 | # To refer to a specific commit: |
| 1231 | # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` |
| 1232 | # To refer to a moveable alias (branch): |
| 1233 | # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` |
| 1234 | # In particular, to refer to HEAD use `master` moveable alias. |
| 1235 | # To refer to a specific fixed alias (tag): |
| 1236 | # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` |
| 1237 | # |
| 1238 | # You may omit `paths/*` if you want to use the main directory. |
| 1239 | "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function |
| 1240 | # were defined at the time of deployment. It always points to a specific |
| 1241 | # commit in the format described above. |
| 1242 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1243 | "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL. |
| 1244 | "url": "A String", # Output only. The deployed url for the function. |
| 1245 | }, |
| 1246 | "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip |
| 1247 | # archive which contains the function. |
| 1248 | "labels": { # Labels associated with this Cloud Function. |
| 1249 | "a_key": "A String", |
| 1250 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1251 | "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted |
| 1252 | # through it. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1253 | "network": "A String", # The VPC Network that this cloud function can connect to. It can be |
| 1254 | # either the fully-qualified URI, or the short name of the network resource. |
| 1255 | # If the short network name is used, the network must belong to the same |
| 1256 | # project. Otherwise, it must belong to a project within the same |
| 1257 | # organization. The format of this field is either |
| 1258 | # `projects/{project}/global/networks/{network}` or `{network}`, where |
| 1259 | # {project} is a project id where the network is defined, and {network} is |
| 1260 | # the short name of the network. |
| 1261 | # |
| 1262 | # This field is mutually exclusive with `vpc_connector` and will be replaced |
| 1263 | # by it. |
| 1264 | # |
| 1265 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 1266 | # more information on connecting Cloud projects. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1267 | "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated |
| 1268 | # by google.cloud.functions.v1.GenerateUploadUrl |
| 1269 | "status": "A String", # Output only. Status of the function deployment. |
| 1270 | "description": "A String", # User-provided description of a function. |
| 1271 | "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a |
| 1272 | # given time. |
| 1273 | "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt |
| 1274 | # results in a new version of a function being created. |
| 1275 | "entryPoint": "A String", # The name of the function (as defined in source code) that will be |
| 1276 | # executed. Defaults to the resource name suffix, if not specified. For |
| 1277 | # backward compatibility, if function with given name is not found, then the |
| 1278 | # system will try to use function named "function". |
| 1279 | # For Node.js this is name of a function exported by the module specified |
| 1280 | # in `source_location`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1281 | "name": "A String", # A user-defined name of the function. Function names must be unique |
| 1282 | # globally and match pattern `projects/*/locations/*/functions/*` |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1283 | "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can |
| 1284 | # be either the fully-qualified URI, or the short name of the network |
| 1285 | # connector resource. The format of this field is |
| 1286 | # `projects/*/locations/*/connectors/*` |
| 1287 | # |
| 1288 | # This field is mutually exclusive with `network` field and will eventually |
| 1289 | # replace it. |
| 1290 | # |
| 1291 | # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for |
| 1292 | # more information on connecting Cloud projects. |
| 1293 | "environmentVariables": { # Environment variables that shall be available during function execution. |
| 1294 | "a_key": "A String", |
| 1295 | }, |
| 1296 | "availableMemoryMb": 42, # The amount of memory in MB available for a function. |
| 1297 | # Defaults to 256MB. |
| 1298 | "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to |
| 1299 | # `{project_id}@appspot.gserviceaccount.com`. |
| 1300 | "timeout": "A String", # The function execution timeout. Execution is considered failed and |
| 1301 | # can be terminated if the function is not completed at the end of the |
| 1302 | # timeout period. Defaults to 60 seconds. |
| 1303 | "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach |
| 1304 | # it. |
| 1305 | "runtime": "A String", # The runtime in which to run the function. Required when deploying a new |
| 1306 | # function, optional when updating an existing function. For a complete |
| 1307 | # list of possible choices, see the |
| 1308 | # [`gcloud` command |
| 1309 | # reference](/sdk/gcloud/reference/functions/deploy#--runtime). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1310 | } |
| 1311 | |
| 1312 | updateMask: string, Required list of fields to be updated in this request. |
| 1313 | x__xgafv: string, V1 error format. |
| 1314 | Allowed values |
| 1315 | 1 - v1 error format |
| 1316 | 2 - v2 error format |
| 1317 | |
| 1318 | Returns: |
| 1319 | An object of the form: |
| 1320 | |
| 1321 | { # This resource represents a long-running operation that is the result of a |
| 1322 | # network API call. |
| 1323 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 1324 | # contains progress information and common metadata such as create time. |
| 1325 | # Some services might not provide such metadata. Any method that returns a |
| 1326 | # long-running operation should document the metadata type, if any. |
| 1327 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1328 | }, |
| 1329 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. |
| 1330 | # different programming environments, including REST APIs and RPC APIs. It is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1331 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 1332 | # three pieces of data: error code, error message, and error details. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1333 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1334 | # You can find out more about this error model and how to work with it in the |
| 1335 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1336 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 1337 | # user-facing error message should be localized and sent in the |
| 1338 | # google.rpc.Status.details field, or localized by the client. |
| 1339 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 1340 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 1341 | # message types for APIs to use. |
| 1342 | { |
| 1343 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1344 | }, |
| 1345 | ], |
| 1346 | }, |
| 1347 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 1348 | # If `true`, the operation is completed, and either `error` or `response` is |
| 1349 | # available. |
| 1350 | "response": { # The normal response of the operation in case of success. If the original |
| 1351 | # method returns no data on success, such as `Delete`, the response is |
| 1352 | # `google.protobuf.Empty`. If the original method is standard |
| 1353 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 1354 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 1355 | # is the original method name. For example, if the original method name |
| 1356 | # is `TakeSnapshot()`, the inferred response type is |
| 1357 | # `TakeSnapshotResponse`. |
| 1358 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 1359 | }, |
| 1360 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 1361 | # originally returns it. If you use the default HTTP mapping, the |
| 1362 | # `name` should be a resource name ending with `operations/{unique_id}`. |
| 1363 | }</pre> |
| 1364 | </div> |
| 1365 | |
| 1366 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1367 | <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] | 1368 | <pre>Sets the IAM access control policy on the specified function. |
| 1369 | Replaces any existing policy. |
| 1370 | |
| 1371 | Args: |
| 1372 | resource: string, REQUIRED: The resource for which the policy is being specified. |
| 1373 | 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^] | 1374 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1375 | The object takes the form of: |
| 1376 | |
| 1377 | { # Request message for `SetIamPolicy` method. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1378 | "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] | 1379 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 1380 | # valid policy but certain Cloud Platform services (such as Projects) |
| 1381 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1382 | # controls for Google Cloud resources. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1383 | # |
| 1384 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1385 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1386 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1387 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1388 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1389 | # custom role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1390 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1391 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 1392 | # expression that allows access to a resource only if the expression evaluates |
| 1393 | # to `true`. A condition can add constraints based on attributes of the |
| 1394 | # request, the resource, or both. |
| 1395 | # |
| 1396 | # **JSON example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1397 | # |
| 1398 | # { |
| 1399 | # "bindings": [ |
| 1400 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1401 | # "role": "roles/resourcemanager.organizationAdmin", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1402 | # "members": [ |
| 1403 | # "user:mike@example.com", |
| 1404 | # "group:admins@example.com", |
| 1405 | # "domain:google.com", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1406 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1407 | # ] |
| 1408 | # }, |
| 1409 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1410 | # "role": "roles/resourcemanager.organizationViewer", |
| 1411 | # "members": ["user:eve@example.com"], |
| 1412 | # "condition": { |
| 1413 | # "title": "expirable access", |
| 1414 | # "description": "Does not grant access after Sep 2020", |
| 1415 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 1416 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1417 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1418 | # ], |
| 1419 | # "etag": "BwWWja0YfJA=", |
| 1420 | # "version": 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1421 | # } |
| 1422 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1423 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1424 | # |
| 1425 | # bindings: |
| 1426 | # - members: |
| 1427 | # - user:mike@example.com |
| 1428 | # - group:admins@example.com |
| 1429 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1430 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1431 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1432 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1433 | # - user:eve@example.com |
| 1434 | # role: roles/resourcemanager.organizationViewer |
| 1435 | # condition: |
| 1436 | # title: expirable access |
| 1437 | # description: Does not grant access after Sep 2020 |
| 1438 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
| 1439 | # - etag: BwWWja0YfJA= |
| 1440 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1441 | # |
| 1442 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1443 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
| 1444 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 1445 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1446 | # of the `bindings` must contain at least one member. |
| 1447 | { # Associates `members` with a `role`. |
| 1448 | "role": "A String", # Role that is assigned to `members`. |
| 1449 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 1450 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 1451 | # `members` can have the following values: |
| 1452 | # |
| 1453 | # * `allUsers`: A special identifier that represents anyone who is |
| 1454 | # on the internet; with or without a Google account. |
| 1455 | # |
| 1456 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1457 | # who is authenticated with a Google account or a service account. |
| 1458 | # |
| 1459 | # * `user:{emailid}`: An email address that represents a specific Google |
| 1460 | # account. For example, `alice@example.com` . |
| 1461 | # |
| 1462 | # |
| 1463 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1464 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1465 | # |
| 1466 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1467 | # For example, `admins@example.com`. |
| 1468 | # |
| 1469 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1470 | # identifier) representing a user that has been recently deleted. For |
| 1471 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1472 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1473 | # retains the role in the binding. |
| 1474 | # |
| 1475 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1476 | # unique identifier) representing a service account that has been recently |
| 1477 | # deleted. For example, |
| 1478 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1479 | # If the service account is undeleted, this value reverts to |
| 1480 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1481 | # role in the binding. |
| 1482 | # |
| 1483 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1484 | # identifier) representing a Google group that has been recently |
| 1485 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1486 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1487 | # recovered group retains the role in the binding. |
| 1488 | # |
| 1489 | # |
| 1490 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 1491 | # users of that domain. For example, `google.com` or `example.com`. |
| 1492 | # |
| 1493 | "A String", |
| 1494 | ], |
| 1495 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1496 | # NOTE: An unsatisfied condition will not allow user access via current |
| 1497 | # binding. Different bindings, including their conditions, are examined |
| 1498 | # independently. |
| 1499 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1500 | # are documented at https://github.com/google/cel-spec. |
| 1501 | # |
| 1502 | # Example (Comparison): |
| 1503 | # |
| 1504 | # title: "Summary size limit" |
| 1505 | # description: "Determines if a summary is less than 100 chars" |
| 1506 | # expression: "document.summary.size() < 100" |
| 1507 | # |
| 1508 | # Example (Equality): |
| 1509 | # |
| 1510 | # title: "Requestor is owner" |
| 1511 | # description: "Determines if requestor is the document owner" |
| 1512 | # expression: "document.owner == request.auth.claims.email" |
| 1513 | # |
| 1514 | # Example (Logic): |
| 1515 | # |
| 1516 | # title: "Public documents" |
| 1517 | # description: "Determine whether the document should be publicly visible" |
| 1518 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1519 | # |
| 1520 | # Example (Data Manipulation): |
| 1521 | # |
| 1522 | # title: "Notification string" |
| 1523 | # description: "Create a notification string with a timestamp." |
| 1524 | # expression: "'New message received at ' + string(document.create_time)" |
| 1525 | # |
| 1526 | # The exact variables and functions that may be referenced within an expression |
| 1527 | # are determined by the service that evaluates it. See the service |
| 1528 | # documentation for additional information. |
| 1529 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1530 | # reporting, e.g. a file name and a position in the file. |
| 1531 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1532 | # syntax. |
| 1533 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1534 | # describes the expression, e.g. when hovered over it in a UI. |
| 1535 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1536 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1537 | # expression. |
| 1538 | }, |
| 1539 | }, |
| 1540 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1541 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1542 | { # Specifies the audit configuration for a service. |
| 1543 | # The configuration determines which permission types are logged, and what |
| 1544 | # identities, if any, are exempted from logging. |
| 1545 | # An AuditConfig must have one or more AuditLogConfigs. |
| 1546 | # |
| 1547 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 1548 | # the union of the two AuditConfigs is used for that service: the log_types |
| 1549 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 1550 | # AuditLogConfig are exempted. |
| 1551 | # |
| 1552 | # Example Policy with multiple AuditConfigs: |
| 1553 | # |
| 1554 | # { |
| 1555 | # "audit_configs": [ |
| 1556 | # { |
| 1557 | # "service": "allServices" |
| 1558 | # "audit_log_configs": [ |
| 1559 | # { |
| 1560 | # "log_type": "DATA_READ", |
| 1561 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1562 | # "user:jose@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1563 | # ] |
| 1564 | # }, |
| 1565 | # { |
| 1566 | # "log_type": "DATA_WRITE", |
| 1567 | # }, |
| 1568 | # { |
| 1569 | # "log_type": "ADMIN_READ", |
| 1570 | # } |
| 1571 | # ] |
| 1572 | # }, |
| 1573 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1574 | # "service": "sampleservice.googleapis.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1575 | # "audit_log_configs": [ |
| 1576 | # { |
| 1577 | # "log_type": "DATA_READ", |
| 1578 | # }, |
| 1579 | # { |
| 1580 | # "log_type": "DATA_WRITE", |
| 1581 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1582 | # "user:aliya@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1583 | # ] |
| 1584 | # } |
| 1585 | # ] |
| 1586 | # } |
| 1587 | # ] |
| 1588 | # } |
| 1589 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1590 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 1591 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 1592 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1593 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1594 | { # Provides the configuration for logging a type of permissions. |
| 1595 | # Example: |
| 1596 | # |
| 1597 | # { |
| 1598 | # "audit_log_configs": [ |
| 1599 | # { |
| 1600 | # "log_type": "DATA_READ", |
| 1601 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1602 | # "user:jose@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1603 | # ] |
| 1604 | # }, |
| 1605 | # { |
| 1606 | # "log_type": "DATA_WRITE", |
| 1607 | # } |
| 1608 | # ] |
| 1609 | # } |
| 1610 | # |
| 1611 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1612 | # jose@example.com from DATA_READ logging. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1613 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 1614 | # permission. |
| 1615 | # Follows the same format of Binding.members. |
| 1616 | "A String", |
| 1617 | ], |
| 1618 | "logType": "A String", # The log type that this config enables. |
| 1619 | }, |
| 1620 | ], |
| 1621 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 1622 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1623 | # `allServices` is a special value that covers all services. |
| 1624 | }, |
| 1625 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1626 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1627 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1628 | # It is strongly suggested that systems make use of the `etag` in the |
| 1629 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1630 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1631 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1632 | # ensure that their change will be applied to the same version of the policy. |
| 1633 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1634 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1635 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1636 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1637 | # the conditions in the version `3` policy are lost. |
| 1638 | "version": 42, # Specifies the format of the policy. |
| 1639 | # |
| 1640 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1641 | # are rejected. |
| 1642 | # |
| 1643 | # Any operation that affects conditional role bindings must specify version |
| 1644 | # `3`. This requirement applies to the following operations: |
| 1645 | # |
| 1646 | # * Getting a policy that includes a conditional role binding |
| 1647 | # * Adding a conditional role binding to a policy |
| 1648 | # * Changing a conditional role binding in a policy |
| 1649 | # * Removing any role binding, with or without a condition, from a policy |
| 1650 | # that includes conditions |
| 1651 | # |
| 1652 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1653 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1654 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1655 | # the conditions in the version `3` policy are lost. |
| 1656 | # |
| 1657 | # If a policy does not include any conditions, operations on that policy may |
| 1658 | # specify any valid version or leave the field unset. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1659 | }, |
| 1660 | "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 1661 | # the fields in the mask will be modified. If no mask is provided, the |
| 1662 | # following default mask is used: |
| 1663 | # paths: "bindings, etag" |
| 1664 | # This field is only used by Cloud IAM. |
| 1665 | } |
| 1666 | |
| 1667 | x__xgafv: string, V1 error format. |
| 1668 | Allowed values |
| 1669 | 1 - v1 error format |
| 1670 | 2 - v2 error format |
| 1671 | |
| 1672 | Returns: |
| 1673 | An object of the form: |
| 1674 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1675 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 1676 | # controls for Google Cloud resources. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1677 | # |
| 1678 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1679 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 1680 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 1681 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 1682 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 1683 | # custom role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1684 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1685 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 1686 | # expression that allows access to a resource only if the expression evaluates |
| 1687 | # to `true`. A condition can add constraints based on attributes of the |
| 1688 | # request, the resource, or both. |
| 1689 | # |
| 1690 | # **JSON example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1691 | # |
| 1692 | # { |
| 1693 | # "bindings": [ |
| 1694 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1695 | # "role": "roles/resourcemanager.organizationAdmin", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1696 | # "members": [ |
| 1697 | # "user:mike@example.com", |
| 1698 | # "group:admins@example.com", |
| 1699 | # "domain:google.com", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1700 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1701 | # ] |
| 1702 | # }, |
| 1703 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1704 | # "role": "roles/resourcemanager.organizationViewer", |
| 1705 | # "members": ["user:eve@example.com"], |
| 1706 | # "condition": { |
| 1707 | # "title": "expirable access", |
| 1708 | # "description": "Does not grant access after Sep 2020", |
| 1709 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 1710 | # } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1711 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1712 | # ], |
| 1713 | # "etag": "BwWWja0YfJA=", |
| 1714 | # "version": 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1715 | # } |
| 1716 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1717 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1718 | # |
| 1719 | # bindings: |
| 1720 | # - members: |
| 1721 | # - user:mike@example.com |
| 1722 | # - group:admins@example.com |
| 1723 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1724 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 1725 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1726 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1727 | # - user:eve@example.com |
| 1728 | # role: roles/resourcemanager.organizationViewer |
| 1729 | # condition: |
| 1730 | # title: expirable access |
| 1731 | # description: Does not grant access after Sep 2020 |
| 1732 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
| 1733 | # - etag: BwWWja0YfJA= |
| 1734 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1735 | # |
| 1736 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1737 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
| 1738 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 1739 | # `condition` that determines how and when the `bindings` are applied. Each |
| 1740 | # of the `bindings` must contain at least one member. |
| 1741 | { # Associates `members` with a `role`. |
| 1742 | "role": "A String", # Role that is assigned to `members`. |
| 1743 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 1744 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 1745 | # `members` can have the following values: |
| 1746 | # |
| 1747 | # * `allUsers`: A special identifier that represents anyone who is |
| 1748 | # on the internet; with or without a Google account. |
| 1749 | # |
| 1750 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1751 | # who is authenticated with a Google account or a service account. |
| 1752 | # |
| 1753 | # * `user:{emailid}`: An email address that represents a specific Google |
| 1754 | # account. For example, `alice@example.com` . |
| 1755 | # |
| 1756 | # |
| 1757 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1758 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1759 | # |
| 1760 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1761 | # For example, `admins@example.com`. |
| 1762 | # |
| 1763 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1764 | # identifier) representing a user that has been recently deleted. For |
| 1765 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1766 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1767 | # retains the role in the binding. |
| 1768 | # |
| 1769 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1770 | # unique identifier) representing a service account that has been recently |
| 1771 | # deleted. For example, |
| 1772 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1773 | # If the service account is undeleted, this value reverts to |
| 1774 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1775 | # role in the binding. |
| 1776 | # |
| 1777 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1778 | # identifier) representing a Google group that has been recently |
| 1779 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1780 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1781 | # recovered group retains the role in the binding. |
| 1782 | # |
| 1783 | # |
| 1784 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 1785 | # users of that domain. For example, `google.com` or `example.com`. |
| 1786 | # |
| 1787 | "A String", |
| 1788 | ], |
| 1789 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1790 | # NOTE: An unsatisfied condition will not allow user access via current |
| 1791 | # binding. Different bindings, including their conditions, are examined |
| 1792 | # independently. |
| 1793 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1794 | # are documented at https://github.com/google/cel-spec. |
| 1795 | # |
| 1796 | # Example (Comparison): |
| 1797 | # |
| 1798 | # title: "Summary size limit" |
| 1799 | # description: "Determines if a summary is less than 100 chars" |
| 1800 | # expression: "document.summary.size() < 100" |
| 1801 | # |
| 1802 | # Example (Equality): |
| 1803 | # |
| 1804 | # title: "Requestor is owner" |
| 1805 | # description: "Determines if requestor is the document owner" |
| 1806 | # expression: "document.owner == request.auth.claims.email" |
| 1807 | # |
| 1808 | # Example (Logic): |
| 1809 | # |
| 1810 | # title: "Public documents" |
| 1811 | # description: "Determine whether the document should be publicly visible" |
| 1812 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1813 | # |
| 1814 | # Example (Data Manipulation): |
| 1815 | # |
| 1816 | # title: "Notification string" |
| 1817 | # description: "Create a notification string with a timestamp." |
| 1818 | # expression: "'New message received at ' + string(document.create_time)" |
| 1819 | # |
| 1820 | # The exact variables and functions that may be referenced within an expression |
| 1821 | # are determined by the service that evaluates it. See the service |
| 1822 | # documentation for additional information. |
| 1823 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1824 | # reporting, e.g. a file name and a position in the file. |
| 1825 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1826 | # syntax. |
| 1827 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1828 | # describes the expression, e.g. when hovered over it in a UI. |
| 1829 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1830 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1831 | # expression. |
| 1832 | }, |
| 1833 | }, |
| 1834 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1835 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1836 | { # Specifies the audit configuration for a service. |
| 1837 | # The configuration determines which permission types are logged, and what |
| 1838 | # identities, if any, are exempted from logging. |
| 1839 | # An AuditConfig must have one or more AuditLogConfigs. |
| 1840 | # |
| 1841 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 1842 | # the union of the two AuditConfigs is used for that service: the log_types |
| 1843 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 1844 | # AuditLogConfig are exempted. |
| 1845 | # |
| 1846 | # Example Policy with multiple AuditConfigs: |
| 1847 | # |
| 1848 | # { |
| 1849 | # "audit_configs": [ |
| 1850 | # { |
| 1851 | # "service": "allServices" |
| 1852 | # "audit_log_configs": [ |
| 1853 | # { |
| 1854 | # "log_type": "DATA_READ", |
| 1855 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1856 | # "user:jose@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1857 | # ] |
| 1858 | # }, |
| 1859 | # { |
| 1860 | # "log_type": "DATA_WRITE", |
| 1861 | # }, |
| 1862 | # { |
| 1863 | # "log_type": "ADMIN_READ", |
| 1864 | # } |
| 1865 | # ] |
| 1866 | # }, |
| 1867 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1868 | # "service": "sampleservice.googleapis.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1869 | # "audit_log_configs": [ |
| 1870 | # { |
| 1871 | # "log_type": "DATA_READ", |
| 1872 | # }, |
| 1873 | # { |
| 1874 | # "log_type": "DATA_WRITE", |
| 1875 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1876 | # "user:aliya@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1877 | # ] |
| 1878 | # } |
| 1879 | # ] |
| 1880 | # } |
| 1881 | # ] |
| 1882 | # } |
| 1883 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1884 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 1885 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 1886 | # aliya@example.com from DATA_WRITE logging. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1887 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1888 | { # Provides the configuration for logging a type of permissions. |
| 1889 | # Example: |
| 1890 | # |
| 1891 | # { |
| 1892 | # "audit_log_configs": [ |
| 1893 | # { |
| 1894 | # "log_type": "DATA_READ", |
| 1895 | # "exempted_members": [ |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1896 | # "user:jose@example.com" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1897 | # ] |
| 1898 | # }, |
| 1899 | # { |
| 1900 | # "log_type": "DATA_WRITE", |
| 1901 | # } |
| 1902 | # ] |
| 1903 | # } |
| 1904 | # |
| 1905 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1906 | # jose@example.com from DATA_READ logging. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1907 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 1908 | # permission. |
| 1909 | # Follows the same format of Binding.members. |
| 1910 | "A String", |
| 1911 | ], |
| 1912 | "logType": "A String", # The log type that this config enables. |
| 1913 | }, |
| 1914 | ], |
| 1915 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 1916 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1917 | # `allServices` is a special value that covers all services. |
| 1918 | }, |
| 1919 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1920 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1921 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1922 | # It is strongly suggested that systems make use of the `etag` in the |
| 1923 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1924 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1925 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1926 | # ensure that their change will be applied to the same version of the policy. |
| 1927 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1928 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1929 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1930 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1931 | # the conditions in the version `3` policy are lost. |
| 1932 | "version": 42, # Specifies the format of the policy. |
| 1933 | # |
| 1934 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1935 | # are rejected. |
| 1936 | # |
| 1937 | # Any operation that affects conditional role bindings must specify version |
| 1938 | # `3`. This requirement applies to the following operations: |
| 1939 | # |
| 1940 | # * Getting a policy that includes a conditional role binding |
| 1941 | # * Adding a conditional role binding to a policy |
| 1942 | # * Changing a conditional role binding in a policy |
| 1943 | # * Removing any role binding, with or without a condition, from a policy |
| 1944 | # that includes conditions |
| 1945 | # |
| 1946 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1947 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1948 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1949 | # the conditions in the version `3` policy are lost. |
| 1950 | # |
| 1951 | # If a policy does not include any conditions, operations on that policy may |
| 1952 | # specify any valid version or leave the field unset. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1953 | }</pre> |
| 1954 | </div> |
| 1955 | |
| 1956 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1957 | <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] | 1958 | <pre>Tests the specified permissions against the IAM access control policy |
| 1959 | for a function. |
| 1960 | If the function does not exist, this will return an empty set of |
| 1961 | permissions, not a NOT_FOUND error. |
| 1962 | |
| 1963 | Args: |
| 1964 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
| 1965 | 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^] | 1966 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1967 | The object takes the form of: |
| 1968 | |
| 1969 | { # Request message for `TestIamPermissions` method. |
| 1970 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1971 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 1972 | # information see |
| 1973 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| 1974 | "A String", |
| 1975 | ], |
| 1976 | } |
| 1977 | |
| 1978 | x__xgafv: string, V1 error format. |
| 1979 | Allowed values |
| 1980 | 1 - v1 error format |
| 1981 | 2 - v2 error format |
| 1982 | |
| 1983 | Returns: |
| 1984 | An object of the form: |
| 1985 | |
| 1986 | { # Response message for `TestIamPermissions` method. |
| 1987 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1988 | # allowed. |
| 1989 | "A String", |
| 1990 | ], |
| 1991 | }</pre> |
| 1992 | </div> |
| 1993 | |
| 1994 | </body></html> |