io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrStudioServiceRole Maven / Gradle / Ivy
Show all versions of cdk-emrserverless-quickdemo-with-delta-lake Show documentation
package io.github.hsiehshujeng.cdk.emrserverless.quickdemo;
/**
* Creates a default service role for an EMR Studio.
*
* For detail, please refer to Create an EMR Studio service role.
*
*
* const workSpaceBucket = new WorkSpaceBucket(this, 'WorkSpace');
* const emrStudioServiceRole = new EmrStudioServiceRole(this, 'Service', {
* workSpaceBucket: workSpaceBucket
* });
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-12-02T01:11:38.405Z")
@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.EmrStudioServiceRole")
public class EmrStudioServiceRole extends software.constructs.Construct {
protected EmrStudioServiceRole(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected EmrStudioServiceRole(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 EmrStudioServiceRole(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.EmrStudioServiceRoleProps 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 default service role for EMR Studio.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.Role getRoleEntity() {
return software.amazon.jsii.Kernel.get(this, "roleEntity", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.Role.class));
}
/**
* A fluent builder for {@link io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrStudioServiceRole}.
*/
@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.EmrStudioServiceRoleProps.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.EmrStudioServiceRoleProps.Builder();
}
/**
* The custom construct as the workspace S3 bucket.
*
* @return {@code this}
* @param workSpaceBucket The custom construct as the workspace S3 bucket. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder workSpaceBucket(final io.github.hsiehshujeng.cdk.emrserverless.quickdemo.WorkSpaceBucket workSpaceBucket) {
this.props.workSpaceBucket(workSpaceBucket);
return this;
}
/**
* A name for the service role of an EMR Studio.
*
* For valid values, see the RoleName parameter for the CreateRole action in the IAM API Reference.
*
* IMPORTANT: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
*
* If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates.
*
* Default: - 'emr-studio-service-role'
*
* @return {@code this}
* @param roleName A name for the service role of an EMR Studio. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder roleName(final java.lang.String roleName) {
this.props.roleName(roleName);
return this;
}
/**
* @return a newly built instance of {@link io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrStudioServiceRole}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrStudioServiceRole build() {
return new io.github.hsiehshujeng.cdk.emrserverless.quickdemo.EmrStudioServiceRole(
this.scope,
this.name,
this.props.build()
);
}
}
}