Class CfnSecurityConfiguration
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 .
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EMR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSecurityConfiguration : CfnResource, IInspectable
Syntax (vb)
Public Class CfnSecurityConfiguration
Inherits CfnResource
Implements IInspectable
Remarks
CloudformationResource: AWS::EMR::SecurityConfiguration
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.EMR;
var cfnSecurityConfiguration = new CfnSecurityConfiguration(this, "EmrSecurityConfiguration", new CfnSecurityConfigurationProps {
Name = "AddStepRuntimeRoleSecConfig",
SecurityConfiguration = JSON.Parse(@"
{
""AuthorizationConfiguration"": {
""IAMConfiguration"": {
""EnableApplicationScopedIAMRole"": true,
""ApplicationScopedIAMRoleConfiguration"":
{
""PropagateSourceIdentity"": true
}
},
""LakeFormationConfiguration"": {
""AuthorizedSessionTagValue"": ""Amazon EMR""
}
}
}")
});
var task = new EmrCreateCluster(this, "Create Cluster", new EmrCreateClusterProps {
Instances = new InstancesConfigProperty { },
Name = TaskInput.FromJsonPathAt("$.ClusterName").Value,
SecurityConfiguration = cfnSecurityConfiguration.Name
});
var executionRole = new Role(this, "Role", new RoleProps {
AssumedBy = new ArnPrincipal(task.ClusterRole.RoleArn)
});
executionRole.AssumeRolePolicy.AddStatements(
new PolicyStatement(new PolicyStatementProps {
Effect = Effect.ALLOW,
Principals = new [] { task.ClusterRole },
Actions = new [] { "sts:SetSourceIdentity" }
}),
new PolicyStatement(new PolicyStatementProps {
Effect = Effect.ALLOW,
Principals = new [] { task.ClusterRole },
Actions = new [] { "sts:TagSession" },
Conditions = new Dictionary<string, object> {
{ "StringEquals", new Dictionary<string, string> {
{ "aws:RequestTag/LakeFormationAuthorizedCaller", "Amazon EMR" }
} }
}
}));
new EmrAddStep(this, "Task", new EmrAddStepProps {
ClusterId = "ClusterId",
ExecutionRoleArn = executionRole.RoleArn,
Name = "StepName",
Jar = "Jar",
ActionOnFailure = ActionOnFailure.CONTINUE
});
Synopsis
Constructors
CfnSecurityConfiguration(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnSecurityConfiguration(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnSecurityConfiguration(Construct, String, ICfnSecurityConfigurationProps) |
Properties
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Name | The name of the security configuration. |
SecurityConfiguration | The security configuration details in JSON format. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnSecurityConfiguration(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnSecurityConfiguration(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnSecurityConfiguration(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnSecurityConfiguration(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnSecurityConfiguration(Construct, String, ICfnSecurityConfigurationProps)
public CfnSecurityConfiguration(Construct scope, string id, ICfnSecurityConfigurationProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnSecurityConfigurationProps
Resource properties.
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Name
The name of the security configuration.
public virtual string Name { get; set; }
Property Value
System.String
SecurityConfiguration
The security configuration details in JSON format.
public virtual object SecurityConfiguration { get; set; }
Property Value
System.Object
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>