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