All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.qldb.model.UpdateLedgerPermissionsModeRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qldb.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateLedgerPermissionsModeRequest private constructor(builder: Builder) {
    /**
     * The name of the ledger.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The permissions mode to assign to the ledger. 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](https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html) in the *Amazon QLDB Developer Guide*.
     *
     * We strongly recommend using the `STANDARD` permissions mode to maximize the security of your ledger data.
     */
    public val permissionsMode: aws.sdk.kotlin.services.qldb.model.PermissionsMode? = builder.permissionsMode

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldb.model.UpdateLedgerPermissionsModeRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateLedgerPermissionsModeRequest(")
        append("name=$name,")
        append("permissionsMode=$permissionsMode")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (permissionsMode?.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 UpdateLedgerPermissionsModeRequest

        if (name != other.name) return false
        if (permissionsMode != other.permissionsMode) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldb.model.UpdateLedgerPermissionsModeRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The name of the ledger.
         */
        public var name: kotlin.String? = null
        /**
         * The permissions mode to assign to the ledger. 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](https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html) in the *Amazon QLDB Developer Guide*.
         *
         * We strongly recommend using the `STANDARD` permissions mode to maximize the security of your ledger data.
         */
        public var permissionsMode: aws.sdk.kotlin.services.qldb.model.PermissionsMode? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qldb.model.UpdateLedgerPermissionsModeRequest) : this() {
            this.name = x.name
            this.permissionsMode = x.permissionsMode
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.qldb.model.UpdateLedgerPermissionsModeRequest = UpdateLedgerPermissionsModeRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy