Stay organized with collections Save and categorize content based on your preferences.
Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set.
HTTP requestGET https://cloudfunctions.googleapis.com/v1/{resource}:getIamPolicy
resource
string
REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Query parameters Parametersoptions
object (
GetPolicyOptions
)
OPTIONAL: A GetPolicyOptions
object for specifying options to functions.getIamPolicy
.
The request body must be empty.
Response bodyIf successful, the response body contains an instance of Policy
.
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloudfunctions
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["This document describes how to retrieve the IAM access control policy for a Google Cloud Function, which will return an empty policy if there is no existing policy."],["The HTTP request method to get the IAM policy is `GET`, and the resource path is specified in the URL, as seen in the format `https://cloudfunctions.googleapis.com/v1/{resource}:getIamPolicy`."],["The required `resource` path parameter specifies the function to retrieve the IAM policy from, and there is an optional `options` query parameter that allows users to use `GetPolicyOptions` to fine tune the response."],["The request body must be empty, and if successful, the response body will contain an instance of `Policy` which details the IAM policy retrieved."],["To make this call, one must have one of the following OAuth scopes: `https://www.googleapis.com/auth/cloudfunctions` or `https://www.googleapis.com/auth/cloud-platform`."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4