
commonMain.aws.sdk.kotlin.services.kms.model.RevokeGrantRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kms.model
public class RevokeGrantRequest private constructor(builder: Builder) {
/**
* Checks if your request will succeed. `DryRun` is an optional parameter.
*
* To learn more about how to use this parameter, see [Testing your KMS API calls](https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html) in the *Key Management Service Developer Guide*.
*/
public val dryRun: kotlin.Boolean? = builder.dryRun
/**
* Identifies the grant to revoke. To get the grant ID, use CreateGrant, ListGrants, or ListRetirableGrants.
*/
public val grantId: kotlin.String? = builder.grantId
/**
* A unique identifier for the KMS key associated with the grant. To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
*
* Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different Amazon Web Services account, you must use the key 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`
*
* To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
*/
public val keyId: kotlin.String? = builder.keyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kms.model.RevokeGrantRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RevokeGrantRequest(")
append("dryRun=$dryRun,")
append("grantId=$grantId,")
append("keyId=$keyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dryRun?.hashCode() ?: 0
result = 31 * result + (grantId?.hashCode() ?: 0)
result = 31 * result + (keyId?.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 RevokeGrantRequest
if (dryRun != other.dryRun) return false
if (grantId != other.grantId) return false
if (keyId != other.keyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kms.model.RevokeGrantRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Checks if your request will succeed. `DryRun` is an optional parameter.
*
* To learn more about how to use this parameter, see [Testing your KMS API calls](https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html) in the *Key Management Service Developer Guide*.
*/
public var dryRun: kotlin.Boolean? = null
/**
* Identifies the grant to revoke. To get the grant ID, use CreateGrant, ListGrants, or ListRetirableGrants.
*/
public var grantId: kotlin.String? = null
/**
* A unique identifier for the KMS key associated with the grant. To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
*
* Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different Amazon Web Services account, you must use the key 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`
*
* To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
*/
public var keyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kms.model.RevokeGrantRequest) : this() {
this.dryRun = x.dryRun
this.grantId = x.grantId
this.keyId = x.keyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kms.model.RevokeGrantRequest = RevokeGrantRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy