Struct aws_sdk_comprehend::operation::put_resource_policy::builders::PutResourcePolicyInputBuilder
source · #[non_exhaustive]pub struct PutResourcePolicyInputBuilder { /* private fields */ }Expand description
A builder for PutResourcePolicyInput.
Implementations§
source§impl PutResourcePolicyInputBuilder
impl PutResourcePolicyInputBuilder
sourcepub fn resource_arn(self, input: impl Into<String>) -> Self
pub fn resource_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the custom model to attach the policy to.
sourcepub fn set_resource_arn(self, input: Option<String>) -> Self
pub fn set_resource_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the custom model to attach the policy to.
sourcepub fn resource_policy(self, input: impl Into<String>) -> Self
pub fn resource_policy(self, input: impl Into<String>) -> Self
The JSON resource-based policy to attach to your custom model. Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:
"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:
'{"attribute": "value", "attribute": ["value"]}'
sourcepub fn set_resource_policy(self, input: Option<String>) -> Self
pub fn set_resource_policy(self, input: Option<String>) -> Self
The JSON resource-based policy to attach to your custom model. Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:
"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:
'{"attribute": "value", "attribute": ["value"]}'
sourcepub fn policy_revision_id(self, input: impl Into<String>) -> Self
pub fn policy_revision_id(self, input: impl Into<String>) -> Self
The revision ID that Amazon Comprehend assigned to the policy that you are updating. If you are creating a new policy that has no prior version, don't use this parameter. Amazon Comprehend creates the revision ID for you.
sourcepub fn set_policy_revision_id(self, input: Option<String>) -> Self
pub fn set_policy_revision_id(self, input: Option<String>) -> Self
The revision ID that Amazon Comprehend assigned to the policy that you are updating. If you are creating a new policy that has no prior version, don't use this parameter. Amazon Comprehend creates the revision ID for you.
sourcepub fn build(self) -> Result<PutResourcePolicyInput, BuildError>
pub fn build(self) -> Result<PutResourcePolicyInput, BuildError>
Consumes the builder and constructs a PutResourcePolicyInput.
Trait Implementations§
source§impl Clone for PutResourcePolicyInputBuilder
impl Clone for PutResourcePolicyInputBuilder
source§fn clone(&self) -> PutResourcePolicyInputBuilder
fn clone(&self) -> PutResourcePolicyInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for PutResourcePolicyInputBuilder
impl Default for PutResourcePolicyInputBuilder
source§fn default() -> PutResourcePolicyInputBuilder
fn default() -> PutResourcePolicyInputBuilder
source§impl PartialEq<PutResourcePolicyInputBuilder> for PutResourcePolicyInputBuilder
impl PartialEq<PutResourcePolicyInputBuilder> for PutResourcePolicyInputBuilder
source§fn eq(&self, other: &PutResourcePolicyInputBuilder) -> bool
fn eq(&self, other: &PutResourcePolicyInputBuilder) -> bool
self and other values to be equal, and is used
by ==.