ServiceRegistryProperty Struct
The details for the service registry.
Each service may be associated with one service registry. Multiple service registries for each service are not supported.
When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to the updated service registry configuration.
| Source | |
|---|---|
| Type last changed |
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';
const serviceRegistryProperty: ecs.CfnTaskSet.ServiceRegistryProperty = {
containerName: 'containerName',
containerPort: 123,
port: 123,
registryArn: 'registryArn',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
service_registry_property = ecs.CfnTaskSet.ServiceRegistryProperty(
container_name="containerName",
container_port=123,
port=123,
registry_arn="registryArn"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
ServiceRegistryProperty serviceRegistryProperty = ServiceRegistryProperty.builder()
.containerName("containerName")
.containerPort(123)
.port(123)
.registryArn("registryArn")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var serviceRegistryProperty = new ServiceRegistryProperty {
ContainerName = "containerName",
ContainerPort = 123,
Port = 123,
RegistryArn = "registryArn"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
serviceRegistryProperty := &ServiceRegistryProperty{
ContainerName: jsii.String("containerName"),
ContainerPort: jsii.Number(123),
Port: jsii.Number(123),
RegistryArn: jsii.String("registryArn"),
}
Properties
containerNameoptionalstringcontainer_nameoptionalstrcontainerNameoptionalStringContainerNameoptionalstringContainerNameoptional*string #notes
It's already specified in the task definition. If the task definition that your service task specifies uses the bridge or host network mode, you must specify a containerName and containerPort combination from the task definition. If the task definition that your service task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must specify either a containerName and containerPort combination or a port value. However, you can't specify both.
containerPortoptionalnumbercontainer_portoptionalint | floatcontainerPortoptionalNumberContainerPortoptionaldoubleContainerPortoptional*float64 #notes
It's already specified in the task definition. If the task definition your service task specifies uses the bridge or host network mode, you must specify a containerName and containerPort combination from the task definition. If the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must specify either a containerName and containerPort combination or a port value. However, you can't specify both.
This field might be used if both the awsvpc network mode and SRV records are used.
registryArnoptionalstringregistry_arnoptionalstrregistryArnoptionalStringRegistryArnoptionalstringRegistryArnoptional*string #The currently supported service registry is AWS Cloud Map . For more information, see CreateService .