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

com.pulumi.awsnative.devopsguru.kotlin.ResourceCollection.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.devopsguru.kotlin

import com.pulumi.awsnative.devopsguru.kotlin.enums.ResourceCollectionType
import com.pulumi.awsnative.devopsguru.kotlin.outputs.ResourceCollectionFilter
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 com.pulumi.awsnative.devopsguru.kotlin.enums.ResourceCollectionType.Companion.toKotlin as resourceCollectionTypeToKotlin
import com.pulumi.awsnative.devopsguru.kotlin.outputs.ResourceCollectionFilter.Companion.toKotlin as resourceCollectionFilterToKotlin

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

    public var args: ResourceCollectionArgs = ResourceCollectionArgs()

    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 ResourceCollectionArgsBuilder.() -> Unit) {
        val builder = ResourceCollectionArgsBuilder()
        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(): ResourceCollection {
        val builtJavaResource =
            com.pulumi.awsnative.devopsguru.ResourceCollection(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return ResourceCollection(builtJavaResource)
    }
}

/**
 * This resource schema represents the ResourceCollection resource in the Amazon DevOps Guru.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class ResourceCollection internal constructor(
    override val javaResource: com.pulumi.awsnative.devopsguru.ResourceCollection,
) : KotlinCustomResource(javaResource, ResourceCollectionMapper) {
    /**
     * Information about a filter used to specify which AWS resources are analyzed for anomalous behavior by DevOps Guru.
     */
    public val resourceCollectionFilter: Output
        get() = javaResource.resourceCollectionFilter().applyValue({ args0 ->
            args0.let({ args0 ->
                resourceCollectionFilterToKotlin(args0)
            })
        })

    /**
     * The type of ResourceCollection
     */
    public val resourceCollectionType: Output
        get() = javaResource.resourceCollectionType().applyValue({ args0 ->
            args0.let({ args0 ->
                resourceCollectionTypeToKotlin(args0)
            })
        })
}

public object ResourceCollectionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.devopsguru.ResourceCollection::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy