Struct google_servicebroker1::api::GoogleIamV1__Policy
source · [−]pub struct GoogleIamV1__Policy {
pub bindings: Option<Vec<GoogleIamV1__Binding>>,
pub etag: Option<String>,
pub version: Option<i32>,
}
Expand 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@example.com
- group:admins@example.com
- domain:google.com
- serviceAccount:my-other-app@appspot.gserviceaccount.com
role: roles/owner
- members:
- user:sean@example.com
role: roles/viewer
For a description of IAM and its features, see the IAM developer’s guide.
Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- get iam policy (response)
- set iam policy (response)
Fields
bindings: Option<Vec<GoogleIamV1__Binding>>
Associates a list of members
to a role
.
bindings
with no members will result in an error.
etag: Option<String>
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.
version: Option<i32>
Deprecated.
Trait Implementations
sourceimpl Clone for GoogleIamV1__Policy
impl Clone for GoogleIamV1__Policy
sourcefn clone(&self) -> GoogleIamV1__Policy
fn clone(&self) -> GoogleIamV1__Policy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GoogleIamV1__Policy
impl Debug for GoogleIamV1__Policy
sourceimpl Default for GoogleIamV1__Policy
impl Default for GoogleIamV1__Policy
sourcefn default() -> GoogleIamV1__Policy
fn default() -> GoogleIamV1__Policy
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for GoogleIamV1__Policy
impl<'de> Deserialize<'de> for GoogleIamV1__Policy
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for GoogleIamV1__Policy
impl Serialize for GoogleIamV1__Policy
impl ResponseResult for GoogleIamV1__Policy
Auto Trait Implementations
impl RefUnwindSafe for GoogleIamV1__Policy
impl Send for GoogleIamV1__Policy
impl Sync for GoogleIamV1__Policy
impl Unpin for GoogleIamV1__Policy
impl UnwindSafe for GoogleIamV1__Policy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more