1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`UpdateLedger`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::set_name):<br>required: **true**<br><p>The name of the ledger.</p><br>
    ///   - [`deletion_protection(bool)`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::deletion_protection) / [`set_deletion_protection(Option<bool>)`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::set_deletion_protection):<br>required: **false**<br><p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p><br>
    ///   - [`kms_key(impl Into<String>)`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::kms_key) / [`set_kms_key(Option<String>)`](crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::set_kms_key):<br>required: **false**<br><p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p> <p>Use one of the following options to specify this parameter:</p> <ul>  <li>   <p><code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p></li>  <li>   <p><b>Undefined</b>: Make no changes to the KMS key of the ledger.</p></li>  <li>   <p><b>A valid symmetric customer managed KMS key</b>: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.</p>   <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p></li> </ul> <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</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>  <li>   <p>Alias name: <code>alias/ExampleAlias</code></p></li>  <li>   <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code></p></li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p><br>
    /// - On success, responds with [`UpdateLedgerOutput`](crate::operation::update_ledger::UpdateLedgerOutput) with field(s):
    ///   - [`name(Option<String>)`](crate::operation::update_ledger::UpdateLedgerOutput::name): <p>The name of the ledger.</p>
    ///   - [`arn(Option<String>)`](crate::operation::update_ledger::UpdateLedgerOutput::arn): <p>The Amazon Resource Name (ARN) for the ledger.</p>
    ///   - [`state(Option<LedgerState>)`](crate::operation::update_ledger::UpdateLedgerOutput::state): <p>The current status of the ledger.</p>
    ///   - [`creation_date_time(Option<DateTime>)`](crate::operation::update_ledger::UpdateLedgerOutput::creation_date_time): <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
    ///   - [`deletion_protection(Option<bool>)`](crate::operation::update_ledger::UpdateLedgerOutput::deletion_protection): <p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p> <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p>
    ///   - [`encryption_description(Option<LedgerEncryptionDescription>)`](crate::operation::update_ledger::UpdateLedgerOutput::encryption_description): <p>Information about the encryption of data at rest in the ledger. This includes the current status, the KMS key, and when the key became inaccessible (in the case of an error).</p>
    /// - On failure, responds with [`SdkError<UpdateLedgerError>`](crate::operation::update_ledger::UpdateLedgerError)
    pub fn update_ledger(&self) -> crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder {
        crate::operation::update_ledger::builders::UpdateLedgerFluentBuilder::new(self.handle.clone())
    }
}