GetContainerDefinition
The ECS container definition data source allows access to details of a specific container within an AWS ECS service.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var ecs_mongo = Output.Create(Aws.Ecs.GetContainerDefinition.InvokeAsync(new Aws.Ecs.GetContainerDefinitionArgs
{
ContainerName = "mongodb",
TaskDefinition = aws_ecs_task_definition.Mongo.Id,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.GetContainerDefinition(ctx, &ecs.GetContainerDefinitionArgs{
ContainerName: "mongodb",
TaskDefinition: aws_ecs_task_definition.Mongo.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
ecs_mongo = aws.ecs.get_container_definition(container_name="mongodb",
task_definition=aws_ecs_task_definition["mongo"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ecs_mongo = aws_ecs_task_definition_mongo.id.apply(id => aws.ecs.getContainerDefinition({
containerName: "mongodb",
taskDefinition: id,
}, { async: true }));Using GetContainerDefinition
function getContainerDefinition(args: GetContainerDefinitionArgs, opts?: InvokeOptions): Promise<GetContainerDefinitionResult>function get_container_definition(container_name=None, task_definition=None, opts=None)func GetContainerDefinition(ctx *Context, args *GetContainerDefinitionArgs, opts ...InvokeOption) (*GetContainerDefinitionResult, error)public static class GetContainerDefinition {
public static Task<GetContainerDefinitionResult> InvokeAsync(GetContainerDefinitionArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Container
Name string The name of the container definition
- Task
Definition string The ARN of the task definition which contains the container
- Container
Name string The name of the container definition
- Task
Definition string The ARN of the task definition which contains the container
- container
Name string The name of the container definition
- task
Definition string The ARN of the task definition which contains the container
- container_
name str The name of the container definition
- task_
definition str The ARN of the task definition which contains the container
GetContainerDefinition Result
The following output properties are available:
- Container
Name string - Cpu int
The CPU limit for this container definition
- Disable
Networking bool Indicator if networking is disabled
- Docker
Labels Dictionary<string, string> Set docker labels
- Environment Dictionary<string, string>
The environment in use
- Id string
The provider-assigned unique ID for this managed resource.
- Image string
The docker image in use, including the digest
- Image
Digest string The digest of the docker image in use
- Memory int
The memory limit for this container definition
- Memory
Reservation int The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit
- Task
Definition string
- Container
Name string - Cpu int
The CPU limit for this container definition
- Disable
Networking bool Indicator if networking is disabled
- Docker
Labels map[string]string Set docker labels
- Environment map[string]string
The environment in use
- Id string
The provider-assigned unique ID for this managed resource.
- Image string
The docker image in use, including the digest
- Image
Digest string The digest of the docker image in use
- Memory int
The memory limit for this container definition
- Memory
Reservation int The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit
- Task
Definition string
- container
Name string - cpu number
The CPU limit for this container definition
- disable
Networking boolean Indicator if networking is disabled
- docker
Labels {[key: string]: string} Set docker labels
- environment {[key: string]: string}
The environment in use
- id string
The provider-assigned unique ID for this managed resource.
- image string
The docker image in use, including the digest
- image
Digest string The digest of the docker image in use
- memory number
The memory limit for this container definition
- memory
Reservation number The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit
- task
Definition string
- container_
name str - cpu float
The CPU limit for this container definition
- disable_
networking bool Indicator if networking is disabled
- docker_
labels Dict[str, str] Set docker labels
- environment Dict[str, str]
The environment in use
- id str
The provider-assigned unique ID for this managed resource.
- image str
The docker image in use, including the digest
- image_
digest str The digest of the docker image in use
- memory float
The memory limit for this container definition
- memory_
reservation float The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit
- task_
definition str
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.