postgresql.getSequences
Explore with Pulumi AI
The postgresql.getSequences data source retrieves a list of sequence names from a specified PostgreSQL database.
Usage
import * as pulumi from "@pulumi/pulumi";
import * as postgresql from "@pulumi/postgresql";
const mySequences = postgresql.getSequences({
    database: "my_database",
});
import pulumi
import pulumi_postgresql as postgresql
my_sequences = postgresql.get_sequences(database="my_database")
package main
import (
	"github.com/pulumi/pulumi-postgresql/sdk/v3/go/postgresql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := postgresql.GetSequences(ctx, &postgresql.GetSequencesArgs{
			Database: "my_database",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using PostgreSql = Pulumi.PostgreSql;
return await Deployment.RunAsync(() => 
{
    var mySequences = PostgreSql.GetSequences.Invoke(new()
    {
        Database = "my_database",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.postgresql.PostgresqlFunctions;
import com.pulumi.postgresql.inputs.GetSequencesArgs;
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 mySequences = PostgresqlFunctions.getSequences(GetSequencesArgs.builder()
            .database("my_database")
            .build());
    }
}
variables:
  mySequences:
    fn::invoke:
      function: postgresql:getSequences
      arguments:
        database: my_database
Using getSequences
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 getSequences(args: GetSequencesArgs, opts?: InvokeOptions): Promise<GetSequencesResult>
function getSequencesOutput(args: GetSequencesOutputArgs, opts?: InvokeOptions): Output<GetSequencesResult>def get_sequences(database: Optional[str] = None,
                  like_all_patterns: Optional[Sequence[str]] = None,
                  like_any_patterns: Optional[Sequence[str]] = None,
                  not_like_all_patterns: Optional[Sequence[str]] = None,
                  regex_pattern: Optional[str] = None,
                  schemas: Optional[Sequence[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetSequencesResult
def get_sequences_output(database: Optional[pulumi.Input[str]] = None,
                  like_all_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  like_any_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  not_like_all_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  regex_pattern: Optional[pulumi.Input[str]] = None,
                  schemas: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetSequencesResult]func GetSequences(ctx *Context, args *GetSequencesArgs, opts ...InvokeOption) (*GetSequencesResult, error)
func GetSequencesOutput(ctx *Context, args *GetSequencesOutputArgs, opts ...InvokeOption) GetSequencesResultOutput> Note: This function is named GetSequences in the Go SDK.
public static class GetSequences 
{
    public static Task<GetSequencesResult> InvokeAsync(GetSequencesArgs args, InvokeOptions? opts = null)
    public static Output<GetSequencesResult> Invoke(GetSequencesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSequencesResult> getSequences(GetSequencesArgs args, InvokeOptions options)
public static Output<GetSequencesResult> getSequences(GetSequencesArgs args, InvokeOptions options)
fn::invoke:
  function: postgresql:index/getSequences:getSequences
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Database string
 - The PostgreSQL database which will be queried for sequence names.
 - Like
All List<string>Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ALLoperators. - Like
Any List<string>Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ANYoperators. - Not
Like List<string>All Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
NOT LIKE ALLoperators. - Regex
Pattern string Expression which will be pattern matched against sequence names in the query using the PostgreSQL
~(regular expression match) operator.Note that all optional arguments can be used in conjunction.
- Schemas List<string>
 - List of PostgreSQL schema(s) which will be queried for sequence names. Queries all schemas in the database by default.
 
- Database string
 - The PostgreSQL database which will be queried for sequence names.
 - Like
All []stringPatterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ALLoperators. - Like
Any []stringPatterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ANYoperators. - Not
Like []stringAll Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
NOT LIKE ALLoperators. - Regex
Pattern string Expression which will be pattern matched against sequence names in the query using the PostgreSQL
~(regular expression match) operator.Note that all optional arguments can be used in conjunction.
- Schemas []string
 - List of PostgreSQL schema(s) which will be queried for sequence names. Queries all schemas in the database by default.
 
- database String
 - The PostgreSQL database which will be queried for sequence names.
 - like
All List<String>Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ALLoperators. - like
Any List<String>Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ANYoperators. - not
Like List<String>All Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
NOT LIKE ALLoperators. - regex
Pattern String Expression which will be pattern matched against sequence names in the query using the PostgreSQL
~(regular expression match) operator.Note that all optional arguments can be used in conjunction.
- schemas List<String>
 - List of PostgreSQL schema(s) which will be queried for sequence names. Queries all schemas in the database by default.
 
- database string
 - The PostgreSQL database which will be queried for sequence names.
 - like
All string[]Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ALLoperators. - like
Any string[]Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ANYoperators. - not
Like string[]All Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
NOT LIKE ALLoperators. - regex
Pattern string Expression which will be pattern matched against sequence names in the query using the PostgreSQL
~(regular expression match) operator.Note that all optional arguments can be used in conjunction.
- schemas string[]
 - List of PostgreSQL schema(s) which will be queried for sequence names. Queries all schemas in the database by default.
 
- database str
 - The PostgreSQL database which will be queried for sequence names.
 - like_
all_ Sequence[str]patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ALLoperators. - like_
any_ Sequence[str]patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ANYoperators. - not_
like_ Sequence[str]all_ patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
NOT LIKE ALLoperators. - regex_
pattern str Expression which will be pattern matched against sequence names in the query using the PostgreSQL
~(regular expression match) operator.Note that all optional arguments can be used in conjunction.
- schemas Sequence[str]
 - List of PostgreSQL schema(s) which will be queried for sequence names. Queries all schemas in the database by default.
 
- database String
 - The PostgreSQL database which will be queried for sequence names.
 - like
All List<String>Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ALLoperators. - like
Any List<String>Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
LIKE ANYoperators. - not
Like List<String>All Patterns  - List of expressions which will be pattern matched against sequence names in the query using the PostgreSQL 
NOT LIKE ALLoperators. - regex
Pattern String Expression which will be pattern matched against sequence names in the query using the PostgreSQL
~(regular expression match) operator.Note that all optional arguments can be used in conjunction.
- schemas List<String>
 - List of PostgreSQL schema(s) which will be queried for sequence names. Queries all schemas in the database by default.
 
getSequences Result
The following output properties are available:
- Database string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Sequences
List<Pulumi.
Postgre Sql. Outputs. Get Sequences Sequence>  - A list of PostgreSQL sequences retrieved by this data source. Each sequence consists of the fields documented below.
 - Like
All List<string>Patterns  - Like
Any List<string>Patterns  - Not
Like List<string>All Patterns  - Regex
Pattern string - Schemas List<string>
 
- Database string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Sequences
[]Get
Sequences Sequence  - A list of PostgreSQL sequences retrieved by this data source. Each sequence consists of the fields documented below.
 - Like
All []stringPatterns  - Like
Any []stringPatterns  - Not
Like []stringAll Patterns  - Regex
Pattern string - Schemas []string
 
- database String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - sequences
List<Get
Sequences Sequence>  - A list of PostgreSQL sequences retrieved by this data source. Each sequence consists of the fields documented below.
 - like
All List<String>Patterns  - like
Any List<String>Patterns  - not
Like List<String>All Patterns  - regex
Pattern String - schemas List<String>
 
- database string
 - id string
 - The provider-assigned unique ID for this managed resource.
 - sequences
Get
Sequences Sequence[]  - A list of PostgreSQL sequences retrieved by this data source. Each sequence consists of the fields documented below.
 - like
All string[]Patterns  - like
Any string[]Patterns  - not
Like string[]All Patterns  - regex
Pattern string - schemas string[]
 
- database str
 - id str
 - The provider-assigned unique ID for this managed resource.
 - sequences
Sequence[Get
Sequences Sequence]  - A list of PostgreSQL sequences retrieved by this data source. Each sequence consists of the fields documented below.
 - like_
all_ Sequence[str]patterns  - like_
any_ Sequence[str]patterns  - not_
like_ Sequence[str]all_ patterns  - regex_
pattern str - schemas Sequence[str]
 
- database String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - sequences List<Property Map>
 - A list of PostgreSQL sequences retrieved by this data source. Each sequence consists of the fields documented below.
 - like
All List<String>Patterns  - like
Any List<String>Patterns  - not
Like List<String>All Patterns  - regex
Pattern String - schemas List<String>
 
Supporting Types
GetSequencesSequence  
- Data
Type string - The sequence's data type as defined in 
information_schema.sequences. - Object
Name string - The sequence name.
 - Schema
Name string - The parent schema.
 
- Data
Type string - The sequence's data type as defined in 
information_schema.sequences. - Object
Name string - The sequence name.
 - Schema
Name string - The parent schema.
 
- data
Type String - The sequence's data type as defined in 
information_schema.sequences. - object
Name String - The sequence name.
 - schema
Name String - The parent schema.
 
- data
Type string - The sequence's data type as defined in 
information_schema.sequences. - object
Name string - The sequence name.
 - schema
Name string - The parent schema.
 
- data_
type str - The sequence's data type as defined in 
information_schema.sequences. - object_
name str - The sequence name.
 - schema_
name str - The parent schema.
 
- data
Type String - The sequence's data type as defined in 
information_schema.sequences. - object
Name String - The sequence name.
 - schema
Name String - The parent schema.
 
Package Details
- Repository
 - PostgreSQL pulumi/pulumi-postgresql
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
postgresqlTerraform Provider.