Class ExecuteCommandConfiguration
The details of the execute command configuration.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class ExecuteCommandConfiguration : Object, IExecuteCommandConfiguration
Syntax (vb)
Public Class ExecuteCommandConfiguration
Inherits Object
Implements IExecuteCommandConfiguration
Remarks
For more information, see [ExecuteCommandConfiguration] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html
ExampleMetadata: infused
Examples
Vpc vpc;
var kmsKey = new Key(this, "KmsKey");
// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
var logGroup = new LogGroup(this, "LogGroup", new LogGroupProps {
EncryptionKey = kmsKey
});
// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
var execBucket = new Bucket(this, "EcsExecBucket", new BucketProps {
EncryptionKey = kmsKey
});
var cluster = new Cluster(this, "Cluster", new ClusterProps {
Vpc = vpc,
ExecuteCommandConfiguration = new ExecuteCommandConfiguration {
KmsKey = kmsKey,
LogConfiguration = new ExecuteCommandLogConfiguration {
CloudWatchLogGroup = logGroup,
CloudWatchEncryptionEnabled = true,
S3Bucket = execBucket,
S3EncryptionEnabled = true,
S3KeyPrefix = "exec-command-output"
},
Logging = ExecuteCommandLogging.OVERRIDE
}
});
Synopsis
Constructors
ExecuteCommandConfiguration() |
Properties
KmsKey | The AWS Key Management Service key ID to encrypt the data between the local client and the container. |
LogConfiguration | The log configuration for the results of the execute command actions. |
Logging | The log settings to use for logging the execute command session. |
Constructors
ExecuteCommandConfiguration()
public ExecuteCommandConfiguration()
Properties
KmsKey
The AWS Key Management Service key ID to encrypt the data between the local client and the container.
public IKey KmsKey { get; set; }
Property Value
Remarks
Default: - none
LogConfiguration
The log configuration for the results of the execute command actions.
public IExecuteCommandLogConfiguration LogConfiguration { get; set; }
Property Value
IExecuteCommandLogConfiguration
Remarks
The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.
Default: - none
Logging
The log settings to use for logging the execute command session.
public Nullable<ExecuteCommandLogging> Logging { get; set; }
Property Value
System.Nullable<ExecuteCommandLogging>
Remarks
Default: - none