aws_sdk_kms/client/
rotate_key_on_demand.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`RotateKeyOnDemand`](crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`key_id(impl Into<String>)`](crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandFluentBuilder::key_id) / [`set_key_id(Option<String>)`](crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandFluentBuilder::set_key_id):<br>required: **true**<br><p>Identifies a symmetric encryption KMS key. You cannot perform on-demand rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">asymmetric KMS keys</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html">HMAC KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To perform on-demand rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate">multi-Region keys</a>, invoke the on-demand rotation on the primary key.</p> <p>Specify the key ID or key ARN of the KMS key.</p> <p>For example:</p> <ul>  <li>   <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>  <li>   <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li> </ul> <p>To get the key ID and key ARN for a KMS key, use <code>ListKeys</code> or <code>DescribeKey</code>.</p><br>
7    /// - On success, responds with [`RotateKeyOnDemandOutput`](crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput) with field(s):
8    ///   - [`key_id(Option<String>)`](crate::operation::rotate_key_on_demand::RotateKeyOnDemandOutput::key_id): <p>Identifies the symmetric encryption KMS key that you initiated on-demand rotation on.</p>
9    /// - On failure, responds with [`SdkError<RotateKeyOnDemandError>`](crate::operation::rotate_key_on_demand::RotateKeyOnDemandError)
10    pub fn rotate_key_on_demand(&self) -> crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandFluentBuilder {
11        crate::operation::rotate_key_on_demand::builders::RotateKeyOnDemandFluentBuilder::new(self.handle.clone())
12    }
13}