commonMain.aws.sdk.kotlin.services.eventbridge.model.UpdateEventBusRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS SDK for Kotlin client for EventBridge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateEventBusRequest private constructor(builder: Builder) {
/**
* Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
*
* For more information, see [Event retry policy and using dead-letter queues](eventbridge/latest/userguide/eb-rule-dlq.html) in the *EventBridge User Guide*.
*/
public val deadLetterConfig: aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig? = builder.deadLetterConfig
/**
* The event bus description.
*/
public val description: kotlin.String? = builder.description
/**
* The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.
*
* If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus.
*
* For more information, see [Managing keys](https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html) in the *Key Management Service Developer Guide*.
*
* Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:
* + You call ` CreateArchive ` on an event bus set to use a customer managed key for encryption.
* + You call ` CreateDiscoverer ` on an event bus set to use a customer managed key for encryption.
* + You call ` UpdatedEventBus ` to set a customer managed key on an event bus with an archives or schema discovery enabled.
* To enable archives or schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see [Data encryption in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html) in the *Amazon EventBridge User Guide*.
*/
public val kmsKeyIdentifier: kotlin.String? = builder.kmsKeyIdentifier
/**
* The name of the event bus.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.model.UpdateEventBusRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateEventBusRequest(")
append("deadLetterConfig=$deadLetterConfig,")
append("description=$description,")
append("kmsKeyIdentifier=$kmsKeyIdentifier,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deadLetterConfig?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (kmsKeyIdentifier?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
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 UpdateEventBusRequest
if (deadLetterConfig != other.deadLetterConfig) return false
if (description != other.description) return false
if (kmsKeyIdentifier != other.kmsKeyIdentifier) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eventbridge.model.UpdateEventBusRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
*
* For more information, see [Event retry policy and using dead-letter queues](eventbridge/latest/userguide/eb-rule-dlq.html) in the *EventBridge User Guide*.
*/
public var deadLetterConfig: aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig? = null
/**
* The event bus description.
*/
public var description: kotlin.String? = null
/**
* The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.
*
* If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus.
*
* For more information, see [Managing keys](https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html) in the *Key Management Service Developer Guide*.
*
* Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:
* + You call ` CreateArchive ` on an event bus set to use a customer managed key for encryption.
* + You call ` CreateDiscoverer ` on an event bus set to use a customer managed key for encryption.
* + You call ` UpdatedEventBus ` to set a customer managed key on an event bus with an archives or schema discovery enabled.
* To enable archives or schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see [Data encryption in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html) in the *Amazon EventBridge User Guide*.
*/
public var kmsKeyIdentifier: kotlin.String? = null
/**
* The name of the event bus.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.UpdateEventBusRequest) : this() {
this.deadLetterConfig = x.deadLetterConfig
this.description = x.description
this.kmsKeyIdentifier = x.kmsKeyIdentifier
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eventbridge.model.UpdateEventBusRequest = UpdateEventBusRequest(this)
/**
* construct an [aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig] inside the given [block]
*/
public fun deadLetterConfig(block: aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig.Builder.() -> kotlin.Unit) {
this.deadLetterConfig = aws.sdk.kotlin.services.eventbridge.model.DeadLetterConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}