Method: licenses.getIamPolicy

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

HTTP request

GET https://compute.googleapis.com/compute/beta/projects/{project}/global/licenses/{resourceId}/getIamPolicy

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

resourceId

string

Name or id of the resource for this request.

Query parameters

Parameters
optionsRequestedPolicyVersion

integer

Requested IAM Policy version.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.

A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.

For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation.

JSON example:

{
  "bindings": [
    {
      "role": "roles/resourcemanager.organizationAdmin",
      "members": [
        "user:mike@example.com",
        "group:admins@example.com",
        "domain:google.co