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

com.pulumi.awsnative.s3.kotlin.AccessGrantArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.s3.kotlin

import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgs
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgsBuilder
import com.pulumi.awsnative.s3.AccessGrantArgs.builder
import com.pulumi.awsnative.s3.kotlin.enums.AccessGrantPermission
import com.pulumi.awsnative.s3.kotlin.enums.AccessGrantS3PrefixType
import com.pulumi.awsnative.s3.kotlin.inputs.AccessGrantGranteeArgs
import com.pulumi.awsnative.s3.kotlin.inputs.AccessGrantGranteeArgsBuilder
import com.pulumi.awsnative.s3.kotlin.inputs.AccessGrantsLocationConfigurationArgs
import com.pulumi.awsnative.s3.kotlin.inputs.AccessGrantsLocationConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::S3::AccessGrant resource is an Amazon S3 resource type representing permissions to a specific S3 bucket or prefix hosted in an S3 Access Grants instance.
 * @property accessGrantsLocationConfiguration The configuration options of the grant location, which is the S3 path to the data to which you are granting access.
 * @property accessGrantsLocationId The custom S3 location to be accessed by the grantee
 * @property applicationArn The ARN of the application grantees will use to access the location
 * @property grantee The principal who will be granted permission to access S3.
 * @property permission The level of access to be afforded to the grantee
 * @property s3PrefixType The type of S3SubPrefix.
 * @property tags The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
 */
public data class AccessGrantArgs(
    public val accessGrantsLocationConfiguration: Output? =
        null,
    public val accessGrantsLocationId: Output? = null,
    public val applicationArn: Output? = null,
    public val grantee: Output? = null,
    public val permission: Output? = null,
    public val s3PrefixType: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.s3.AccessGrantArgs =
        com.pulumi.awsnative.s3.AccessGrantArgs.builder()
            .accessGrantsLocationConfiguration(
                accessGrantsLocationConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .accessGrantsLocationId(accessGrantsLocationId?.applyValue({ args0 -> args0 }))
            .applicationArn(applicationArn?.applyValue({ args0 -> args0 }))
            .grantee(grantee?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .permission(permission?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .s3PrefixType(s3PrefixType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AccessGrantArgs].
 */
@PulumiTagMarker
public class AccessGrantArgsBuilder internal constructor() {
    private var accessGrantsLocationConfiguration: Output? =
        null

    private var accessGrantsLocationId: Output? = null

    private var applicationArn: Output? = null

    private var grantee: Output? = null

    private var permission: Output? = null

    private var s3PrefixType: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The configuration options of the grant location, which is the S3 path to the data to which you are granting access.
     */
    @JvmName("dilhnvbcvmgkgnhh")
    public suspend fun accessGrantsLocationConfiguration(`value`: Output) {
        this.accessGrantsLocationConfiguration = value
    }

    /**
     * @param value The custom S3 location to be accessed by the grantee
     */
    @JvmName("indsooorjuelvbhf")
    public suspend fun accessGrantsLocationId(`value`: Output) {
        this.accessGrantsLocationId = value
    }

    /**
     * @param value The ARN of the application grantees will use to access the location
     */
    @JvmName("sgghjtxmclnbohvm")
    public suspend fun applicationArn(`value`: Output) {
        this.applicationArn = value
    }

    /**
     * @param value The principal who will be granted permission to access S3.
     */
    @JvmName("xafjkpupoigwrwnb")
    public suspend fun grantee(`value`: Output) {
        this.grantee = value
    }

    /**
     * @param value The level of access to be afforded to the grantee
     */
    @JvmName("rnlqbduudguqealr")
    public suspend fun permission(`value`: Output) {
        this.permission = value
    }

    /**
     * @param value The type of S3SubPrefix.
     */
    @JvmName("cmjesxepnmxhxaqx")
    public suspend fun s3PrefixType(`value`: Output) {
        this.s3PrefixType = value
    }

    /**
     * @param value The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("cpsibnsjbjibruet")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("kqmyepwqoghmedoc")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("cwmnabcjqrpmkmdt")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The configuration options of the grant location, which is the S3 path to the data to which you are granting access.
     */
    @JvmName("euqohkpocqkxjlac")
    public suspend fun accessGrantsLocationConfiguration(`value`: AccessGrantsLocationConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessGrantsLocationConfiguration = mapped
    }

    /**
     * @param argument The configuration options of the grant location, which is the S3 path to the data to which you are granting access.
     */
    @JvmName("adcthwneaajfwbwh")
    public suspend fun accessGrantsLocationConfiguration(argument: suspend AccessGrantsLocationConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = AccessGrantsLocationConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.accessGrantsLocationConfiguration = mapped
    }

    /**
     * @param value The custom S3 location to be accessed by the grantee
     */
    @JvmName("ynkvsjointcdatto")
    public suspend fun accessGrantsLocationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessGrantsLocationId = mapped
    }

    /**
     * @param value The ARN of the application grantees will use to access the location
     */
    @JvmName("jqygfgobymkuoaej")
    public suspend fun applicationArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applicationArn = mapped
    }

    /**
     * @param value The principal who will be granted permission to access S3.
     */
    @JvmName("adadhxotkhcrhiww")
    public suspend fun grantee(`value`: AccessGrantGranteeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.grantee = mapped
    }

    /**
     * @param argument The principal who will be granted permission to access S3.
     */
    @JvmName("rohyvgbbqgxpgtgb")
    public suspend fun grantee(argument: suspend AccessGrantGranteeArgsBuilder.() -> Unit) {
        val toBeMapped = AccessGrantGranteeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.grantee = mapped
    }

    /**
     * @param value The level of access to be afforded to the grantee
     */
    @JvmName("bmmxjuunmcsywnfv")
    public suspend fun permission(`value`: AccessGrantPermission?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permission = mapped
    }

    /**
     * @param value The type of S3SubPrefix.
     */
    @JvmName("ysfydkrsjykwkgan")
    public suspend fun s3PrefixType(`value`: AccessGrantS3PrefixType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.s3PrefixType = mapped
    }

    /**
     * @param value The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("urnrmyynhmyinptm")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("ilromuiyjrnemysx")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("fbkmkccctngnyiiv")
    public suspend fun tags(vararg argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("dhbeuwclsltsycxe")
    public suspend fun tags(argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CreateOnlyTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The AWS resource tags that you are adding to the access grant. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
     */
    @JvmName("novxwwhbavecaeeh")
    public suspend fun tags(vararg values: CreateOnlyTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AccessGrantArgs = AccessGrantArgs(
        accessGrantsLocationConfiguration = accessGrantsLocationConfiguration,
        accessGrantsLocationId = accessGrantsLocationId,
        applicationArn = applicationArn,
        grantee = grantee,
        permission = permission,
        s3PrefixType = s3PrefixType,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy