AWS Classic
getCluster
The ECS Cluster data source allows access to details of a specific cluster 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.GetCluster.InvokeAsync(new Aws.Ecs.GetClusterArgs
{
ClusterName = "ecs-mongo-production",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.LookupCluster(ctx, &ecs.LookupClusterArgs{
ClusterName: "ecs-mongo-production",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var ecs-mongo = Output.of(EcsFunctions.getCluster(GetClusterArgs.builder()
.clusterName("ecs-mongo-production")
.build()));
}
}
import pulumi
import pulumi_aws as aws
ecs_mongo = aws.ecs.get_cluster(cluster_name="ecs-mongo-production")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ecs_mongo = pulumi.output(aws.ecs.getCluster({
clusterName: "ecs-mongo-production",
}));
variables:
ecs-mongo:
Fn::Invoke:
Function: aws:ecs:getCluster
Arguments:
clusterName: ecs-mongo-production
Using getCluster
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
def get_cluster(cluster_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterResult
def get_cluster_output(cluster_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput
> Note: This function is named LookupCluster
in the Go SDK.
public static class GetCluster
{
public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:ecs/getCluster:getCluster
Arguments:
# Arguments dictionary
The following arguments are supported:
- Cluster
Name string The name of the ECS Cluster
- Cluster
Name string The name of the ECS Cluster
- cluster
Name String The name of the ECS Cluster
- cluster
Name string The name of the ECS Cluster
- cluster_
name str The name of the ECS Cluster
- cluster
Name String The name of the ECS Cluster
getCluster Result
The following output properties are available:
- Arn string
The ARN of the ECS Cluster
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Pending
Tasks intCount The number of pending tasks for the ECS Cluster
- Registered
Container intInstances Count The number of registered container instances for the ECS Cluster
- Running
Tasks intCount The number of running tasks for the ECS Cluster
- Settings
List<Get
Cluster Setting> The settings associated with the ECS Cluster.
- Status string
The status of the ECS Cluster
- Arn string
The ARN of the ECS Cluster
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Pending
Tasks intCount The number of pending tasks for the ECS Cluster
- Registered
Container intInstances Count The number of registered container instances for the ECS Cluster
- Running
Tasks intCount The number of running tasks for the ECS Cluster
- Settings
[]Get
Cluster Setting The settings associated with the ECS Cluster.
- Status string
The status of the ECS Cluster
- arn String
The ARN of the ECS Cluster
- cluster
Name String - id String
The provider-assigned unique ID for this managed resource.
- pending
Tasks IntegerCount The number of pending tasks for the ECS Cluster
- registered
Container IntegerInstances Count The number of registered container instances for the ECS Cluster
- running
Tasks IntegerCount The number of running tasks for the ECS Cluster
- settings
List<Get
Cluster Setting> The settings associated with the ECS Cluster.
- status String
The status of the ECS Cluster
- arn string
The ARN of the ECS Cluster
- cluster
Name string - id string
The provider-assigned unique ID for this managed resource.
- pending
Tasks numberCount The number of pending tasks for the ECS Cluster
- registered
Container numberInstances Count The number of registered container instances for the ECS Cluster
- running
Tasks numberCount The number of running tasks for the ECS Cluster
- settings
Get
Cluster Setting[] The settings associated with the ECS Cluster.
- status string
The status of the ECS Cluster
- arn str
The ARN of the ECS Cluster
- cluster_
name str - id str
The provider-assigned unique ID for this managed resource.
- pending_
tasks_ intcount The number of pending tasks for the ECS Cluster
- registered_
container_ intinstances_ count The number of registered container instances for the ECS Cluster
- running_
tasks_ intcount The number of running tasks for the ECS Cluster
- settings
Sequence[Get
Cluster Setting] The settings associated with the ECS Cluster.
- status str
The status of the ECS Cluster
- arn String
The ARN of the ECS Cluster
- cluster
Name String - id String
The provider-assigned unique ID for this managed resource.
- pending
Tasks NumberCount The number of pending tasks for the ECS Cluster
- registered
Container NumberInstances Count The number of registered container instances for the ECS Cluster
- running
Tasks NumberCount The number of running tasks for the ECS Cluster
- settings List<Property Map>
The settings associated with the ECS Cluster.
- status String
The status of the ECS Cluster
Supporting Types
GetClusterSetting
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.