pub struct CreatePolicyBody {
pub chain_type: PolicyChainType,
pub name: CreatePolicyBodyName,
pub owner: Option<OwnerInput>,
pub owner_id: Option<OwnerIdInput>,
pub rules: Vec<PolicyRuleRequestBody>,
pub version: CreatePolicyBodyVersion,
}Expand description
CreatePolicyBody
JSON schema
{
"type": "object",
"required": [
"chain_type",
"name",
"rules",
"version"
],
"properties": {
"chain_type": {
"$ref": "#/components/schemas/PolicyChainType"
},
"name": {
"description": "Name to assign to policy.",
"type": "string",
"maxLength": 50,
"minLength": 1
},
"owner": {
"$ref": "#/components/schemas/OwnerInput"
},
"owner_id": {
"allOf": [
{
"$ref": "#/components/schemas/OwnerIdInput"
},
{}
]
},
"rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PolicyRuleRequestBody"
}
},
"version": {
"description": "Version of the policy. Currently, 1.0 is the only
version.",
"type": "string",
"enum": [
"1.0"
]
}
}
}Fields§
§chain_type: PolicyChainType§name: CreatePolicyBodyNameName to assign to policy.
owner: Option<OwnerInput>§owner_id: Option<OwnerIdInput>§rules: Vec<PolicyRuleRequestBody>§version: CreatePolicyBodyVersionVersion of the policy. Currently, 1.0 is the only version.
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.
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