1. Packages
  2. AWS
  3. API Docs
  4. timestreamwrite
  5. getDatabase
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.timestreamwrite.getDatabase

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Data source for managing an AWS Timestream Write Database.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.timestreamwrite.getDatabase({
        name: "database-example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.timestreamwrite.get_database(name="database-example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/timestreamwrite"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := timestreamwrite.LookupDatabase(ctx, &timestreamwrite.LookupDatabaseArgs{
    			Name: "database-example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Aws.TimestreamWrite.GetDatabase.Invoke(new()
        {
            Name = "database-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.timestreamwrite.TimestreamwriteFunctions;
    import com.pulumi.aws.timestreamwrite.inputs.GetDatabaseArgs;
    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 test = TimestreamwriteFunctions.getDatabase(GetDatabaseArgs.builder()
                .name("database-example")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: aws:timestreamwrite:getDatabase
          Arguments:
            name: database-example
    

    Using getDatabase

    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 getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
    function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
    def get_database(name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
    def get_database_output(name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
    func LookupDatabase(ctx *Context, args *LookupDatabaseArgs, opts ...InvokeOption) (*LookupDatabaseResult, error)
    func LookupDatabaseOutput(ctx *Context, args *LookupDatabaseOutputArgs, opts ...InvokeOption) LookupDatabaseResultOutput

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

    public static class GetDatabase 
    {
        public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:timestreamwrite/getDatabase:getDatabase
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name string
    name String
    name string
    name str
    name String

    getDatabase Result

    The following output properties are available:

    Arn string
    The ARN that uniquely identifies this database.
    CreatedTime string
    Creation time of database.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyId string
    The ARN of the KMS key used to encrypt the data stored in the database.
    LastUpdatedTime string
    Last time database was updated.
    Name string
    TableCount int
    Total number of tables in the Timestream database.
    Arn string
    The ARN that uniquely identifies this database.
    CreatedTime string
    Creation time of database.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyId string
    The ARN of the KMS key used to encrypt the data stored in the database.
    LastUpdatedTime string
    Last time database was updated.
    Name string
    TableCount int
    Total number of tables in the Timestream database.
    arn String
    The ARN that uniquely identifies this database.
    createdTime String
    Creation time of database.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyId String
    The ARN of the KMS key used to encrypt the data stored in the database.
    lastUpdatedTime String
    Last time database was updated.
    name String
    tableCount Integer
    Total number of tables in the Timestream database.
    arn string
    The ARN that uniquely identifies this database.
    createdTime string
    Creation time of database.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKeyId string
    The ARN of the KMS key used to encrypt the data stored in the database.
    lastUpdatedTime string
    Last time database was updated.
    name string
    tableCount number
    Total number of tables in the Timestream database.
    arn str
    The ARN that uniquely identifies this database.
    created_time str
    Creation time of database.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key_id str
    The ARN of the KMS key used to encrypt the data stored in the database.
    last_updated_time str
    Last time database was updated.
    name str
    table_count int
    Total number of tables in the Timestream database.
    arn String
    The ARN that uniquely identifies this database.
    createdTime String
    Creation time of database.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyId String
    The ARN of the KMS key used to encrypt the data stored in the database.
    lastUpdatedTime String
    Last time database was updated.
    name String
    tableCount Number
    Total number of tables in the Timestream database.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi