Google Cloud Iam V2 Client - Class Policy (0.3.1)

Reference documentation and code samples for the Google Cloud Iam V2 Client class Policy.

Data for an IAM policy.

Generated from protobuf message google.iam.v2.Policy

Namespace

Google \ Cloud \ Iam \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name 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.

↳ uid string

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

↳ kind string

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

↳ display_name string

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

↳ annotations array|Google\Protobuf\Internal\MapField

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.

↳ etag 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.

↳ create_time Google\Protobuf\Timestamp

Output only. The time when the Policy was created.

↳ update_time Google\Protobuf\Timestamp

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

↳ delete_time Google\Protobuf\Timestamp

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

↳ rules array<Google\Cloud\Iam\V2\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.

↳ managing_authority string

Immutable. Specifies that this policy is managed by an authority and can only be modified by that authority. Usage is restricted.

getName

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.

Returns
TypeDescription
string

setName

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUid

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

Returns
TypeDescription
string

setUid

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKind

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

Returns
TypeDescription
string

setKind

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

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

Returns
TypeDescription
string

setDisplayName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAnnotations

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.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setAnnotations

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.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getEtag

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.

Returns
TypeDescription
string

setEtag

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. The time when the Policy was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time when the Policy was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDeleteTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasDeleteTime

clearDeleteTime

setDeleteTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getRules

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRules

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

Parameter
NameDescription
var array<Google\Cloud\Iam\V2\PolicyRule>
Returns
TypeDescription
$this

getManagingAuthority

Immutable. Specifies that this policy is managed by an authority and can only be modified by that authority. Usage is restricted.

Returns
TypeDescription
string

setManagingAuthority

Immutable. Specifies that this policy is managed by an authority and can only be modified by that authority. Usage is restricted.

Parameter
NameDescription
var string
Returns
TypeDescription
$this