io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRole Maven / Gradle / Ivy
Show all versions of cdk-emrserverless-quickdemo-with-delta-lake Show documentation
package io.github.hsiehshujeng.cdk.emrserverless.quickdemo;
/**
* Creates an execution job role for EMR Serverless.
*
* For detail, please refer to Create a job runtime role.
*
*
* const emrServerlessBucket = new EmrServerlessBucket(this, 'EmrServerlessStorage');
* const emrServerlessJobRole = new ServerlessJobRole(this, 'EmrServerlessJob', {emrServerlessBucket: emrServerlessBucket});
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-01T01:08:41.108Z")
@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.ServerlessJobRole")
public class ServerlessJobRole extends software.constructs.Construct {
protected ServerlessJobRole(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ServerlessJobRole(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param name This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public ServerlessJobRole(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRoleProps 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"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* The representative of the execution role for EMR Serverless.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.Role getEntity() {
return software.amazon.jsii.Kernel.get(this, "entity", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Role.class));
}
/**
* A fluent builder for {@link io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRole}.
*/
@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 final io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRoleProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String name) {
this.scope = scope;
this.name = name;
this.props = new io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRoleProps.Builder();
}
/**
* The EMR Serverless bucket.
*
* @return {@code this}
* @param emrServerlessBucket The EMR Serverless bucket. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder emrServerlessBucket(final software.amazon.awscdk.services.s3.Bucket emrServerlessBucket) {
this.props.emrServerlessBucket(emrServerlessBucket);
return this;
}
/**
* @return a newly built instance of {@link io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRole}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRole build() {
return new io.github.hsiehshujeng.cdk.emrserverless.quickdemo.ServerlessJobRole(
this.scope,
this.name,
this.props.build()
);
}
}
}