List IAM Policies
Retrieves the policies of the specified kind that are attached to a resource. The response lists only policy metadata. In particular, policy rules are omitted.
External Documentation
To learn more, visit the GCP documentation.
Parameters
Parameter | Description |
---|---|
Parent ID | The ID of the parent resource to access.For organizations and folders, must be the numeric ID.For projects, can be the alphanumeric or numeric ID.All action responses contain the numeric ID. |
Parent Type | Which type of parent resource to access. |
Return All Pages | Automatically fetch all resources, page by page. |
Example Output
{
"nextPageToken": "A page token that you can use in a ListPoliciesRequest to retrieve the next page. If this field is omitted, there are no additional pages.",
"policies": [
{
"annotations": {},
"createTime": "Output only. The time when the `Policy` was created.",
"deleteTime": "Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.",
"displayName": "A user-specified description of the `Policy`. This value can be up to 63 characters.",
"etag": "An opaque tag that identifies the current version of the `Policy`. IAM uses this value to help manage concurrent updates, so they do not cause one update to be overwritten by another. If this field is present in a CreatePolicy request, the value is ignored.",
"kind": "Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.",
"name": "Immutable. The resource name of the `Policy`, which must be unique. Format: `policies/{attachment_point}/denypolicies/{policy_id}` The attachment point is identified by its URL-encoded full resource name, which means that the forward-slash character, `/`, must be written as `%2F`. For example, `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. For organizations and folders, use the numeric ID in the full resource name. For projects, requests can use the alphanumeric or the numeric ID. Responses always contain the numeric ID.",
"rules": [
{
"denyRule": {
"denialCondition": {
"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.",
"expression": "Textual representation of an expression in Common Expression Language syntax.",
"location": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.",
"title": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression."
},
"deniedPermissions": [
"string"
],
"deniedPrincipals": [
"string"
],
"exceptionPermissions": [
"string"
],
"exceptionPrincipals": [
"string"
]
},
"description": "A user-specified description of the rule. This value can be up to 256 characters."
}
],
"uid": "Immutable. The globally unique ID of the `Policy`. Assigned automatically when the `Policy` is created.",
"updateTime": "Output only. The time when the `Policy` was last updated."
}
]
}
Workflow Library Example
List Iam Policies with Gcp and Send Results Via Email
Preview this Workflow on desktop