Service Client: Google::Iam::Admin::V1::Iam::IAMClient

Client stub representing the remote IAM gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to iam.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Iam::Admin::V1::Iam - Compiled Protocol Buffers messages for google/iam/admin/v1/iam.proto

SYNOPSIS

use Google::Iam::Admin::V1::Iam;

my $msg = Google::Iam::Admin::V1::Iam::ServiceAccount->new({
    name => $name,
    project_id => $project_id,
    unique_id => $unique_id,
    email => $email,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Iam::Admin::V1::Iam::ServiceAccount->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/iam/admin/v1/iam.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Iam::Admin::V1::Iam::ServiceAccount

An IAM service account.

A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview).

When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the service account.

    Use one of the following formats:

    * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`

    As an alternative, you can use the `-` wildcard character instead of the project ID:

    * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}`

    When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error.

  • $msg->project_id() / $msg->project_id($value)

    Type: String

    Output only. The ID of the project that owns the service account.

  • $msg->unique_id() / $msg->unique_id($value)

    Type: String

    Output only. The unique, stable numeric ID for the service account.

    Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.

  • $msg->email() / $msg->email($value)

    Type: String

    Output only. The email address of the service account.

  • $msg->display_name() / $msg->display_name($value)

    Type: String

    Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.

  • $msg->etag() / $msg->etag($value)

    Type: Bytes

    Deprecated. Do not use.

  • $msg->description() / $msg->description($value)

    Type: String

    Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.

  • $msg->oauth2_client_id() / $msg->oauth2_client_id($value)

    Type: String

    Output only. The OAuth 2.0 client ID for the service account.

  • $msg->disabled() / $msg->disabled($value)

    Type: Bool

    Output only. Whether the service account is disabled.

Google::Iam::Admin::V1::Iam::CreateServiceAccountRequest

The service account create request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.

  • $msg->account_id() / $msg->account_id($value)

    Type: String

    Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.

  • $msg->service_account() / $msg->service_account($value)

    Type: Message (Google::Iam::Admin::V1::Iam::ServiceAccount)

    The [ServiceAccount][google.iam.admin.v1.ServiceAccount] resource to create. Currently, only the following values are user assignable: `display_name` and `description`.

Google::Iam::Admin::V1::Iam::ListServiceAccountsRequest

The service account list request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the [ListServiceAccountsResponse.next_page_token][google.iam.admin.v1.ListServiceAccountsResponse.next_page_token] in a subsequent request.

    The default is 20, and the maximum is 100.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional pagination token returned in an earlier [ListServiceAccountsResponse.next_page_token][google.iam.admin.v1.ListServiceAccountsResponse.next_page_token].

Google::Iam::Admin::V1::Iam::ListServiceAccountsResponse

The service account list response.

Inherits from Protobuf::Message.

Accessors

  • $msg->accounts() / $msg->accounts($value)

    Type: Message (Google::Iam::Admin::V1::Iam::ServiceAccount)

    The list of matching service accounts.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    To retrieve the next page of results, set [ListServiceAccountsRequest.page_token][google.iam.admin.v1.ListServiceAccountsRequest.page_token] to this value.

Google::Iam::Admin::V1::Iam::GetServiceAccountRequest

The service account get request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::DeleteServiceAccountRequest

The service account delete request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::PatchServiceAccountRequest

The service account patch request.

You can patch only the `display_name` and `description` fields. You must use the `update_mask` field to specify which of these fields you want to patch.

Only the fields specified in the request are guaranteed to be returned in the response. Other fields may be empty in the response.

Inherits from Protobuf::Message.

Accessors

Google::Iam::Admin::V1::Iam::UndeleteServiceAccountRequest

The service account undelete request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account.

Google::Iam::Admin::V1::Iam::UndeleteServiceAccountResponse

Inherits from Protobuf::Message.

Accessors

Google::Iam::Admin::V1::Iam::EnableServiceAccountRequest

The service account enable request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::DisableServiceAccountRequest

The service account disable request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::ListServiceAccountKeysRequest

The service account keys list request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.

    Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

  • $msg->key_types() / $msg->key_types($value)

    Type: Enum (Google::Iam::Admin::V1::ListServiceAccountKeysRequest::KeyType)

    Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.

Enum: ListServiceAccountKeysRequest::KeyType

  • KEY_TYPE_UNSPECIFIED => 0

  • USER_MANAGED => 1

  • SYSTEM_MANAGED => 2

Google::Iam::Admin::V1::Iam::ListServiceAccountKeysResponse

The service account keys list response.

Inherits from Protobuf::Message.

Accessors

Google::Iam::Admin::V1::Iam::GetServiceAccountKeyRequest

The service account key get by id request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.

    Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

  • $msg->public_key_type() / $msg->public_key_type($value)

    Type: Enum (Google::Iam::Admin::V1::ServiceAccountPublicKeyType)

    Optional. The output format of the public key. The default is `TYPE_NONE`, which means that the public key is not returned.

Google::Iam::Admin::V1::Iam::ServiceAccountKey

Represents a service account key.

A service account has two sets of key-pairs: user-managed, and system-managed.

User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key.

System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime.

If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing.

Public keys for all service accounts are also published at the OAuth2 Service Account API.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.

  • $msg->private_key_type() / $msg->private_key_type($value)

    Type: Enum (Google::Iam::Admin::V1::ServiceAccountPrivateKeyType)

    The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses.

    Google never exposes system-managed private keys, and never retains user-managed private keys.

  • $msg->key_algorithm() / $msg->key_algorithm($value)

    Type: Enum (Google::Iam::Admin::V1::ServiceAccountKeyAlgorithm)

    Specifies the algorithm (and possibly key size) for the key.

  • $msg->private_key_data() / $msg->private_key_data($value)

    Type: Bytes

    The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud auth activate-service-account</a>.

  • $msg->public_key_data() / $msg->public_key_data($value)

    Type: Bytes

    The public key data. Only provided in `GetServiceAccountKey` responses.

  • $msg->valid_after_time() / $msg->valid_after_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The key can be used after this timestamp.

  • $msg->valid_before_time() / $msg->valid_before_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.

  • $msg->key_origin() / $msg->key_origin($value)

    Type: Enum (Google::Iam::Admin::V1::ServiceAccountKeyOrigin)

    The key origin.

  • $msg->key_type() / $msg->key_type($value)

    Type: Enum (Google::Iam::Admin::V1::ListServiceAccountKeysRequest::KeyType)

    The key type.

  • $msg->disabled() / $msg->disabled($value)

    Type: Bool

    The key status.

Google::Iam::Admin::V1::Iam::CreateServiceAccountKeyRequest

The service account key create request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

  • $msg->private_key_type() / $msg->private_key_type($value)

    Type: Enum (Google::Iam::Admin::V1::ServiceAccountPrivateKeyType)

    The output format of the private key. The default value is `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File format.

  • $msg->key_algorithm() / $msg->key_algorithm($value)

    Type: Enum (Google::Iam::Admin::V1::ServiceAccountKeyAlgorithm)

    Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.

Google::Iam::Admin::V1::Iam::UploadServiceAccountKeyRequest

The service account key upload request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

  • $msg->public_key_data() / $msg->public_key_data($value)

    Type: Bytes

    The public key to associate with the service account. Must be an RSA public key that is wrapped in an X.509 v3 certificate. Include the first line, `-----BEGIN CERTIFICATE-----`, and the last line, `-----END CERTIFICATE-----`.

Google::Iam::Admin::V1::Iam::DeleteServiceAccountKeyRequest

The service account key delete request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::DisableServiceAccountKeyRequest

The service account key disable request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.

    Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::EnableServiceAccountKeyRequest

The service account key enable request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.

    Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

Google::Iam::Admin::V1::Iam::SignBlobRequest

Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

The service account sign blob request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

  • $msg->bytes_to_sign() / $msg->bytes_to_sign($value)

    Type: Bytes

    Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The bytes to sign.

Google::Iam::Admin::V1::Iam::SignBlobResponse

Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

The service account sign blob response.

Inherits from Protobuf::Message.

Accessors

  • $msg->key_id() / $msg->key_id($value)

    Type: String

    Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The id of the key used to sign the blob.

  • $msg->signature() / $msg->signature($value)

    Type: Bytes

    Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The signed blob.

Google::Iam::Admin::V1::Iam::SignJwtRequest

Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

The service account sign JWT request.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account.

  • $msg->payload() / $msg->payload($value)

    Type: String

    Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The JWT payload to sign. Must be a serialized JSON object that contains a JWT Claims Set. For example: `{"sub": "user@example.com", "iat": 313435}`

    If the JWT Claims Set contains an expiration time (`exp`) claim, it must be an integer timestamp that is not in the past and no more than 12 hours in the future.

    If the JWT Claims Set does not contain an expiration time (`exp`) claim, this claim is added automatically, with a timestamp that is 1 hour in the future.

Google::Iam::Admin::V1::Iam::SignJwtResponse

Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

The service account sign JWT response.

Inherits from Protobuf::Message.

Accessors

  • $msg->key_id() / $msg->key_id($value)

    Type: String

    Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The id of the key used to sign the JWT.

  • $msg->signed_jwt() / $msg->signed_jwt($value)

    Type: String

    Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api).

    The signed JWT.

Google::Iam::Admin::V1::Iam::Role

A role in the Identity and Access Management API.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The name of the role.

    When Role is used in CreateRole, the role name must not be set.

    When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.

  • $msg->title() / $msg->title($value)

    Type: String

    Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.

  • $msg->description() / $msg->description($value)

    Type: String

    Optional. A human-readable description for the role.

  • $msg->included_permissions() / $msg->included_permissions($value)

    Type: String

    The names of the permissions this role grants when bound in an IAM policy.

  • $msg->stage() / $msg->stage($value)

    Type: Enum (Google::Iam::Admin::V1::Role::RoleLaunchStage)

    The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role.

  • $msg->etag() / $msg->etag($value)

    Type: Bytes

    Used to perform a consistent read-modify-write.

  • $msg->deleted() / $msg->deleted($value)

    Type: Bool

    The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.

Enum: Role::RoleLaunchStage

  • ALPHA => 0

  • BETA => 1

  • GA => 2

  • DEPRECATED => 4

  • DISABLED => 5

  • EAP => 6

Google::Iam::Admin::V1::Iam::QueryGrantableRolesRequest

The grantable role query request.

Inherits from Protobuf::Message.

Accessors

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    Required. The full resource name to query from the list of grantable roles.

    The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.

  • $msg->view() / $msg->view($value)

    Type: Enum (Google::Iam::Admin::V1::RoleView)

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional limit on the number of roles to include in the response.

    The default is 300, and the maximum is 1,000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional pagination token returned in an earlier QueryGrantableRolesResponse.

Google::Iam::Admin::V1::Iam::QueryGrantableRolesResponse

The grantable role query response.

Inherits from Protobuf::Message.

Accessors

  • $msg->roles() / $msg->roles($value)

    Type: Message (Google::Iam::Admin::V1::Iam::Role)

    The list of matching roles.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    To retrieve the next page of results, set `QueryGrantableRolesRequest.page_token` to this value.

Google::Iam::Admin::V1::Iam::ListRolesRequest

The request to get all roles defined under a resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    The `parent` parameter's value depends on the target resource for the request, namely [`roles`](https://cloud.google.com/iam/reference/rest/v1/roles), [`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles), or [`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below:

    * [`roles.list()`](https://cloud.google.com/iam/reference/rest/v1/roles/list): An empty string. This method doesn't require a resource; it simply returns all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in Cloud IAM. Example request URL: `https://iam.googleapis.com/v1/roles`

    * [`projects.roles.list()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/list): `projects/{PROJECT_ID}`. This method lists all project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`

    * [`organizations.roles.list()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/list): `organizations/{ORGANIZATION_ID}`. This method lists all organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`

    Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional limit on the number of roles to include in the response.

    The default is 300, and the maximum is 1,000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional pagination token returned in an earlier ListRolesResponse.

  • $msg->view() / $msg->view($value)

    Type: Enum (Google::Iam::Admin::V1::RoleView)

    Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field.

  • $msg->show_deleted() / $msg->show_deleted($value)

    Type: Bool

    Include Roles that have been deleted.

Google::Iam::Admin::V1::Iam::ListRolesResponse

The response containing the roles defined under a resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->roles() / $msg->roles($value)

    Type: Message (Google::Iam::Admin::V1::Iam::Role)

    The Roles defined on this resource.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    To retrieve the next page of results, set `ListRolesRequest.page_token` to this value.

Google::Iam::Admin::V1::Iam::GetRoleRequest

The request to get the definition of an existing role.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The `name` parameter's value depends on the target resource for the request, namely [`roles`](https://cloud.google.com/iam/reference/rest/v1/roles), [`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles), or [`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below:

    * [`roles.get()`](https://cloud.google.com/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. This method returns results from all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in Cloud IAM. Example request URL: `https://iam.googleapis.com/v1/roles/{ROLE_NAME}`

    * [`projects.roles.get()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/get): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`

    * [`organizations.roles.get()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/get): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`

    Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

Google::Iam::Admin::V1::Iam::CreateRoleRequest

The request to create a new role.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    The `parent` parameter's value depends on the target resource for the request, namely [`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles) or [`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below:

    * [`projects.roles.create()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/create): `projects/{PROJECT_ID}`. This method creates project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`

    * [`organizations.roles.create()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/create): `organizations/{ORGANIZATION_ID}`. This method creates organization-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`

    Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

  • $msg->role_id() / $msg->role_id($value)

    Type: String

    The role ID to use for this role.

    A role ID may contain alphanumeric characters, underscores (`_`), and periods (`.`). It must contain a minimum of 3 characters and a maximum of 64 characters.

  • $msg->role() / $msg->role($value)

    Type: Message (Google::Iam::Admin::V1::Iam::Role)

    The Role resource to create.

Google::Iam::Admin::V1::Iam::UpdateRoleRequest

The request to update a role.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The `name` parameter's value depends on the target resource for the request, namely [`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles) or [`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below:

    * [`projects.roles.patch()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/patch): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`

    * [`organizations.roles.patch()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/patch): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`

    Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

  • $msg->role() / $msg->role($value)

    Type: Message (Google::Iam::Admin::V1::Iam::Role)

    The updated role.

  • $msg->update_mask() / $msg->update_mask($value)

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    A mask describing which fields in the Role have changed.

Google::Iam::Admin::V1::Iam::DeleteRoleRequest

The request to delete an existing role.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The `name` parameter's value depends on the target resource for the request, namely [`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles) or [`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below:

    * [`projects.roles.delete()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/delete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`

    * [`organizations.roles.delete()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/delete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`

    Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

  • $msg->etag() / $msg->etag($value)

    Type: Bytes

    Used to perform a consistent read-modify-write.

Google::Iam::Admin::V1::Iam::UndeleteRoleRequest

The request to undelete an existing role.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The `name` parameter's value depends on the target resource for the request, namely [`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles) or [`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below:

    * [`projects.roles.undelete()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/undelete): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`

    * [`organizations.roles.undelete()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/undelete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes only [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`

    Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.

  • $msg->etag() / $msg->etag($value)

    Type: Bytes

    Used to perform a consistent read-modify-write.

Google::Iam::Admin::V1::Iam::Permission

A permission which can be included by a role.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The name of this Permission.

  • $msg->title() / $msg->title($value)

    Type: String

    The title of this Permission.

  • $msg->description() / $msg->description($value)

    Type: String

    A brief description of what this Permission is used for. This permission can ONLY be used in predefined roles.

  • $msg->only_in_predefined_roles() / $msg->only_in_predefined_roles($value)

    Type: Bool

  • $msg->stage() / $msg->stage($value)

    Type: Enum (Google::Iam::Admin::V1::Permission::PermissionLaunchStage)

    The current launch stage of the permission.

  • $msg->custom_roles_support_level() / $msg->custom_roles_support_level($value)

    Type: Enum (Google::Iam::Admin::V1::Permission::CustomRolesSupportLevel)

    The current custom role support level.

  • $msg->api_disabled() / $msg->api_disabled($value)

    Type: Bool

    The service API associated with the permission is not enabled.

  • $msg->primary_permission() / $msg->primary_permission($value)

    Type: String

    The preferred name for this permission. If present, then this permission is an alias of, and equivalent to, the listed primary_permission.

Enum: Permission::PermissionLaunchStage

  • ALPHA => 0

  • BETA => 1

  • GA => 2

  • DEPRECATED => 3

Enum: Permission::CustomRolesSupportLevel

  • SUPPORTED => 0

  • TESTING => 1

  • NOT_SUPPORTED => 2

Google::Iam::Admin::V1::Iam::QueryTestablePermissionsRequest

A request to get permissions which can be tested on a resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    Required. The full resource name to query from the list of testable permissions.

    The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional limit on the number of permissions to include in the response.

    The default is 100, and the maximum is 1,000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional pagination token returned in an earlier QueryTestablePermissionsRequest.

Google::Iam::Admin::V1::Iam::QueryTestablePermissionsResponse

The response containing permissions which can be tested on a resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->permissions() / $msg->permissions($value)

    Type: Message (Google::Iam::Admin::V1::Iam::Permission)

    The Permissions testable on the requested resource.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    To retrieve the next page of results, set `QueryTestableRolesRequest.page_token` to this value.

Google::Iam::Admin::V1::Iam::QueryAuditableServicesRequest

A request to get the list of auditable services for a resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    Required. The full resource name to query from the list of auditable services.

    The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.

Google::Iam::Admin::V1::Iam::QueryAuditableServicesResponse

A response containing a list of auditable services for a resource.

Inherits from Protobuf::Message.

Accessors

Google::Iam::Admin::V1::Iam::LintPolicyRequest

The request to lint a Cloud IAM policy object.

Inherits from Protobuf::Message.

Accessors

  • $msg->full_resource_name() / $msg->full_resource_name($value)

    Type: String

    The full resource name of the policy this lint request is about.

    The name follows the Google Cloud Platform (GCP) resource format. For example, a GCP project with ID `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.

    The resource name is not used to read the policy instance from the Cloud IAM database. The candidate policy for lint has to be provided in the same request object.

  • $msg->condition() / $msg->condition($value)

    Type: Message (Google::Type::Expr::Expr)

    [google.iam.v1.Binding.condition] [google.iam.v1.Binding.condition] object to be linted.

Google::Iam::Admin::V1::Iam::LintResult

Structured response of a single validation unit.

Inherits from Protobuf::Message.

Accessors

  • $msg->level() / $msg->level($value)

    Type: Enum (Google::Iam::Admin::V1::LintResult::Level)

    The validation unit level.

  • $msg->validation_unit_name() / $msg->validation_unit_name($value)

    Type: String

    The validation unit name, for instance "lintValidationUnits/ConditionComplexityCheck".

  • $msg->severity() / $msg->severity($value)

    Type: Enum (Google::Iam::Admin::V1::LintResult::Severity)

    The validation unit severity.

  • $msg->field_name() / $msg->field_name($value)

    Type: String

    The name of the field for which this lint result is about.

    For nested messages `field_name` consists of names of the embedded fields separated by period character. The top-level qualifier is the input object to lint in the request. For example, the `field_name` value `condition.expression` identifies a lint result for the `expression` field of the provided condition.

  • $msg->location_offset() / $msg->location_offset($value)

    Type: Int32

    0-based character position of problematic construct within the object identified by `field_name`. Currently, this is populated only for condition expression.

  • $msg->debug_message() / $msg->debug_message($value)

    Type: String

    Human readable debug message associated with the issue.

Enum: LintResult::Level

  • LEVEL_UNSPECIFIED => 0

  • CONDITION => 3

Enum: LintResult::Severity

  • SEVERITY_UNSPECIFIED => 0

  • ERROR => 1

  • WARNING => 2

  • NOTICE => 3

  • INFO => 4

  • DEPRECATED => 5

Google::Iam::Admin::V1::Iam::LintPolicyResponse

The response of a lint operation. An empty response indicates the operation was able to fully execute and no lint issue was found.

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Iam::Admin::V1::Iam::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.