Protocol
- class aws_cdk.aws_ecs.Protocol(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Network protocol.
- ExampleMetadata:
infused
Example:
# task_definition: ecs.TaskDefinition # cluster: ecs.Cluster # Add a container to the task definition specific_container = task_definition.add_container("Container", image=ecs.ContainerImage.from_registry("/aws/aws-example-app"), memory_limit_mi_b=2048 ) # Add a port mapping specific_container.add_port_mappings( container_port=7600, protocol=ecs.Protocol.TCP ) ecs.Ec2Service(self, "Service", cluster=cluster, task_definition=task_definition, cloud_map_options=ecs.CloudMapOptions( # Create SRV records - useful for bridge networking dns_record_type=cloudmap.DnsRecordType.SRV, # Targets port TCP port 7600 `specificContainer` container=specific_container, container_port=7600 ) )
Attributes
- TCP
TCP.
- UDP
UDP.