Service Client: Google::Iam::V2beta::Policy::PoliciesClient

Client stub representing the remote Policies 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::V2beta::Policy - Compiled Protocol Buffers messages for google/iam/v2beta/policy.proto

SYNOPSIS

use Google::Iam::V2beta::Policy;

my $msg = Google::Iam::V2beta::Policy::Policy->new({
    name => $name,
    uid => $uid,
    kind => $kind,
    display_name => $display_name,
});

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

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

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

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/iam/v2beta/policy.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::V2beta::Policy::Policy

Data for an IAM policy.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    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.

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

    Type: String

    Immutable. The globally unique ID of the `Policy`. Assigned automatically when the `Policy` is created.

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

    Type: String

    Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.

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

    Type: String

    A user-specified description of the `Policy`. This value can be up to 63 characters.

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

    Type: Message (Google::Iam::V2beta::Policy::Policy::AnnotationsEntry)

    A key-value map to store arbitrary metadata for the `Policy`. Keys can be up to 63 characters. Values can be up to 255 characters.

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

    Type: String

    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.

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

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

    Output only. The time when the `Policy` was created.

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

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

    Output only. The time when the `Policy` was last updated.

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

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

    Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.

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

    Type: Message (Google::Iam::V2beta::Policy::PolicyRule)

    A list of rules that specify the behavior of the `Policy`. All of the rules should be of the `kind` specified in the `Policy`.

Google::Iam::V2beta::Policy::PolicyRule

A single rule in a `Policy`.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Iam::V2beta::Deny::DenyRule)

    A rule for a deny policy.

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

    Type: String

    A user-specified description of the rule. This value can be up to 256 characters.

Google::Iam::V2beta::Policy::ListPoliciesRequest

Request message for `ListPolicies`.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The resource that the policy is attached to, along with the kind of policy to list. Format: `policies/{attachment_point}/denypolicies`

    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`.

    For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.

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

    Type: Int32

    The maximum number of policies to return. IAM ignores this value and uses the value 1000.

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

    Type: String

    A page token received in a [ListPoliciesResponse][google.iam.v2beta.ListPoliciesResponse]. Provide this token to retrieve the next page.

Google::Iam::V2beta::Policy::ListPoliciesResponse

Response message for `ListPolicies`.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Iam::V2beta::Policy::Policy)

    Metadata for the policies that are attached to the resource.

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

    Type: String

    A page token that you can use in a [ListPoliciesRequest][google.iam.v2beta.ListPoliciesRequest] to retrieve the next page. If this field is omitted, there are no additional pages.

Google::Iam::V2beta::Policy::GetPolicyRequest

Request message for `GetPolicy`.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The resource name of the policy to retrieve. Format: `policies/{attachment_point}/denypolicies/{policy_id}`

    Use the 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-policy`.

    For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.

Google::Iam::V2beta::Policy::CreatePolicyRequest

Request message for `CreatePolicy`.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The resource that the policy is attached to, along with the kind of policy to create. Format: `policies/{attachment_point}/denypolicies`

    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`.

    For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.

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

    Type: Message (Google::Iam::V2beta::Policy::Policy)

    Required. The policy to create.

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

    Type: String

    The ID to use for this policy, which will become the final component of the policy's resource name. The ID must contain 3 to 63 characters. It can contain lowercase letters and numbers, as well as dashes (`-`) and periods (`.`). The first character must be a lowercase letter.

Google::Iam::V2beta::Policy::UpdatePolicyRequest

Request message for `UpdatePolicy`.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Iam::V2beta::Policy::Policy)

    Required. The policy to update.

    To prevent conflicting updates, the `etag` value must match the value that is stored in IAM. If the `etag` values do not match, the request fails with a `409` error code and `ABORTED` status.

Google::Iam::V2beta::Policy::DeletePolicyRequest

Request message for `DeletePolicy`.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The resource name of the policy to delete. Format: `policies/{attachment_point}/denypolicies/{policy_id}`

    Use the 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-policy`.

    For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.

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

    Type: String

    Optional. The expected `etag` of the policy to delete. If the value does not match the value that is stored in IAM, the request fails with a `409` error code and `ABORTED` status.

    If you omit this field, the policy is deleted regardless of its current `etag`.

Google::Iam::V2beta::Policy::PolicyOperationMetadata

Metadata for long-running `Policy` operations.

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Iam::V2beta::Policy::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.