Class CfnSecurityConfiguration
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.emr.CfnSecurityConfiguration
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:24:58.532Z")
@Stability(Stable)
public class CfnSecurityConfiguration
extends CfnResource
implements IInspectable
Use a
SecurityConfiguration
resource to configure data encryption, Kerberos authentication (available in Amazon EMR release version 5.10.0 and later), and Amazon S3 authorization for EMRFS (available in EMR 5.10.0 and later). You can re-use a security configuration for any number of clusters in your account. For more information and example security configuration JSON objects, see Create a Security Configuration in the Amazon EMR Management Guide .
Example:
import software.amazon.awscdk.services.emr.*; CfnSecurityConfiguration cfnSecurityConfiguration = CfnSecurityConfiguration.Builder.create(this, "EmrSecurityConfiguration") .name("AddStepRuntimeRoleSecConfig") .securityConfiguration(JSON.parse("\n {\n \"AuthorizationConfiguration\": {\n \"IAMConfiguration\": {\n \"EnableApplicationScopedIAMRole\": true,\n \"ApplicationScopedIAMRoleConfiguration\":\n {\n \"PropagateSourceIdentity\": true\n }\n },\n \"LakeFormationConfiguration\": {\n \"AuthorizedSessionTagValue\": \"Amazon EMR\"\n }\n }\n }")) .build(); EmrCreateCluster task = EmrCreateCluster.Builder.create(this, "Create Cluster") .instances(InstancesConfigProperty.builder().build()) .name(TaskInput.fromJsonPathAt("$.ClusterName").getValue()) .securityConfiguration(cfnSecurityConfiguration.getName()) .build(); Role executionRole = Role.Builder.create(this, "Role") .assumedBy(new ArnPrincipal(task.getClusterRole().getRoleArn())) .build(); executionRole.assumeRolePolicy.addStatements( PolicyStatement.Builder.create() .effect(Effect.ALLOW) .principals(List.of(task.getClusterRole())) .actions(List.of("sts:SetSourceIdentity")) .build(), PolicyStatement.Builder.create() .effect(Effect.ALLOW) .principals(List.of(task.getClusterRole())) .actions(List.of("sts:TagSession")) .conditions(Map.of( "StringEquals", Map.of( "aws:RequestTag/LakeFormationAuthorizedCaller", "Amazon EMR"))) .build()); EmrAddStep.Builder.create(this, "Task") .clusterId("ClusterId") .executionRoleArn(executionRole.getRoleArn()) .name("StepName") .jar("Jar") .actionOnFailure(ActionOnFailure.CONTINUE) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnSecurityConfiguration
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnSecurityConfiguration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnSecurityConfiguration
(software.amazon.jsii.JsiiObjectRef objRef) CfnSecurityConfiguration
(software.constructs.Construct scope, String id, CfnSecurityConfigurationProps props) -
Method Summary
Modifier and TypeMethodDescriptiongetName()
The name of the security configuration.The security configuration details in JSON format.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The name of the security configuration.void
setSecurityConfiguration
(Object value) The security configuration details in JSON format.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnSecurityConfiguration
protected CfnSecurityConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
CfnSecurityConfiguration
protected CfnSecurityConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnSecurityConfiguration
@Stability(Stable) public CfnSecurityConfiguration(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSecurityConfigurationProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getSecurityConfiguration
The security configuration details in JSON format. -
setSecurityConfiguration
The security configuration details in JSON format. -
getName
The name of the security configuration. -
setName
The name of the security configuration.
-