pub struct CreatePolicyBody {
pub description: Option<CreatePolicyBodyDescription>,
pub rules: Vec<Rule>,
pub scope: CreatePolicyBodyScope,
}
Expand description
CreatePolicyBody
JSON schema
{
"type": "object",
"required": [
"rules",
"scope"
],
"properties": {
"description": {
"description": "An optional human-readable description for the policy.\nPolicy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.",
"examples": [
"Default policy"
],
"type": "string",
"pattern": "^[A-Za-z0-9 ,.]{1,50}$"
},
"rules": {
"description": "A list of rules that comprise the policy. There is a limit of 10 rules per policy.",
"type": "array",
"items": {
"$ref": "#/components/schemas/Rule"
}
},
"scope": {
"description": "The scope of the policy.",
"examples": [
"project"
],
"type": "string",
"enum": [
"project",
"account"
]
}
}
}
Fields§
§description: Option<CreatePolicyBodyDescription>
An optional human-readable description for the policy. Policy descriptions can consist of alphanumeric characters, spaces, commas, and periods, and be 50 characters or less.
rules: Vec<Rule>
A list of rules that comprise the policy. There is a limit of 10 rules per policy.
scope: CreatePolicyBodyScope
The scope of the policy.
Implementations§
Source§impl CreatePolicyBody
impl CreatePolicyBody
pub fn builder() -> CreatePolicyBody
Trait Implementations§
Source§impl Clone for CreatePolicyBody
impl Clone for CreatePolicyBody
Source§fn clone(&self) -> CreatePolicyBody
fn clone(&self) -> CreatePolicyBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CreatePolicyBody
impl Debug for CreatePolicyBody
Source§impl<'de> Deserialize<'de> for CreatePolicyBody
impl<'de> Deserialize<'de> for CreatePolicyBody
Source§fn 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
Source§impl From<&CreatePolicyBody> for CreatePolicyBody
impl From<&CreatePolicyBody> for CreatePolicyBody
Source§fn from(value: &CreatePolicyBody) -> Self
fn from(value: &CreatePolicyBody) -> Self
Converts to this type from the input type.
Source§impl From<CreatePolicyBody> for CreatePolicyBody
impl From<CreatePolicyBody> for CreatePolicyBody
Source§fn from(value: CreatePolicyBody) -> Self
fn from(value: CreatePolicyBody) -> Self
Converts to this type from the input type.
Source§impl Serialize for CreatePolicyBody
impl Serialize for CreatePolicyBody
Source§impl TryFrom<CreatePolicyBody> for CreatePolicyBody
impl TryFrom<CreatePolicyBody> for CreatePolicyBody
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: CreatePolicyBody) -> Result<Self, ConversionError>
fn try_from(value: CreatePolicyBody) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for CreatePolicyBody
impl RefUnwindSafe for CreatePolicyBody
impl Send for CreatePolicyBody
impl Sync for CreatePolicyBody
impl Unpin for CreatePolicyBody
impl UnwindSafe for CreatePolicyBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more