Ejemplo n.º 1
0
// getIdFromArn gets the aws String value of the input arn and returns the id part of the arn
func getIdFromArn(arn *string) string {
	return composeutils.GetIdFromArn(aws.StringValue(arn))
}
Ejemplo n.º 2
0
// Name returns the task's UUID with the container
// ECS doesn't have a describe container API so providing the task's UUID in the name enables users
// to easily look up this container in the ecs world by invoking DescribeTask
func (c *Container) Name() string {
	taskId := utils.GetIdFromArn(aws.StringValue(c.task.TaskArn))
	return utils.GetFormattedContainerName(taskId, aws.StringValue(c.ecsContainer.Name))
}
Ejemplo n.º 3
0
// TaskDefinition returns the ECS task definition id which encompasses the container definition, with
// which this container was created
func (c *Container) TaskDefinition() string {
	return utils.GetIdFromArn(aws.StringValue(c.task.TaskDefinitionArn))
}
Ejemplo n.º 4
0
// Id returns the ECS container's UUID
func (c *Container) Id() string {
	return utils.GetIdFromArn(aws.StringValue(c.ecsContainer.ContainerArn))
}