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

com.pulumi.awsnative.backup.kotlin.ReportPlan.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.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.backup.kotlin

import com.pulumi.awsnative.backup.kotlin.outputs.ReportDeliveryChannelProperties
import com.pulumi.awsnative.backup.kotlin.outputs.ReportSettingProperties
import com.pulumi.awsnative.kotlin.outputs.Tag
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.backup.kotlin.outputs.ReportDeliveryChannelProperties.Companion.toKotlin as reportDeliveryChannelPropertiesToKotlin
import com.pulumi.awsnative.backup.kotlin.outputs.ReportSettingProperties.Companion.toKotlin as reportSettingPropertiesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: ReportPlanArgs = ReportPlanArgs()

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

/**
 * Contains detailed information about a report plan in AWS Backup Audit Manager.
 */
public class ReportPlan internal constructor(
    override val javaResource: com.pulumi.awsnative.backup.ReportPlan,
) : KotlinCustomResource(javaResource, ReportPlanMapper) {
    /**
     * A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
     */
    public val reportDeliveryChannel: Output
        get() = javaResource.reportDeliveryChannel().applyValue({ args0 ->
            args0.let({ args0 ->
                reportDeliveryChannelPropertiesToKotlin(args0)
            })
        })

    /**
     * An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.
     */
    public val reportPlanArn: Output
        get() = javaResource.reportPlanArn().applyValue({ args0 -> args0 })

    /**
     * An optional description of the report plan with a maximum of 1,024 characters.
     */
    public val reportPlanDescription: Output?
        get() = javaResource.reportPlanDescription().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
     */
    public val reportPlanName: Output?
        get() = javaResource.reportPlanName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Metadata that you can assign to help organize the report plans that you create. Each tag is a key-value pair.
     */
    public val reportPlanTags: Output>?
        get() = javaResource.reportPlanTags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.let({ args0 -> tagToKotlin(args0) }) })
            }).orElse(null)
        })

    /**
     * Identifies the report template for the report. Reports are built using a report template.
     */
    public val reportSetting: Output
        get() = javaResource.reportSetting().applyValue({ args0 ->
            args0.let({ args0 ->
                reportSettingPropertiesToKotlin(args0)
            })
        })
}

public object ReportPlanMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.backup.ReportPlan::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy