com.pulumi.aws.emr.kotlin.Studio.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.emr.kotlin
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* 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.aws.emr.Studio(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Studio(builtJavaResource)
}
}
/**
* Provides an Elastic MapReduce Studio.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.emr.Studio("example", {
* authMode: "SSO",
* defaultS3Location: `s3://${test.bucket}/test`,
* engineSecurityGroupId: testAwsSecurityGroup.id,
* name: "example",
* serviceRole: testAwsIamRole.arn,
* subnetIds: [testAwsSubnet.id],
* userRole: testAwsIamRole.arn,
* vpcId: testAwsVpc.id,
* workspaceSecurityGroupId: testAwsSecurityGroup.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.emr.Studio("example",
* auth_mode="SSO",
* default_s3_location=f"s3://{test['bucket']}/test",
* engine_security_group_id=test_aws_security_group["id"],
* name="example",
* service_role=test_aws_iam_role["arn"],
* subnet_ids=[test_aws_subnet["id"]],
* user_role=test_aws_iam_role["arn"],
* vpc_id=test_aws_vpc["id"],
* workspace_security_group_id=test_aws_security_group["id"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Emr.Studio("example", new()
* {
* AuthMode = "SSO",
* DefaultS3Location = $"s3://{test.Bucket}/test",
* EngineSecurityGroupId = testAwsSecurityGroup.Id,
* Name = "example",
* ServiceRole = testAwsIamRole.Arn,
* SubnetIds = new[]
* {
* testAwsSubnet.Id,
* },
* UserRole = testAwsIamRole.Arn,
* VpcId = testAwsVpc.Id,
* WorkspaceSecurityGroupId = testAwsSecurityGroup.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := emr.NewStudio(ctx, "example", &emr.StudioArgs{
* AuthMode: pulumi.String("SSO"),
* DefaultS3Location: pulumi.Sprintf("s3://%v/test", test.Bucket),
* EngineSecurityGroupId: pulumi.Any(testAwsSecurityGroup.Id),
* Name: pulumi.String("example"),
* ServiceRole: pulumi.Any(testAwsIamRole.Arn),
* SubnetIds: pulumi.StringArray{
* testAwsSubnet.Id,
* },
* UserRole: pulumi.Any(testAwsIamRole.Arn),
* VpcId: pulumi.Any(testAwsVpc.Id),
* WorkspaceSecurityGroupId: pulumi.Any(testAwsSecurityGroup.Id),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Studio;
* import com.pulumi.aws.emr.StudioArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Studio("example", StudioArgs.builder()
* .authMode("SSO")
* .defaultS3Location(String.format("s3://%s/test", test.bucket()))
* .engineSecurityGroupId(testAwsSecurityGroup.id())
* .name("example")
* .serviceRole(testAwsIamRole.arn())
* .subnetIds(testAwsSubnet.id())
* .userRole(testAwsIamRole.arn())
* .vpcId(testAwsVpc.id())
* .workspaceSecurityGroupId(testAwsSecurityGroup.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:emr:Studio
* properties:
* authMode: SSO
* defaultS3Location: s3://${test.bucket}/test
* engineSecurityGroupId: ${testAwsSecurityGroup.id}
* name: example
* serviceRole: ${testAwsIamRole.arn}
* subnetIds:
* - ${testAwsSubnet.id}
* userRole: ${testAwsIamRole.arn}
* vpcId: ${testAwsVpc.id}
* workspaceSecurityGroupId: ${testAwsSecurityGroup.id}
* ```
*
* ## Import
* Using `pulumi import`, import EMR studios using the `id`. For example:
* ```sh
* $ pulumi import aws:emr/studio:Studio studio es-123456ABCDEF
* ```
*/
public class Studio internal constructor(
override val javaResource: com.pulumi.aws.emr.Studio,
) : KotlinCustomResource(javaResource, StudioMapper) {
/**
* ARN of the studio.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies whether the Studio authenticates users using IAM or Amazon Web Services SSO. Valid values are `SSO` or `IAM`.
*/
public val authMode: Output
get() = javaResource.authMode().applyValue({ args0 -> args0 })
/**
* The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.
*/
public val defaultS3Location: Output
get() = javaResource.defaultS3Location().applyValue({ args0 -> args0 })
/**
* A detailed description of the Amazon EMR Studio.
*/
public val description: Output?
get() = javaResource.description().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 `vpc_id`.
*/
public val engineSecurityGroupId: Output
get() = javaResource.engineSecurityGroupId().applyValue({ args0 -> args0 })
/**
* The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.
*/
public val idpAuthUrl: Output?
get() = javaResource.idpAuthUrl().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name that your identity provider (IdP) uses for its RelayState parameter. For example, RelayState or TargetSource. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The RelayState parameter differs by IdP.
*/
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 the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.
*/
public val serviceRole: Output
get() = javaResource.serviceRole().applyValue({ args0 -> args0 })
/**
* A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by `vpc_id`. 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 }) })
/**
* list of tags to apply to the EMR Cluster. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy