com.pulumi.awsnative.emr.kotlin.Studio.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.emr.kotlin
import com.pulumi.awsnative.emr.kotlin.enums.StudioAuthMode
import com.pulumi.awsnative.emr.kotlin.enums.StudioIdcUserAssignment
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.emr.kotlin.enums.StudioAuthMode.Companion.toKotlin as studioAuthModeToKotlin
import com.pulumi.awsnative.emr.kotlin.enums.StudioIdcUserAssignment.Companion.toKotlin as studioIdcUserAssignmentToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Studio].
*/
@PulumiTagMarker
public class StudioResourceBuilder internal constructor() {
public var name: String? = null
public var args: StudioArgs = StudioArgs()
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 StudioArgsBuilder.() -> Unit) {
val builder = StudioArgsBuilder()
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(): Studio {
val builtJavaResource = com.pulumi.awsnative.emr.Studio(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Studio(builtJavaResource)
}
}
/**
* Resource schema for AWS::EMR::Studio
*/
public class Studio internal constructor(
override val javaResource: com.pulumi.awsnative.emr.Studio,
) : KotlinCustomResource(javaResource, StudioMapper) {
/**
* The Amazon Resource Name (ARN) of the EMR Studio.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies whether the Studio authenticates users using single sign-on (SSO) or IAM. Amazon EMR Studio currently only supports SSO authentication.
*/
public val authMode: Output
get() = javaResource.authMode().applyValue({ args0 ->
args0.let({ args0 ->
studioAuthModeToKotlin(args0)
})
})
/**
* The default Amazon S3 location to back up EMR Studio Workspaces and notebook files. A Studio user can select an alternative Amazon S3 location when creating a Workspace.
*/
public val defaultS3Location: Output
get() = javaResource.defaultS3Location().applyValue({ args0 -> args0 })
/**
* A detailed description of the Studio.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The AWS KMS key identifier (ARN) used to encrypt AWS EMR Studio workspace and notebook files when backed up to AWS S3.
*/
public val encryptionKeyArn: Output?
get() = javaResource.encryptionKeyArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by VpcId.
*/
public val engineSecurityGroupId: Output
get() = javaResource.engineSecurityGroupId().applyValue({ args0 -> args0 })
/**
* The ARN of the IAM Identity Center instance to create the Studio application.
*/
public val idcInstanceArn: Output?
get() = javaResource.idcInstanceArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies whether IAM Identity Center user assignment is REQUIRED or OPTIONAL. If the value is set to REQUIRED, users must be explicitly assigned to the Studio application to access the Studio.
*/
public val idcUserAssignment: Output?
get() = javaResource.idcUserAssignment().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> studioIdcUserAssignmentToKotlin(args0) })
}).orElse(null)
})
/**
* Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this endpoint for authentication when logging in to a Studio with the Studio URL.
*/
public val idpAuthUrl: Output?
get() = javaResource.idpAuthUrl().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of relay state parameter for external Identity Provider.
*/
public val idpRelayStateParameterName: Output?
get() = javaResource.idpRelayStateParameterName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A descriptive name for the Amazon EMR Studio.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The IAM role that will be assumed by the Amazon EMR Studio. The service role provides a way for Amazon EMR Studio to interoperate with other AWS services.
*/
public val serviceRole: Output
get() = javaResource.serviceRole().applyValue({ args0 -> args0 })
/**
* The ID of the EMR Studio.
*/
public val studioId: Output
get() = javaResource.studioId().applyValue({ args0 -> args0 })
/**
* A list of up to 5 subnet IDs to associate with the Studio. The subnets must belong to the VPC specified by VpcId. Studio users can create a Workspace in any of the specified subnets.
*/
public val subnetIds: Output>
get() = javaResource.subnetIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* A list of tags to associate with the Studio. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is false.
*/
public val trustedIdentityPropagationEnabled: Output?
get() = javaResource.trustedIdentityPropagationEnabled().applyValue({ args0 ->
args0.map({ args0 -> args0 }).orElse(null)
})
/**
* The unique Studio access URL.
*/
public val url: Output
get() = javaResource.url().applyValue({ args0 -> args0 })
/**
* The IAM user role that will be assumed by users and groups logged in to a Studio. The permissions attached to this IAM role can be scoped down for each user or group using session policies.
*/
public val userRole: Output?
get() = javaResource.userRole().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.
*/
public val vpcId: Output
get() = javaResource.vpcId().applyValue({ args0 -> args0 })
/**
* The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by VpcId.
*/
public val workspaceSecurityGroupId: Output
get() = javaResource.workspaceSecurityGroupId().applyValue({ args0 -> args0 })
}
public object StudioMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.emr.Studio::class == javaResource::class
override fun map(javaResource: Resource): Studio = Studio(
javaResource as
com.pulumi.awsnative.emr.Studio,
)
}
/**
* @see [Studio].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Studio].
*/
public suspend fun studio(name: String, block: suspend StudioResourceBuilder.() -> Unit): Studio {
val builder = StudioResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Studio].
* @param name The _unique_ name of the resulting resource.
*/
public fun studio(name: String): Studio {
val builder = StudioResourceBuilder()
builder.name(name)
return builder.build()
}