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
LookupServicein the Go SDK.
public static class GetService {
public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Cluster
Arn string The arn of the ECS Cluster
- Service
Name string The name of the ECS Service
- Cluster
Arn string The arn of the ECS Cluster
- Service
Name string The name of the ECS Service
- cluster
Arn string The arn of the ECS Cluster
- service
Name 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
- Cluster
Arn string - Desired
Count int The number of tasks for the ECS Service
- Id string
The provider-assigned unique ID for this managed resource.
- Launch
Type string The launch type for the ECS Service
- Scheduling
Strategy string The scheduling strategy for the ECS Service
- Service
Name string - Task
Definition string The family for the latest ACTIVE revision
- Arn string
The ARN of the ECS Service
- Cluster
Arn string - Desired
Count int The number of tasks for the ECS Service
- Id string
The provider-assigned unique ID for this managed resource.
- Launch
Type string The launch type for the ECS Service
- Scheduling
Strategy string The scheduling strategy for the ECS Service
- Service
Name string - Task
Definition string The family for the latest ACTIVE revision
- arn string
The ARN of the ECS Service
- cluster
Arn string - desired
Count number The number of tasks for the ECS Service
- id string
The provider-assigned unique ID for this managed resource.
- launch
Type string The launch type for the ECS Service
- scheduling
Strategy string The scheduling strategy for the ECS Service
- service
Name string - task
Definition 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
awsTerraform Provider.