Struct aws_sdk_iot::input::CreatePolicyInput
source · #[non_exhaustive]pub struct CreatePolicyInput { /* private fields */ }
Expand description
The input for the CreatePolicy operation.
Implementations§
source§impl CreatePolicyInput
impl CreatePolicyInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<CreatePolicy, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<CreatePolicy, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<CreatePolicy
>
Examples found in repository?
src/client.rs (line 7139)
7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreatePolicy,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreatePolicyError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreatePolicyOutput,
aws_smithy_http::result::SdkError<crate::error::CreatePolicyError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture CreatePolicyInput
.
source§impl CreatePolicyInput
impl CreatePolicyInput
sourcepub fn policy_name(&self) -> Option<&str>
pub fn policy_name(&self) -> Option<&str>
The policy name.
sourcepub fn policy_document(&self) -> Option<&str>
pub fn policy_document(&self) -> Option<&str>
The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
Metadata which can be used to manage the policy.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
Trait Implementations§
source§impl Clone for CreatePolicyInput
impl Clone for CreatePolicyInput
source§fn clone(&self) -> CreatePolicyInput
fn clone(&self) -> CreatePolicyInput
Returns a copy 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 more