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

com.pulumi.awsnative.iotsitewise.kotlin.Portal.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.iotsitewise.kotlin

import com.pulumi.awsnative.iotsitewise.kotlin.outputs.AlarmsProperties
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.iotsitewise.kotlin.outputs.AlarmsProperties.Companion.toKotlin as alarmsPropertiesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: PortalArgs = PortalArgs()

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

/**
 * Resource schema for AWS::IoTSiteWise::Portal
 */
public class Portal internal constructor(
    override val javaResource: com.pulumi.awsnative.iotsitewise.Portal,
) : KotlinCustomResource(javaResource, PortalMapper) {
    /**
     * Contains the configuration information of an alarm created in an AWS IoT SiteWise Monitor portal. You can use the alarm to monitor an asset property and get notified when the asset property value is outside a specified range.
     */
    public val alarms: Output?
        get() = javaResource.alarms().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    alarmsPropertiesToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The email address that sends alarm notifications.
     */
    public val notificationSenderEmail: Output?
        get() = javaResource.notificationSenderEmail().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ARN of the portal, which has the following format.
     */
    public val portalArn: Output
        get() = javaResource.portalArn().applyValue({ args0 -> args0 })

    /**
     * The service to use to authenticate users to the portal. Choose from SSO or IAM. You can't change this value after you create a portal.
     */
    public val portalAuthMode: Output?
        get() = javaResource.portalAuthMode().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The AWS SSO application generated client ID (used with AWS SSO APIs).
     */
    public val portalClientId: Output
        get() = javaResource.portalClientId().applyValue({ args0 -> args0 })

    /**
     * The AWS administrator's contact email address.
     */
    public val portalContactEmail: Output
        get() = javaResource.portalContactEmail().applyValue({ args0 -> args0 })

    /**
     * A description for the portal.
     */
    public val portalDescription: Output?
        get() = javaResource.portalDescription().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the portal.
     */
    public val portalId: Output
        get() = javaResource.portalId().applyValue({ args0 -> args0 })

    /**
     * A friendly name for the portal.
     */
    public val portalName: Output
        get() = javaResource.portalName().applyValue({ args0 -> args0 })

    /**
     * The public root URL for the AWS IoT AWS IoT SiteWise Monitor application portal.
     */
    public val portalStartUrl: Output
        get() = javaResource.portalStartUrl().applyValue({ args0 -> args0 })

    /**
     * The ARN of a service role that allows the portal's users to access your AWS IoT SiteWise resources on your behalf.
     */
    public val roleArn: Output
        get() = javaResource.roleArn().applyValue({ args0 -> args0 })

    /**
     * A list of key-value pairs that contain metadata for the portal.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object PortalMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.iotsitewise.Portal::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy