commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.model.SseAwsKeyManagementParams.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chimesdkmediapipelines-jvm Show documentation
Show all versions of chimesdkmediapipelines-jvm Show documentation
The AWS SDK for Kotlin client for Chime SDK Media Pipelines
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chimesdkmediapipelines.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains server side encryption parameters to be used by media capture pipeline. The parameters can also be used by media concatenation pipeline taking media capture pipeline as a media source.
*/
public class SseAwsKeyManagementParams private constructor(builder: Builder) {
/**
* Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as non-secret key-value pair known as encryption context pairs, that provides an added layer of security for your data. For more information, see [KMS encryption context](https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html) and [Asymmetric keys in KMS](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *Key Management Service Developer Guide*.
*/
public val awsKmsEncryptionContext: kotlin.String? = builder.awsKmsEncryptionContext
/**
* The KMS key you want to use to encrypt your media pipeline output. Decryption is required for concatenation pipeline. If using a key located in the current Amazon Web Services account, you can specify your KMS key in one of four ways:
* + Use the KMS key ID itself. For example, `1234abcd-12ab-34cd-56ef-1234567890ab`.
* + Use an alias for the KMS key ID. For example, `alias/ExampleAlias`.
* + Use the Amazon Resource Name (ARN) for the KMS key ID. For example, `arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab`.
* + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
*
* If using a key located in a different Amazon Web Services account than the current Amazon Web Services account, you can specify your KMS key in one of two ways:
* + Use the ARN for the KMS key ID. For example, `arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab`.
* + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
*
* If you don't specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).
*
* Note that the role specified in the `SinkIamRoleArn` request parameter must have permission to use the specified KMS key.
*/
public val awsKmsKeyId: kotlin.String = requireNotNull(builder.awsKmsKeyId) { "A non-null value must be provided for awsKmsKeyId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmediapipelines.model.SseAwsKeyManagementParams = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SseAwsKeyManagementParams(")
append("awsKmsEncryptionContext=$awsKmsEncryptionContext,")
append("awsKmsKeyId=$awsKmsKeyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = awsKmsEncryptionContext?.hashCode() ?: 0
result = 31 * result + (awsKmsKeyId.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as SseAwsKeyManagementParams
if (awsKmsEncryptionContext != other.awsKmsEncryptionContext) return false
if (awsKmsKeyId != other.awsKmsKeyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmediapipelines.model.SseAwsKeyManagementParams = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption context as non-secret key-value pair known as encryption context pairs, that provides an added layer of security for your data. For more information, see [KMS encryption context](https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html) and [Asymmetric keys in KMS](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *Key Management Service Developer Guide*.
*/
public var awsKmsEncryptionContext: kotlin.String? = null
/**
* The KMS key you want to use to encrypt your media pipeline output. Decryption is required for concatenation pipeline. If using a key located in the current Amazon Web Services account, you can specify your KMS key in one of four ways:
* + Use the KMS key ID itself. For example, `1234abcd-12ab-34cd-56ef-1234567890ab`.
* + Use an alias for the KMS key ID. For example, `alias/ExampleAlias`.
* + Use the Amazon Resource Name (ARN) for the KMS key ID. For example, `arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab`.
* + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
*
* If using a key located in a different Amazon Web Services account than the current Amazon Web Services account, you can specify your KMS key in one of two ways:
* + Use the ARN for the KMS key ID. For example, `arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab`.
* + Use the ARN for the KMS key alias. For example, `arn:aws:kms:region:account-ID:alias/ExampleAlias`.
*
* If you don't specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).
*
* Note that the role specified in the `SinkIamRoleArn` request parameter must have permission to use the specified KMS key.
*/
public var awsKmsKeyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SseAwsKeyManagementParams) : this() {
this.awsKmsEncryptionContext = x.awsKmsEncryptionContext
this.awsKmsKeyId = x.awsKmsKeyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmediapipelines.model.SseAwsKeyManagementParams = SseAwsKeyManagementParams(this)
internal fun correctErrors(): Builder {
if (awsKmsKeyId == null) awsKmsKeyId = ""
return this
}
}
}