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

com.pulumi.awsnative.workspacesweb.kotlin.Portal.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.workspacesweb.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalAuthenticationType
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalBrowserType
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalInstanceType
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalRendererType
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalStatus
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalAuthenticationType.Companion.toKotlin as portalAuthenticationTypeToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalBrowserType.Companion.toKotlin as portalBrowserTypeToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalInstanceType.Companion.toKotlin as portalInstanceTypeToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalRendererType.Companion.toKotlin as portalRendererTypeToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.enums.PortalStatus.Companion.toKotlin as portalStatusToKotlin

/**
 * 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.workspacesweb.Portal(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Portal(builtJavaResource)
    }
}

/**
 * Definition of AWS::WorkSpacesWeb::Portal Resource Type
 */
public class Portal internal constructor(
    override val javaResource: com.pulumi.awsnative.workspacesweb.Portal,
) : KotlinCustomResource(javaResource, PortalMapper) {
    /**
     * The additional encryption context of the portal.
     */
    public val additionalEncryptionContext: Output>?
        get() = javaResource.additionalEncryptionContext().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.key.to(args0.value) }).toMap()
            }).orElse(null)
        })

    /**
     * The type of authentication integration points used when signing into the web portal. Defaults to `Standard` .
     * `Standard` web portals are authenticated directly through your identity provider (IdP). User and group access to your web portal is controlled through your IdP. You need to include an IdP resource in your template to integrate your IdP with your web portal. Completing the configuration for your IdP requires exchanging WorkSpaces Secure Browser’s SP metadata with your IdP’s IdP metadata. If your IdP requires the SP metadata first before returning the IdP metadata, you should follow these steps:
     * 1. Create and deploy a CloudFormation template with a `Standard` portal with no `IdentityProvider` resource.
     * 2. Retrieve the SP metadata using `Fn:GetAtt` , the WorkSpaces Secure Browser console, or by the calling the `GetPortalServiceProviderMetadata` API.
     * 3. Submit the data to your IdP.
     * 4. Add an `IdentityProvider` resource to your CloudFormation template.
     * `IAM Identity Center` web portals are authenticated through AWS IAM Identity Center . They provide additional features, such as IdP-initiated authentication. Identity sources (including external identity provider integration) and other identity provider information must be configured in IAM Identity Center . User and group assignment must be done through the WorkSpaces Secure Browser console. These cannot be configured in CloudFormation.
     */
    public val authenticationType: Output?
        get() = javaResource.authenticationType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> portalAuthenticationTypeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The ARN of the browser settings that is associated with this web portal.
     */
    public val browserSettingsArn: Output?
        get() = javaResource.browserSettingsArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The browser that users see when using a streaming session.
     */
    public val browserType: Output
        get() = javaResource.browserType().applyValue({ args0 ->
            args0.let({ args0 ->
                portalBrowserTypeToKotlin(args0)
            })
        })

    /**
     * The creation date of the web portal.
     */
    public val creationDate: Output
        get() = javaResource.creationDate().applyValue({ args0 -> args0 })

    /**
     * The customer managed key of the web portal.
     * *Pattern* : `^arn:[\w+=\/,.@-]+:kms:[a-zA-Z0-9\-]*:[a-zA-Z0-9]{1,12}:key\/[a-zA-Z0-9-]+$`
     */
    public val customerManagedKey: Output?
        get() = javaResource.customerManagedKey().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the web portal.
     */
    public val displayName: Output?
        get() = javaResource.displayName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The type and resources of the underlying instance.
     */
    public val instanceType: Output?
        get() = javaResource.instanceType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    portalInstanceTypeToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The ARN of the IP access settings that is associated with the web portal.
     */
    public val ipAccessSettingsArn: Output?
        get() = javaResource.ipAccessSettingsArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The maximum number of concurrent sessions for the portal.
     */
    public val maxConcurrentSessions: Output?
        get() = javaResource.maxConcurrentSessions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ARN of the network settings that is associated with the web portal.
     */
    public val networkSettingsArn: Output?
        get() = javaResource.networkSettingsArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The endpoint URL of the web portal that users access in order to start streaming sessions.
     */
    public val portalEndpoint: Output
        get() = javaResource.portalEndpoint().applyValue({ args0 -> args0 })

    /**
     * The status of the web portal.
     */
    public val portalStatus: Output
        get() = javaResource.portalStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                portalStatusToKotlin(args0)
            })
        })

    /**
     * The renderer that is used in streaming sessions.
     */
    public val rendererType: Output
        get() = javaResource.rendererType().applyValue({ args0 ->
            args0.let({ args0 ->
                portalRendererTypeToKotlin(args0)
            })
        })

    /**
     * The SAML metadata of the service provider.
     */
    public val serviceProviderSamlMetadata: Output
        get() = javaResource.serviceProviderSamlMetadata().applyValue({ args0 -> args0 })

    /**
     * A message that explains why the web portal is in its current status.
     */
    public val statusReason: Output
        get() = javaResource.statusReason().applyValue({ args0 -> args0 })

    /**
     * The tags to add to the web portal. A tag is a key-value pair.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The ARN of the trust store that is associated with the web portal.
     */
    public val trustStoreArn: Output?
        get() = javaResource.trustStoreArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ARN of the user access logging settings that is associated with the web portal.
     */
    public val userAccessLoggingSettingsArn: Output?
        get() = javaResource.userAccessLoggingSettingsArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ARN of the user settings that is associated with the web portal.
     */
    public val userSettingsArn: Output?
        get() = javaResource.userSettingsArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

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

    override fun map(javaResource: Resource): Portal = Portal(
        javaResource as
            com.pulumi.awsnative.workspacesweb.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