io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerless Maven / Gradle / Ivy
package io.github.hsiehshujeng.cdk.emrserverless.quickdemo;
/**
* Creates an EMR Studio, an EMR cluster template for the studio, and an EMR Serverless application.
*
*
* // the quickiest deployment
* new EmrServerless(this, 'EmrServerless');
* // custom deployment references
* new EmrServerless(this, 'EmrServerless', {
* vpcId: 'vpc-idididid',
* });
* new EmrServerless(this, 'EmrServerless', {
* vpcId: 'vpc-idididid',
* subnetIds: ['subnet-eeeee', 'subnet-fffff']
* });
* const myRole = new iam.Role.fromRoleName('MyRole');
* new EmrServerless(this, 'EmrServerless', {
* serviceCatalogProps: {
* role: myRole
* }
* });
* const myUser = new iam.Role.fromUserName('MyUser');
* new EmrServerless(this, 'EmrServerless', {
* vpcId: 'vpc-idididid',
* subnetIds: ['subnet-eeeee', 'subnet-fffff'],
* serviceCatalogProps: {
* user: myUser
* }
* });
* const myGroup = new iam.Group.fromGroupName('MyGroup');
* new EmrServerless(this, 'EmrServerless', {
* serviceCatalogProps: {
* group: myGroup
* }
* });
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-01T01:08:41.091Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.hsiehshujeng.cdk.emrserverless.quickdemo.$Module.class, fqn = "cdk-emrserverless-with-delta-lake.EmrServerless")
public class EmrServerless extends software.constructs.Construct {
protected EmrServerless(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EmrServerless(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param name This parameter is required.
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public EmrServerless(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.Nullable io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerlessProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(name, "name is required"), props });
}
/**
* @param scope This parameter is required.
* @param name This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public EmrServerless(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(name, "name is required") });
}
/**
* A fluent builder for {@link io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerless}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param name This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String name) {
return new Builder(scope, name);
}
private final software.constructs.Construct scope;
private final java.lang.String name;
private io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerlessProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String name) {
this.scope = scope;
this.name = name;
}
/**
* Options for which kind of identity will be associated with the Product of the Porfolio in AWS Service Catalog for EMR cluster templates.
*
* You can choose either an IAM group, IAM role, or IAM user. If you leave it empty, an IAM user named Administrator
with the AdministratorAccess
power needs to be created first.
*
* @return {@code this}
* @param serviceCatalogProps Options for which kind of identity will be associated with the Product of the Porfolio in AWS Service Catalog for EMR cluster templates. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder serviceCatalogProps(final io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrStudioDeveloperStackProps serviceCatalogProps) {
this.props().serviceCatalogProps(serviceCatalogProps);
return this;
}
/**
* The subnet IDs for the EMR studio.
*
* You can select the subnets from the default VPC in your AWS account.
*
* @return {@code this}
* @param subnetIds The subnet IDs for the EMR studio. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder subnetIds(final java.util.List subnetIds) {
this.props().subnetIds(subnetIds);
return this;
}
/**
* Used by the EMR Studio.
*
* Default: - 'The default VPC will be used.'
*
* @return {@code this}
* @param vpcId Used by the EMR Studio. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcId(final java.lang.String vpcId) {
this.props().vpcId(vpcId);
return this;
}
/**
* @return a newly built instance of {@link io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerless}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerless build() {
return new io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerless(
this.scope,
this.name,
this.props != null ? this.props.build() : null
);
}
private io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerlessProps.Builder props() {
if (this.props == null) {
this.props = new io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrServerlessProps.Builder();
}
return this.props;
}
}
}