class ServiceConnect
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.ServiceConnect |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#ServiceConnect |
![]() | software.amazon.awscdk.services.ecs.ServiceConnect |
![]() | aws_cdk.aws_ecs.ServiceConnect |
![]() | aws-cdk-lib » aws_ecs » ServiceConnect |
ServiceConnect ValueObjectClass having by ContainerDefinition.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
declare const appProtocol: ecs.AppProtocol;
const serviceConnect = new ecs.ServiceConnect(ecs.NetworkMode.NONE, {
containerPort: 123,
// the properties below are optional
appProtocol: appProtocol,
containerPortRange: 'containerPortRange',
hostPort: 123,
name: 'name',
protocol: ecs.Protocol.TCP,
});
Initializer
new ServiceConnect(networkmode: NetworkMode, pm: PortMapping)
Parameters
- networkmode
Network
Mode - pm
Port
Mapping
Properties
Name | Type | Description |
---|---|---|
networkmode | Network | The networking mode to use for the containers in the task. |
portmapping | Port | Port mappings allow containers to access ports on the host container instance to send or receive traffic. |
networkmode
Type:
Network
The networking mode to use for the containers in the task.
portmapping
Type:
Port
Port mappings allow containers to access ports on the host container instance to send or receive traffic.
Methods
Name | Description |
---|---|
is | Judge parameters can be serviceconnect logick. |
validate() | Judge serviceconnect parametes are valid. |
isServiceConnect()
public isServiceConnect(): boolean
Returns
boolean
Judge parameters can be serviceconnect logick.
If parameters can be serviceConnect return true.
validate()
public validate(): void
Judge serviceconnect parametes are valid.
If invalid, throw Error.