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 \ V2Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Immutable. The resource name of the |
↳ uid |
string
Immutable. The globally unique ID of the |
↳ kind |
string
Output only. The kind of the |
↳ display_name |
string
A user-specified description of the |
↳ annotations |
array|Google\Protobuf\Internal\MapField
A key-value map to store arbitrary metadata for the |
↳ etag |
string
An opaque tag that identifies the current version of the |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The time when the |
↳ update_time |
Google\Protobuf\Timestamp
Output only. The time when the |
↳ delete_time |
Google\Protobuf\Timestamp
Output only. The time when the |
↳ rules |
array<PolicyRule>
A list of rules that specify the behavior of the |
↳ 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getUid
Immutable. The globally unique ID of the Policy
. Assigned automatically when the
Policy
is created.
Returns | |
---|---|
Type | Description |
string |
setUid
Immutable. The globally unique ID of the Policy
. Assigned automatically when the
Policy
is created.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getKind
Output only. The kind of the Policy
. Always contains the value DenyPolicy
.
Returns | |
---|---|
Type | Description |
string |
setKind
Output only. The kind of the Policy
. Always contains the value DenyPolicy
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayName
A user-specified description of the Policy
. This value can be up to 63
characters.
Returns | |
---|---|
Type | Description |
string |
setDisplayName
A user-specified description of the Policy
. This value can be up to 63
characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. The time when the Policy
was created.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time when the Policy
was created.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getUpdateTime
Output only. The time when the Policy
was last updated.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time when the Policy
was last updated.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getDeleteTime
Output only. The time when the Policy
was deleted. Empty if the policy is not deleted.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasDeleteTime
clearDeleteTime
setDeleteTime
Output only. The time when the Policy
was deleted. Empty if the policy is not deleted.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
array<PolicyRule>
|
Returns | |
---|---|
Type | Description |
$this |
getManagingAuthority
Immutable. Specifies that this policy is managed by an authority and can only be modified by that authority. Usage is restricted.
Returns | |
---|---|
Type | Description |
string |
setManagingAuthority
Immutable. Specifies that this policy is managed by an authority and can only be modified by that authority. Usage is restricted.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |