Google Cloud C++ Client
1.38.0
C++ Client Library for Google Cloud Platform
|
Simplified view of multiple roles and their members for IAM. More...
#include <google/cloud/iam_bindings.h>
Public Types | |
using | iterator = std::map< std::string, std::set< std::string > >::const_iterator |
Public Member Functions | |
IamBindings ()=default | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED | IamBindings (std::vector< IamBinding > bindings) |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED | IamBindings (std::string role, std::set< std::string > members) |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED iterator | begin () const |
Returns an iterator referring to the first element in IamBindings container. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED iterator | end () const |
Returns an iterator referring to the past-the-end element in IamBindings container. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED bool | empty () const |
Returns whether the Bindings container is empty. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED std::size_t | size () const |
Return number of Bindings in container. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED std::map< std::string, std::set< std::string > > const & | bindings () const |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED iterator | find (std::string const &role) const |
Finds the members for a role. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED std::set< std::string > | at (std::string const &role) const |
Returns the members for a role. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void | AddMember (std::string const &role, std::string member) |
Adds a new member if a binding exists with given role otherwise inserts a new key-value pair of role and member to the container. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void | AddMembers (google::cloud::IamBinding const &iam_binding) |
Adds a new key-value pair of role and members to the container if there is none for the role of given binding else appends members of given binding to the associated role's key-value entry. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void | AddMembers (std::string const &role, std::set< std::string > const &members) |
Adds a new key-value pair of role and members to the container if there no existing for given role else appends the given members to the give role's member set. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void | RemoveMember (std::string const &role, std::string const &member) |
Removes the given member from the given role's member set if there exists one in container. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void | RemoveMembers (google::cloud::IamBinding const &iam_binding) |
Removes the given binding's member from the given binding's role's member set if there exists one in container. More... | |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void | RemoveMembers (std::string const &role, std::set< std::string > const &members) |
Removes the given members from given role's member set if there exists one in container. More... | |
Simplified view of multiple roles and their members for IAM.
Definition at line 44 of file iam_bindings.h.
using google::cloud::IamBindings::iterator = std::map<std::string, std::set<std::string> >::const_iterator |
Definition at line 61 of file iam_bindings.h.
|
default |
|
inlineexplicit |
Definition at line 48 of file iam_bindings.h.
|
inline |
Definition at line 56 of file iam_bindings.h.
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void google::cloud::IamBindings::AddMember | ( | std::string const & | role, |
std::string | member | ||
) |
Adds a new member if a binding exists with given role otherwise inserts a new key-value pair of role and member to the container.
role | role of the new member. |
member | specifies the identity requesting access for a cloud platform resource. |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void google::cloud::IamBindings::AddMembers | ( | google::cloud::IamBinding const & | iam_binding | ) |
Adds a new key-value pair of role and members to the container if there is none for the role of given binding else appends members of given binding to the associated role's key-value entry.
iam_binding | binding representing a set of members and role for them. |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void google::cloud::IamBindings::AddMembers | ( | std::string const & | role, |
std::set< std::string > const & | members | ||
) |
Adds a new key-value pair of role and members to the container if there no existing for given role else appends the given members to the give role's member set.
role | role of the member set to be added. |
members | a set of member which are needed to be added. |
|
inline |
Returns the members for a role.
Definition at line 110 of file iam_bindings.h.
|
inline |
Returns an iterator referring to the first element in IamBindings container.
Definition at line 67 of file iam_bindings.h.
|
inline |
Definition at line 98 of file iam_bindings.h.
|
inline |
Returns whether the Bindings container is empty.
Definition at line 84 of file iam_bindings.h.
|
inline |
Returns an iterator referring to the past-the-end element in IamBindings container.
Definition at line 75 of file iam_bindings.h.
|
inline |
Finds the members for a role.
Definition at line 105 of file iam_bindings.h.
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void google::cloud::IamBindings::RemoveMember | ( | std::string const & | role, |
std::string const & | member | ||
) |
Removes the given member from the given role's member set if there exists one in container.
role | role of the member to be removed. |
member | specifies the identity requesting access for a cloud platform resource. |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void google::cloud::IamBindings::RemoveMembers | ( | google::cloud::IamBinding const & | iam_binding | ) |
Removes the given binding's member from the given binding's role's member set if there exists one in container.
iam_binding | binding representing a set of members and role for them. |
GOOGLE_CLOUD_CPP_IAM_DEPRECATED void google::cloud::IamBindings::RemoveMembers | ( | std::string const & | role, |
std::set< std::string > const & | members | ||
) |
Removes the given members from given role's member set if there exists one in container.
role | role of the member set to be removed. |
members | a set of members which are needed to be removed. |
|
inline |
Return number of Bindings in container.
Definition at line 93 of file iam_bindings.h.