#include <policy.h>
- user
- created.
- example
- **.
- "bindings"
- [.
- "role"
- "roles/resourcemanager.organizationAdmin",.
- "members"
- [.
- "user
<dd>mike@example.com",.
- "group
<dd>admins@example.com",.
- "domain
<dd>google.com",.
- "serviceAccount:my-project
<dd>id@appspot.gserviceaccount.com".
] }, {
- "role"
- "roles/resourcemanager.organizationViewer",.
- "members"
- ["user:eve@example.com"],.
"condition": {
- "title"
- "expirable access",.
- "description"
- "Does not grant access after Sep 2020",.
- "expression"
- "request.time < timestamp('2020-10-01T00:00:00.000Z')",.
- "etag"
- "BwWWja0YfJA=",.
- "version"
- 3.
- example
- **.
- bindings:
- members:.
- user:mike@.nosp@m.exam.nosp@m.ple.c.nosp@m.om
- group:admin.nosp@m.s@ex.nosp@m.ample.nosp@m..com.
- domain:google.com
- serviceAccount:my-pr.nosp@m.ojec.nosp@m.t-id@.nosp@m.apps.nosp@m.pot.g.nosp@m.serv.nosp@m.iceac.nosp@m.coun.nosp@m.t.com.
- role
- roles/resourcemanager.organizationAdmin.
- members:
- user:eve@e.nosp@m.xamp.nosp@m.le.co.nosp@m.m.
- role
- roles/resourcemanager.organizationViewer.
- condition
- title: expirable access.
- description
- Does not grant access after Sep 2020.
- expression
- request.time < timestamp('2020-10-01T00:00:00.000Z').
- etag
- BwWWja0YfJA=.
- version
- 3.
- documentation](https
- //cloud.google.com/iam/docs/).
◆ Policy() [1/2]
| google_cloudresourcemanager_api::Policy::Policy |
( |
const Json::Value & |
storage | ) |
|
|
explicit |
Standard constructor for an immutable data object instance.
- Parameters
-
| [in] | storage | The underlying data storage for this instance. |
◆ Policy() [2/2]
| google_cloudresourcemanager_api::Policy::Policy |
( |
Json::Value * |
storage | ) |
|
|
explicit |
Standard constructor for a mutable data object instance.
- Parameters
-
| [in] | storage | The underlying data storage for this instance. |
◆ ~Policy()
| google_cloudresourcemanager_api::Policy::~Policy |
( |
| ) |
|
|
virtual |
◆ clear_audit_configs()
| void google_cloudresourcemanager_api::Policy::clear_audit_configs |
( |
| ) |
|
|
inline |
Clears the 'auditConfigs' attribute.
◆ clear_bindings()
| void google_cloudresourcemanager_api::Policy::clear_bindings |
( |
| ) |
|
|
inline |
Clears the 'bindings' attribute.
◆ clear_etag()
| void google_cloudresourcemanager_api::Policy::clear_etag |
( |
| ) |
|
|
inline |
Clears the 'etag' attribute.
◆ clear_version()
| void google_cloudresourcemanager_api::Policy::clear_version |
( |
| ) |
|
|
inline |
Clears the 'version' attribute.
◆ get_audit_configs()
| const client::JsonCppArray<AuditConfig > google_cloudresourcemanager_api::Policy::get_audit_configs |
( |
| ) |
const |
Get a reference to the value of the 'auditConfigs' attribute.
◆ get_bindings()
| const client::JsonCppArray<Binding > google_cloudresourcemanager_api::Policy::get_bindings |
( |
| ) |
const |
Get a reference to the value of the 'bindings' attribute.
◆ get_etag()
| const StringPiece google_cloudresourcemanager_api::Policy::get_etag |
( |
| ) |
const |
|
inline |
Get the value of the 'etag' attribute.
◆ get_version()
| int32 google_cloudresourcemanager_api::Policy::get_version |
( |
| ) |
const |
|
inline |
Get the value of the 'version' attribute.
◆ GetTypeName()
| const StringPiece google_cloudresourcemanager_api::Policy::GetTypeName |
( |
| ) |
const |
|
inline |
◆ has_audit_configs()
| bool google_cloudresourcemanager_api::Policy::has_audit_configs |
( |
| ) |
const |
|
inline |
Determine if the 'auditConfigs' attribute was set.
- Returns
- true if the '
auditConfigs' attribute was set.
◆ has_bindings()
| bool google_cloudresourcemanager_api::Policy::has_bindings |
( |
| ) |
const |
|
inline |
Determine if the 'bindings' attribute was set.
- Returns
- true if the '
bindings' attribute was set.
◆ has_etag()
| bool google_cloudresourcemanager_api::Policy::has_etag |
( |
| ) |
const |
|
inline |
Determine if the 'etag' attribute was set.
- Returns
- true if the '
etag' attribute was set.
◆ has_version()
| bool google_cloudresourcemanager_api::Policy::has_version |
( |
| ) |
const |
|
inline |
Determine if the 'version' attribute was set.
- Returns
- true if the '
version' attribute was set.
◆ mutable_auditConfigs()
| client::JsonCppArray<AuditConfig > google_cloudresourcemanager_api::Policy::mutable_auditConfigs |
( |
| ) |
|
Gets a reference to a mutable value of the 'auditConfigs' property.
Specifies cloud audit logging configuration for this policy.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_bindings()
| client::JsonCppArray<Binding > google_cloudresourcemanager_api::Policy::mutable_bindings |
( |
| ) |
|
Gets a reference to a mutable value of the 'bindings' property.
Associates a list of members to a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one member.
- Returns
- The result can be modified to change the attribute value.
◆ New()
| Policy * google_cloudresourcemanager_api::Policy::New |
( |
| ) |
|
|
static |
Creates a new default instance.
- Returns
- Ownership is passed back to the caller.
◆ set_etag()
| void google_cloudresourcemanager_api::Policy::set_etag |
( |
const StringPiece & |
value | ) |
|
|
inline |
Change the 'etag' attribute.
etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the
- read-modify
- write cycle to perform policy updates in order to avoid race.
- conditions
- An
etag is returned in the response to getIamPolicy, and.
systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.
Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
- Parameters
-
◆ set_version()
| void google_cloudresourcemanager_api::Policy::set_version |
( |
int32 |
value | ) |
|
|
inline |
Change the 'version' attribute.
Specifies the format of the policy.
Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.
Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:
- Getting a policy that includes a conditional role binding
- Adding a conditional role binding to a policy
- Changing a conditional role binding in a policy
- Removing any role binding, with or without a condition, from a policy that includes conditions
Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.
If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
- Parameters
-
The documentation for this class was generated from the following files:
- google/cloudresourcemanager_api/policy.h
- google/cloudresourcemanager_api/policy.cc