Skip to content
v2.274.0

HostEntryProperty Struct ​

The HostEntry property specifies a hostname and an IP address that are added to the /etc/hosts file of a container through the extraHosts parameter of its ContainerDefinition resource.

Example ​

ts
// 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';
const hostEntryProperty: ecs.CfnTaskDefinition.HostEntryProperty = {
  hostname: 'hostname',
  ipAddress: 'ipAddress',
};

Properties ​

hostnameoptionalstringhostnameoptionalstrhostnameoptionalStringHostnameoptionalstringHostnameoptional*string#
The hostname to use in the `/etc/hosts` entry.
ipAddressoptionalstringip_addressoptionalstripAddressoptionalStringIpAddressoptionalstringIpAddressoptional*string#
The IP address to use in the `/etc/hosts` entry.