/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.qldb.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateLedgerRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon * Web Services account in the current Region. *

*

* Naming constraints for ledger names are defined in Quotas in Amazon QLDB * in the Amazon QLDB Developer Guide. *

*/ private String name; /** *

* The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values * are case sensitive and can be null. *

*/ private java.util.Map tags; /** *

* The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values: *

* * *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger * data. *

*
*/ private String permissionsMode; /** *

* Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, * this feature is enabled (true) by default. *

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it * by calling the UpdateLedger operation to set this parameter to false. *

*/ private Boolean deletionProtection; /** *

* The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at rest in * the Amazon QLDB Developer Guide. *

*

* Use one of the following options to specify this parameter: *

* *

* 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 "alias/". To specify a key in a different Amazon Web * Services account, you must use the key ARN or alias ARN. *

*

* For example: *

* *

* For more information, see Key identifiers (KeyId) in * the Key Management Service Developer Guide. *

*/ private String kmsKey; /** *

* The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon * Web Services account in the current Region. *

*

* Naming constraints for ledger names are defined in Quotas in Amazon QLDB * in the Amazon QLDB Developer Guide. *

* * @param name * The name of the ledger that you want to create. The name must be unique among all of the ledgers in your * Amazon Web Services account in the current Region.

*

* Naming constraints for ledger names are defined in Quotas in Amazon * QLDB in the Amazon QLDB Developer Guide. */ public void setName(String name) { this.name = name; } /** *

* The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon * Web Services account in the current Region. *

*

* Naming constraints for ledger names are defined in Quotas in Amazon QLDB * in the Amazon QLDB Developer Guide. *

* * @return The name of the ledger that you want to create. The name must be unique among all of the ledgers in your * Amazon Web Services account in the current Region.

*

* Naming constraints for ledger names are defined in Quotas in Amazon * QLDB in the Amazon QLDB Developer Guide. */ public String getName() { return this.name; } /** *

* The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon * Web Services account in the current Region. *

*

* Naming constraints for ledger names are defined in Quotas in Amazon QLDB * in the Amazon QLDB Developer Guide. *

* * @param name * The name of the ledger that you want to create. The name must be unique among all of the ledgers in your * Amazon Web Services account in the current Region.

*

* Naming constraints for ledger names are defined in Quotas in Amazon * QLDB in the Amazon QLDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLedgerRequest withName(String name) { setName(name); return this; } /** *

* The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values * are case sensitive and can be null. *

* * @return The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. * Tag values are case sensitive and can be null. */ public java.util.Map getTags() { return tags; } /** *

* The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values * are case sensitive and can be null. *

* * @param tags * The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag * values are case sensitive and can be null. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values * are case sensitive and can be null. *

* * @param tags * The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag * values are case sensitive and can be null. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLedgerRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateLedgerRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateLedgerRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLedgerRequest clearTagsEntries() { this.tags = null; return this; } /** *

* The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values: *

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for * ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL * commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any * table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer granularity * for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow * PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL * actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started * with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger * data. *

*
* * @param permissionsMode * The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values:

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity * for ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all * PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode * disregards any table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer * granularity for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. * To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources * and PartiQL actions, in addition to the SendCommand API permission for the ledger. For * information, see Getting * started with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your * ledger data. *

* @see PermissionsMode */ public void setPermissionsMode(String permissionsMode) { this.permissionsMode = permissionsMode; } /** *

* The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values: *

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for * ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL * commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any * table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer granularity * for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow * PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL * actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started * with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger * data. *

*
* * @return The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values:

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity * for ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all * PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode * disregards any table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer * granularity for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. * To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources * and PartiQL actions, in addition to the SendCommand API permission for the ledger. For * information, see Getting * started with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your * ledger data. *

* @see PermissionsMode */ public String getPermissionsMode() { return this.permissionsMode; } /** *

* The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values: *

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for * ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL * commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any * table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer granularity * for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow * PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL * actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started * with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger * data. *

*
* * @param permissionsMode * The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values:

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity * for ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all * PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode * disregards any table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer * granularity for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. * To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources * and PartiQL actions, in addition to the SendCommand API permission for the ledger. For * information, see Getting * started with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your * ledger data. *

* @return Returns a reference to this object so that method calls can be chained together. * @see PermissionsMode */ public CreateLedgerRequest withPermissionsMode(String permissionsMode) { setPermissionsMode(permissionsMode); return this; } /** *

* The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values: *

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for * ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL * commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any * table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer granularity * for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow * PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL * actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started * with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger * data. *

*
* * @param permissionsMode * The permissions mode to assign to the ledger that you want to create. This parameter can have one of the * following values:

*
    *
  • *

    * ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity * for ledgers. *

    *

    * This mode allows users who have the SendCommand API permission for this ledger to run all * PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode * disregards any table-level or command-level IAM permissions policies that you create for the ledger. *

    *
  • *
  • *

    * STANDARD: (Recommended) A permissions mode that enables access control with finer * granularity for ledgers, tables, and PartiQL commands. *

    *

    * By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. * To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources * and PartiQL actions, in addition to the SendCommand API permission for the ledger. For * information, see Getting * started with the standard permissions mode in the Amazon QLDB Developer Guide. *

    *
  • *
* *

* We strongly recommend using the STANDARD permissions mode to maximize the security of your * ledger data. *

* @return Returns a reference to this object so that method calls can be chained together. * @see PermissionsMode */ public CreateLedgerRequest withPermissionsMode(PermissionsMode permissionsMode) { this.permissionsMode = permissionsMode.toString(); return this; } /** *

* Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, * this feature is enabled (true) by default. *

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it * by calling the UpdateLedger operation to set this parameter to false. *

* * @param deletionProtection * Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger * creation, this feature is enabled (true) by default.

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can * disable it by calling the UpdateLedger operation to set this parameter to false. */ public void setDeletionProtection(Boolean deletionProtection) { this.deletionProtection = deletionProtection; } /** *

* Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, * this feature is enabled (true) by default. *

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it * by calling the UpdateLedger operation to set this parameter to false. *

* * @return Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger * creation, this feature is enabled (true) by default.

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can * disable it by calling the UpdateLedger operation to set this parameter to false. */ public Boolean getDeletionProtection() { return this.deletionProtection; } /** *

* Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, * this feature is enabled (true) by default. *

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it * by calling the UpdateLedger operation to set this parameter to false. *

* * @param deletionProtection * Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger * creation, this feature is enabled (true) by default.

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can * disable it by calling the UpdateLedger operation to set this parameter to false. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLedgerRequest withDeletionProtection(Boolean deletionProtection) { setDeletionProtection(deletionProtection); return this; } /** *

* Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, * this feature is enabled (true) by default. *

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it * by calling the UpdateLedger operation to set this parameter to false. *

* * @return Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger * creation, this feature is enabled (true) by default.

*

* If deletion protection is enabled, you must first disable it before you can delete the ledger. You can * disable it by calling the UpdateLedger operation to set this parameter to false. */ public Boolean isDeletionProtection() { return this.deletionProtection; } /** *

* The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at rest in * the Amazon QLDB Developer Guide. *

*

* Use one of the following options to specify this parameter: *

*
    *
  • *

    * AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf. *

    *
  • *
  • *

    * Undefined: By default, use an Amazon Web Services owned KMS key. *

    *
  • *
  • *

    * A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account * that you create, own, and manage. *

    *

    * Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *

    *
  • *
*

* 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 "alias/". To specify a key in a different Amazon Web * Services account, you must use the key ARN or alias ARN. *

*

* For example: *

*
    *
  • *

    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Alias name: alias/ExampleAlias *

    *
  • *
  • *

    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias *

    *
  • *
*

* For more information, see Key identifiers (KeyId) in * the Key Management Service Developer Guide. *

* * @param kmsKey * The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at * rest in the Amazon QLDB Developer Guide.

*

* Use one of the following options to specify this parameter: *

*
    *
  • *

    * AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your * behalf. *

    *
  • *
  • *

    * Undefined: By default, use an Amazon Web Services owned KMS key. *

    *
  • *
  • *

    * A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your * account that you create, own, and manage. *

    *

    * Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *

    *
  • *
*

* 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 "alias/". To specify a key in a different * Amazon Web Services account, you must use the key ARN or alias ARN. *

*

* For example: *

*
    *
  • *

    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Alias name: alias/ExampleAlias *

    *
  • *
  • *

    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias *

    *
  • *
*

* For more information, see Key identifiers * (KeyId) in the Key Management Service Developer Guide. */ public void setKmsKey(String kmsKey) { this.kmsKey = kmsKey; } /** *

* The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at rest in * the Amazon QLDB Developer Guide. *

*

* Use one of the following options to specify this parameter: *

*
    *
  • *

    * AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf. *

    *
  • *
  • *

    * Undefined: By default, use an Amazon Web Services owned KMS key. *

    *
  • *
  • *

    * A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account * that you create, own, and manage. *

    *

    * Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *

    *
  • *
*

* 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 "alias/". To specify a key in a different Amazon Web * Services account, you must use the key ARN or alias ARN. *

*

* For example: *

*
    *
  • *

    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Alias name: alias/ExampleAlias *

    *
  • *
  • *

    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias *

    *
  • *
*

* For more information, see Key identifiers (KeyId) in * the Key Management Service Developer Guide. *

* * @return The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at * rest in the Amazon QLDB Developer Guide.

*

* Use one of the following options to specify this parameter: *

*
    *
  • *

    * AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your * behalf. *

    *
  • *
  • *

    * Undefined: By default, use an Amazon Web Services owned KMS key. *

    *
  • *
  • *

    * A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your * account that you create, own, and manage. *

    *

    * Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric * and asymmetric keys in the Key Management Service Developer Guide. *

    *
  • *
*

* 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 "alias/". To specify a key in a * different Amazon Web Services account, you must use the key ARN or alias ARN. *

*

* For example: *

*
    *
  • *

    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Alias name: alias/ExampleAlias *

    *
  • *
  • *

    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias *

    *
  • *
*

* For more information, see Key identifiers * (KeyId) in the Key Management Service Developer Guide. */ public String getKmsKey() { return this.kmsKey; } /** *

* The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at rest in * the Amazon QLDB Developer Guide. *

*

* Use one of the following options to specify this parameter: *

*
    *
  • *

    * AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf. *

    *
  • *
  • *

    * Undefined: By default, use an Amazon Web Services owned KMS key. *

    *
  • *
  • *

    * A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account * that you create, own, and manage. *

    *

    * Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *

    *
  • *
*

* 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 "alias/". To specify a key in a different Amazon Web * Services account, you must use the key ARN or alias ARN. *

*

* For example: *

*
    *
  • *

    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Alias name: alias/ExampleAlias *

    *
  • *
  • *

    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias *

    *
  • *
*

* For more information, see Key identifiers (KeyId) in * the Key Management Service Developer Guide. *

* * @param kmsKey * The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more * information, see Encryption at * rest in the Amazon QLDB Developer Guide.

*

* Use one of the following options to specify this parameter: *

*
    *
  • *

    * AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your * behalf. *

    *
  • *
  • *

    * Undefined: By default, use an Amazon Web Services owned KMS key. *

    *
  • *
  • *

    * A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your * account that you create, own, and manage. *

    *

    * Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and * asymmetric keys in the Key Management Service Developer Guide. *

    *
  • *
*

* 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 "alias/". To specify a key in a different * Amazon Web Services account, you must use the key ARN or alias ARN. *

*

* For example: *

*
    *
  • *

    * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

    *
  • *
  • *

    * Alias name: alias/ExampleAlias *

    *
  • *
  • *

    * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias *

    *
  • *
*

* For more information, see Key identifiers * (KeyId) in the Key Management Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLedgerRequest withKmsKey(String kmsKey) { setKmsKey(kmsKey); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getPermissionsMode() != null) sb.append("PermissionsMode: ").append(getPermissionsMode()).append(","); if (getDeletionProtection() != null) sb.append("DeletionProtection: ").append(getDeletionProtection()).append(","); if (getKmsKey() != null) sb.append("KmsKey: ").append(getKmsKey()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateLedgerRequest == false) return false; CreateLedgerRequest other = (CreateLedgerRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getPermissionsMode() == null ^ this.getPermissionsMode() == null) return false; if (other.getPermissionsMode() != null && other.getPermissionsMode().equals(this.getPermissionsMode()) == false) return false; if (other.getDeletionProtection() == null ^ this.getDeletionProtection() == null) return false; if (other.getDeletionProtection() != null && other.getDeletionProtection().equals(this.getDeletionProtection()) == false) return false; if (other.getKmsKey() == null ^ this.getKmsKey() == null) return false; if (other.getKmsKey() != null && other.getKmsKey().equals(this.getKmsKey()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getPermissionsMode() == null) ? 0 : getPermissionsMode().hashCode()); hashCode = prime * hashCode + ((getDeletionProtection() == null) ? 0 : getDeletionProtection().hashCode()); hashCode = prime * hashCode + ((getKmsKey() == null) ? 0 : getKmsKey().hashCode()); return hashCode; } @Override public CreateLedgerRequest clone() { return (CreateLedgerRequest) super.clone(); } }