public EncryptionConfigurationForRepositoryCreationTemplate withKmsKey(String kmsKey) {
        setKmsKey(kmsKey);
        return this;
    }
<p>
If you use the <code>KMS</code> encryption type, specify the KMS key to use for encryption. The full ARN of the
KMS key must be specified. The key must exist in the same Region as the repository. If no key is specified, the
default Amazon Web Services managed KMS key for Amazon ECR will be used.
</p>

@param kmsKey
       If you use the <code>KMS</code> encryption type, specify the KMS key to use for encryption. The full ARN
       of the KMS key must be specified. The key must exist in the same Region as the repository. If no key is
       specified, the default Amazon Web Services managed KMS key for Amazon ECR will be used.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ecr/src/main/java/com/amazonaws/services/ecr/model/EncryptionConfigurationForRepositoryCreationTemplate.java