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

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

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.s3.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.s3.kotlin.outputs.StorageLensGroupFilter
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.s3.kotlin.outputs.StorageLensGroupFilter.Companion.toKotlin as storageLensGroupFilterToKotlin

/**
 * Builder for [StorageLensGroup].
 */
@PulumiTagMarker
public class StorageLensGroupResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: StorageLensGroupArgs = StorageLensGroupArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend StorageLensGroupArgsBuilder.() -> Unit) {
        val builder = StorageLensGroupArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): StorageLensGroup {
        val builtJavaResource = com.pulumi.awsnative.s3.StorageLensGroup(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return StorageLensGroup(builtJavaResource)
    }
}

/**
 * The AWS::S3::StorageLensGroup resource is an Amazon S3 resource type that you can use to create Storage Lens Group.
 */
public class StorageLensGroup internal constructor(
    override val javaResource: com.pulumi.awsnative.s3.StorageLensGroup,
) : KotlinCustomResource(javaResource, StorageLensGroupMapper) {
    /**
     * This property contains the criteria for the Storage Lens group data that is displayed
     */
    public val filter: Output
        get() = javaResource.filter().applyValue({ args0 ->
            args0.let({ args0 ->
                storageLensGroupFilterToKotlin(args0)
            })
        })

    /**
     * This property contains the Storage Lens group name.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The ARN for the Amazon S3 Storage Lens Group.
     */
    public val storageLensGroupArn: Output
        get() = javaResource.storageLensGroupArn().applyValue({ args0 -> args0 })

    /**
     * A set of tags (key-value pairs) for this Amazon S3 Storage Lens Group.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object StorageLensGroupMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.s3.StorageLensGroup::class == javaResource::class

    override fun map(javaResource: Resource): StorageLensGroup = StorageLensGroup(
        javaResource as
            com.pulumi.awsnative.s3.StorageLensGroup,
    )
}

/**
 * @see [StorageLensGroup].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [StorageLensGroup].
 */
public suspend fun storageLensGroup(
    name: String,
    block: suspend StorageLensGroupResourceBuilder.() -> Unit,
): StorageLensGroup {
    val builder = StorageLensGroupResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [StorageLensGroup].
 * @param name The _unique_ name of the resulting resource.
 */
public fun storageLensGroup(name: String): StorageLensGroup {
    val builder = StorageLensGroupResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy