deploymentmanager  v2
Public Member Functions | Static Public Member Functions | List of all members
google_deploymentmanager_api::Policy Class Reference

#include <policy.h>

Inheritance diagram for google_deploymentmanager_api::Policy:

Public Member Functions

 Policy (const Json::Value &storage)
 
 Policy (Json::Value *storage)
 
virtual ~Policy ()
 
const StringPiece GetTypeName () const
 
bool has_audit_configs () const
 
void clear_audit_configs ()
 
const client::JsonCppArray< AuditConfigget_audit_configs () const
 
client::JsonCppArray< AuditConfigmutable_auditConfigs ()
 
bool has_bindings () const
 
void clear_bindings ()
 
const client::JsonCppArray< Bindingget_bindings () const
 
client::JsonCppArray< Bindingmutable_bindings ()
 
bool has_etag () const
 
void clear_etag ()
 
const StringPiece get_etag () const
 
void set_etag (const StringPiece &value)
 
bool has_iam_owned () const
 
void clear_iam_owned ()
 
bool get_iam_owned () const
 
void set_iam_owned (bool value)
 
bool has_rules () const
 
void clear_rules ()
 
const client::JsonCppArray< Ruleget_rules () const
 
client::JsonCppArray< Rulemutable_rules ()
 
bool has_version () const
 
void clear_version ()
 
int32 get_version () const
 
void set_version (int32 value)
 

Static Public Member Functions

static PolicyNew ()
 

Detailed Description

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.

A Policy consists of a list of bindings. A binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.

JSON Example

{ "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }

YAML 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-ot.nosp@m.her-.nosp@m.app@a.nosp@m.ppsp.nosp@m.ot.gs.nosp@m.ervi.nosp@m.ceacc.nosp@m.ount.nosp@m..com role: roles/owner - members: - user:sean@.nosp@m.exam.nosp@m.ple.c.nosp@m.om role: roles/viewer

For a description of IAM and its features, see the IAM developer's guide.

Constructor & Destructor Documentation

◆ Policy() [1/2]

google_deploymentmanager_api::Policy::Policy ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ Policy() [2/2]

google_deploymentmanager_api::Policy::Policy ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~Policy()

google_deploymentmanager_api::Policy::~Policy ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_audit_configs()

void google_deploymentmanager_api::Policy::clear_audit_configs ( )
inline

Clears the 'auditConfigs' attribute.

◆ clear_bindings()

void google_deploymentmanager_api::Policy::clear_bindings ( )
inline

Clears the 'bindings' attribute.

◆ clear_etag()

void google_deploymentmanager_api::Policy::clear_etag ( )
inline

Clears the 'etag' attribute.

◆ clear_iam_owned()

void google_deploymentmanager_api::Policy::clear_iam_owned ( )
inline

Clears the 'iamOwned' attribute.

◆ clear_rules()

void google_deploymentmanager_api::Policy::clear_rules ( )
inline

Clears the 'rules' attribute.

◆ clear_version()

void google_deploymentmanager_api::Policy::clear_version ( )
inline

Clears the 'version' attribute.

◆ get_audit_configs()

const client::JsonCppArray<AuditConfig > google_deploymentmanager_api::Policy::get_audit_configs ( ) const

Get a reference to the value of the 'auditConfigs' attribute.

◆ get_bindings()

const client::JsonCppArray<Binding > google_deploymentmanager_api::Policy::get_bindings ( ) const

Get a reference to the value of the 'bindings' attribute.

◆ get_etag()

const StringPiece google_deploymentmanager_api::Policy::get_etag ( ) const
inline

Get the value of the 'etag' attribute.

◆ get_iam_owned()

bool google_deploymentmanager_api::Policy::get_iam_owned ( ) const
inline

Get the value of the 'iamOwned' attribute.

◆ get_rules()

const client::JsonCppArray<Rule > google_deploymentmanager_api::Policy::get_rules ( ) const

Get a reference to the value of the 'rules' attribute.

◆ get_version()

int32 google_deploymentmanager_api::Policy::get_version ( ) const
inline

Get the value of the 'version' attribute.

◆ GetTypeName()

const StringPiece google_deploymentmanager_api::Policy::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_deploymentmanager_api::Policy

◆ has_audit_configs()

bool google_deploymentmanager_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_deploymentmanager_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_deploymentmanager_api::Policy::has_etag ( ) const
inline

Determine if the 'etag' attribute was set.

Returns
true if the 'etag' attribute was set.

◆ has_iam_owned()

bool google_deploymentmanager_api::Policy::has_iam_owned ( ) const
inline

Determine if the 'iamOwned' attribute was set.

Returns
true if the 'iamOwned' attribute was set.

◆ has_rules()

bool google_deploymentmanager_api::Policy::has_rules ( ) const
inline

Determine if the 'rules' attribute was set.

Returns
true if the 'rules' attribute was set.

◆ has_version()

bool google_deploymentmanager_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_deploymentmanager_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_deploymentmanager_api::Policy::mutable_bindings ( )

Gets a reference to a mutable value of the 'bindings' property.

Associates a list of members to a role. bindings with no members will result in an error.

Returns
The result can be modified to change the attribute value.

◆ mutable_rules()

client::JsonCppArray<Rule > google_deploymentmanager_api::Policy::mutable_rules ( )

Gets a reference to a mutable value of the 'rules' property.

If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.

Returns
The result can be modified to change the attribute value.

◆ New()

Policy * google_deploymentmanager_api::Policy::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_etag()

void google_deploymentmanager_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.

If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly.

Parameters
[in]valueThe new value.

◆ set_iam_owned()

void google_deploymentmanager_api::Policy::set_iam_owned ( bool  value)
inline

Change the 'iamOwned' attribute.

Parameters
[in]valueThe new value.

◆ set_version()

void google_deploymentmanager_api::Policy::set_version ( int32  value)
inline

Change the 'version' attribute.

Deprecated:

Deprecated.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: