Struct aws_sdk_kms::input::GetKeyPolicyInput
source · #[non_exhaustive]pub struct GetKeyPolicyInput { /* private fields */ }
Implementations§
source§impl GetKeyPolicyInput
impl GetKeyPolicyInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<GetKeyPolicy, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<GetKeyPolicy, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<GetKeyPolicy
>
Examples found in repository?
src/client.rs (line 4235)
4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetKeyPolicy,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetKeyPolicyError>,
> {
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::GetKeyPolicyOutput,
aws_smithy_http::result::SdkError<crate::error::GetKeyPolicyError>,
> {
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 GetKeyPolicyInput
.
source§impl GetKeyPolicyInput
impl GetKeyPolicyInput
sourcepub fn key_id(&self) -> Option<&str>
pub fn key_id(&self) -> Option<&str>
Gets the key policy for the specified KMS key.
Specify the key ID or key ARN of the KMS key.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab
-
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys
or DescribeKey
.
sourcepub fn policy_name(&self) -> Option<&str>
pub fn policy_name(&self) -> Option<&str>
Specifies the name of the key policy. The only valid name is default
. To get the names of key policies, use ListKeyPolicies
.
Trait Implementations§
source§impl Clone for GetKeyPolicyInput
impl Clone for GetKeyPolicyInput
source§fn clone(&self) -> GetKeyPolicyInput
fn clone(&self) -> GetKeyPolicyInput
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