aws logo
AWS Classic v5.28.0, Jan 23 23

aws.rds.getClusters

Data source for managing an AWS RDS (Relational Database) Clusters.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Rds.GetClusters.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.Rds.Inputs.GetClustersFilterInputArgs
            {
                Name = "engine",
                Values = new[]
                {
                    "aurora-postgresql",
                },
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rds.GetClusters(ctx, &rds.GetClustersArgs{
			Filters: []rds.GetClustersFilter{
				{
					Name: "engine",
					Values: []string{
						"aurora-postgresql",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.RdsFunctions;
import com.pulumi.aws.rds.inputs.GetClustersArgs;
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 = RdsFunctions.getClusters(GetClustersArgs.builder()
            .filters(GetClustersFilterArgs.builder()
                .name("engine")
                .values("aurora-postgresql")
                .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.rds.get_clusters(filters=[aws.rds.GetClustersFilterArgs(
    name="engine",
    values=["aurora-postgresql"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.rds.getClusters({
    filters: [{
        name: "engine",
        values: ["aurora-postgresql"],
    }],
});
variables:
  example:
    fn::invoke:
      Function: aws:rds:getClusters
      Arguments:
        filters:
          - name: engine
            values:
              - aurora-postgresql

Using getClusters

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 getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>
function getClustersOutput(args: GetClustersOutputArgs, opts?: InvokeOptions): Output<GetClustersResult>
def get_clusters(filters: Optional[Sequence[GetClustersFilter]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetClustersResult
def get_clusters_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetClustersFilterArgs]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetClustersResult]
func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)
func GetClustersOutput(ctx *Context, args *GetClustersOutputArgs, opts ...InvokeOption) GetClustersResultOutput

> Note: This function is named GetClusters in the Go SDK.

public static class GetClusters 
{
    public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
    public static Output<GetClustersResult> Invoke(GetClustersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:rds/getClusters:getClusters
  arguments:
    # arguments dictionary

The following arguments are supported:

Filters List<GetClustersFilter>

Configuration block(s) for filtering. Detailed below.

Filters []GetClustersFilter

Configuration block(s) for filtering. Detailed below.

filters List<GetClustersFilter>

Configuration block(s) for filtering. Detailed below.

filters GetClustersFilter[]

Configuration block(s) for filtering. Detailed below.

filters Sequence[GetClustersFilter]

Configuration block(s) for filtering. Detailed below.

filters List<Property Map>

Configuration block(s) for filtering. Detailed below.

getClusters Result

The following output properties are available:

ClusterArns List<string>

Set of cluster ARNs of the matched RDS clusters.

ClusterIdentifiers List<string>

Set of ARNs of cluster identifiers of the matched RDS clusters.

Id string

The provider-assigned unique ID for this managed resource.

Filters List<GetClustersFilter>
ClusterArns []string

Set of cluster ARNs of the matched RDS clusters.

ClusterIdentifiers []string

Set of ARNs of cluster identifiers of the matched RDS clusters.

Id string

The provider-assigned unique ID for this managed resource.

Filters []GetClustersFilter
clusterArns List<String>

Set of cluster ARNs of the matched RDS clusters.

clusterIdentifiers List<String>

Set of ARNs of cluster identifiers of the matched RDS clusters.

id String

The provider-assigned unique ID for this managed resource.

filters List<GetClustersFilter>
clusterArns string[]

Set of cluster ARNs of the matched RDS clusters.

clusterIdentifiers string[]

Set of ARNs of cluster identifiers of the matched RDS clusters.

id string

The provider-assigned unique ID for this managed resource.

filters GetClustersFilter[]
cluster_arns Sequence[str]

Set of cluster ARNs of the matched RDS clusters.

cluster_identifiers Sequence[str]

Set of ARNs of cluster identifiers of the matched RDS clusters.

id str

The provider-assigned unique ID for this managed resource.

filters Sequence[GetClustersFilter]
clusterArns List<String>

Set of cluster ARNs of the matched RDS clusters.

clusterIdentifiers List<String>

Set of ARNs of cluster identifiers of the matched RDS clusters.

id String

The provider-assigned unique ID for this managed resource.

filters List<Property Map>

Supporting Types

GetClustersFilter

Name string

Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.

Values List<string>

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Name string

Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.

Values []string

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name String

Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.

values List<String>

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name string

Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.

values string[]

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name str

Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.

values Sequence[str]

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name String

Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.

values List<String>

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.