getService

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

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.EcsFunctions;
import com.pulumi.aws.ecs.inputs.GetServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = EcsFunctions.getService(GetServiceArgs.builder()
.serviceName("example")
.clusterArn(data.aws_ecs_cluster().example().arn())
.build());
}
}

Return

A collection of values returned by getService.

Parameters

argument

A collection of arguments for invoking getService.


suspend fun getService(clusterArn: String, serviceName: String, tags: Map<String, String>? = null): GetServiceResult

Return

A collection of values returned by getService.

Parameters

clusterArn

ARN of the ECS Cluster

serviceName

Name of the ECS Service

tags

Resource tags.

See also


suspend fun getService(argument: suspend GetServicePlainArgsBuilder.() -> Unit): GetServiceResult

Return

A collection of values returned by getService.

Parameters

argument

Builder for com.pulumi.aws.ecs.kotlin.inputs.GetServicePlainArgs.

See also