Interface IExternalTaskDefinitionProps
The properties for a task definition run on an External cluster.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IExternalTaskDefinitionProps : ICommonTaskDefinitionProps
Syntax (vb)
Public Interface IExternalTaskDefinitionProps
Inherits ICommonTaskDefinitionProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.IAM;
ProxyConfiguration proxyConfiguration;
Role role;
var externalTaskDefinitionProps = new ExternalTaskDefinitionProps {
ExecutionRole = role,
Family = "family",
NetworkMode = NetworkMode.NONE,
ProxyConfiguration = proxyConfiguration,
TaskRole = role,
Volumes = new [] { new Volume {
Name = "name",
// the properties below are optional
ConfiguredAtLaunch = false,
DockerVolumeConfiguration = new DockerVolumeConfiguration {
Driver = "driver",
Scope = Scope.TASK,
// the properties below are optional
Autoprovision = false,
DriverOpts = new Dictionary<string, string> {
{ "driverOptsKey", "driverOpts" }
},
Labels = new Dictionary<string, string> {
{ "labelsKey", "labels" }
}
},
EfsVolumeConfiguration = new EfsVolumeConfiguration {
FileSystemId = "fileSystemId",
// the properties below are optional
AuthorizationConfig = new AuthorizationConfig {
AccessPointId = "accessPointId",
Iam = "iam"
},
RootDirectory = "rootDirectory",
TransitEncryption = "transitEncryption",
TransitEncryptionPort = 123
},
Host = new Host {
SourcePath = "sourcePath"
}
} }
};
Synopsis
Properties
NetworkMode | The networking mode to use for the containers in the task. |
Properties
NetworkMode
The networking mode to use for the containers in the task.
virtual Nullable<NetworkMode> NetworkMode { get; }
Property Value
System.Nullable<NetworkMode>
Remarks
With ECS Anywhere, supported modes are bridge, host and none.
Default: NetworkMode.BRIDGE