#[non_exhaustive]pub struct CreatePolicyRequest {
pub parent: String,
pub policy: Option<Policy>,
pub policy_id: String,
/* private fields */
}Expand description
Request message for CreatePolicy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The resource that the policy is attached to, along with the kind of policy
to create. Format: policies/{attachment_point}/denypolicies
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.
For organizations and folders, use the numeric ID in the full resource name. For projects, you can use the alphanumeric or the numeric ID.
policy: Option<Policy>Required. The policy to create.
policy_id: StringThe ID to use for this policy, which will become the final component of
the policy’s resource name. The ID must contain 3 to 63 characters. It can
contain lowercase letters and numbers, as well as dashes (-) and periods
(.). The first character must be a lowercase letter.
Implementations§
Source§impl CreatePolicyRequest
impl CreatePolicyRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_policy<T>(self, v: T) -> Self
pub fn set_policy<T>(self, v: T) -> Self
Sets the value of policy.
Sourcepub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of policy.
Sourcepub fn set_policy_id<T: Into<String>>(self, v: T) -> Self
pub fn set_policy_id<T: Into<String>>(self, v: T) -> Self
Sets the value of policy_id.
Trait Implementations§
Source§impl Clone for CreatePolicyRequest
impl Clone for CreatePolicyRequest
Source§fn clone(&self) -> CreatePolicyRequest
fn clone(&self) -> CreatePolicyRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more