GetService

The ECS Service data source allows access to details of a specific Service within a AWS ECS Cluster.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ecs.GetService.InvokeAsync(new Aws.Ecs.GetServiceArgs
        {
            ClusterArn = data.Aws_ecs_cluster.Example.Arn,
            ServiceName = "example",
        }));
    }

}
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.LookupService(ctx, &ecs.LookupServiceArgs{
            ClusterArn:  data.Aws_ecs_cluster.Example.Arn,
            ServiceName: "example",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ecs.get_service(cluster_arn=data["aws_ecs_cluster"]["example"]["arn"],
    service_name="example")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws_ecs_cluster_example.arn.apply(arn => aws.ecs.getService({
    clusterArn: arn,
    serviceName: "example",
}, { async: true }));

Using GetService

function getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function  get_service(cluster_arn=None, service_name=None, opts=None)
func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)

Note: This function is named LookupService in the Go SDK.

public static class GetService {
    public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ClusterArn string

The arn of the ECS Cluster

ServiceName string

The name of the ECS Service

ClusterArn string

The arn of the ECS Cluster

ServiceName string

The name of the ECS Service

clusterArn string

The arn of the ECS Cluster

serviceName string

The name of the ECS Service

cluster_arn str

The arn of the ECS Cluster

service_name str

The name of the ECS Service

GetService Result

The following output properties are available:

Arn string

The ARN of the ECS Service

ClusterArn string
DesiredCount int

The number of tasks for the ECS Service

Id string

The provider-assigned unique ID for this managed resource.

LaunchType string

The launch type for the ECS Service

SchedulingStrategy string

The scheduling strategy for the ECS Service

ServiceName string
TaskDefinition string

The family for the latest ACTIVE revision

Arn string

The ARN of the ECS Service

ClusterArn string
DesiredCount int

The number of tasks for the ECS Service

Id string

The provider-assigned unique ID for this managed resource.

LaunchType string

The launch type for the ECS Service

SchedulingStrategy string

The scheduling strategy for the ECS Service

ServiceName string
TaskDefinition string

The family for the latest ACTIVE revision

arn string

The ARN of the ECS Service

clusterArn string
desiredCount number

The number of tasks for the ECS Service

id string

The provider-assigned unique ID for this managed resource.

launchType string

The launch type for the ECS Service

schedulingStrategy string

The scheduling strategy for the ECS Service

serviceName string
taskDefinition string

The family for the latest ACTIVE revision

arn str

The ARN of the ECS Service

cluster_arn str
desired_count float

The number of tasks for the ECS Service

id str

The provider-assigned unique ID for this managed resource.

launch_type str

The launch type for the ECS Service

scheduling_strategy str

The scheduling strategy for the ECS Service

service_name str
task_definition str

The family for the latest ACTIVE revision

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.