Class PortMap
PortMap ValueObjectClass having by ContainerDefinition.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PortMap : DeputyBase
Syntax (vb)
Public Class PortMap
Inherits DeputyBase
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;
AppProtocol appProtocol;
var portMap = new PortMap(NetworkMode.NONE, new PortMapping {
ContainerPort = 123,
// the properties below are optional
AppProtocol = appProtocol,
ContainerPortRange = "containerPortRange",
HostPort = 123,
Name = "name",
Protocol = Protocol.TCP
});
Synopsis
Constructors
PortMap(NetworkMode, IPortMapping) | |
PortMap(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
PortMap(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Networkmode | The networking mode to use for the containers in the task. |
Portmapping | Port mappings allow containers to access ports on the host container instance to send or receive traffic. |
Methods
Validate() | validate invalid portmapping and networkmode parameters. |
Constructors
PortMap(NetworkMode, IPortMapping)
public PortMap(NetworkMode networkmode, IPortMapping pm)
Parameters
- networkmode NetworkMode
- pm IPortMapping
PortMap(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected PortMap(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
PortMap(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected PortMap(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Networkmode
The networking mode to use for the containers in the task.
public virtual NetworkMode Networkmode { get; }
Property Value
Portmapping
Port mappings allow containers to access ports on the host container instance to send or receive traffic.
public virtual IPortMapping Portmapping { get; }
Property Value
Methods
Validate()
validate invalid portmapping and networkmode parameters.
public virtual void Validate()
Remarks
throw Error when invalid parameters.