AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

getInstance

Use this data source to get information about an RDS instance

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var database = Output.Create(Aws.Rds.GetInstance.InvokeAsync(new Aws.Rds.GetInstanceArgs
        {
            DbInstanceIdentifier = "my-test-database",
        }));
    }

}
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.LookupInstance(ctx, &rds.LookupInstanceArgs{
			DbInstanceIdentifier: "my-test-database",
		}, 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 database = Output.of(RdsFunctions.getInstance(GetInstanceArgs.builder()
            .dbInstanceIdentifier("my-test-database")
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

database = aws.rds.get_instance(db_instance_identifier="my-test-database")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const database = pulumi.output(aws.rds.getInstance({
    dbInstanceIdentifier: "my-test-database",
}));
variables:
  database:
    Fn::Invoke:
      Function: aws:rds:getInstance
      Arguments:
        dbInstanceIdentifier: my-test-database

Using getInstance

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 getInstance(args: GetInstanceArgs, opts?: InvokeOptions): Promise<GetInstanceResult>
function getInstanceOutput(args: GetInstanceOutputArgs, opts?: InvokeOptions): Output<GetInstanceResult>
def get_instance(db_instance_identifier: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetInstanceResult
def get_instance_output(db_instance_identifier: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetInstanceResult]
func LookupInstance(ctx *Context, args *LookupInstanceArgs, opts ...InvokeOption) (*LookupInstanceResult, error)
func LookupInstanceOutput(ctx *Context, args *LookupInstanceOutputArgs, opts ...InvokeOption) LookupInstanceResultOutput

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

public static class GetInstance 
{
    public static Task<GetInstanceResult> InvokeAsync(GetInstanceArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceResult> Invoke(GetInstanceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceResult> getInstance(GetInstanceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:rds/getInstance:getInstance
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DbInstanceIdentifier string

The name of the RDS instance

Tags Dictionary<string, string>
DbInstanceIdentifier string

The name of the RDS instance

Tags map[string]string
dbInstanceIdentifier String

The name of the RDS instance

tags Map<String,String>
dbInstanceIdentifier string

The name of the RDS instance

tags {[key: string]: string}
db_instance_identifier str

The name of the RDS instance

tags Mapping[str, str]
dbInstanceIdentifier String

The name of the RDS instance

tags Map<String>

getInstance Result

The following output properties are available:

Address string

The hostname of the RDS instance. See also endpoint and port.

AllocatedStorage int

Specifies the allocated storage size specified in gigabytes.

AutoMinorVersionUpgrade bool

Indicates that minor version patches are applied automatically.

AvailabilityZone string

Specifies the name of the Availability Zone the DB instance is located in.

BackupRetentionPeriod int

Specifies the number of days for which automatic DB snapshots are retained.

CaCertIdentifier string

Specifies the identifier of the CA certificate for the DB instance.

DbClusterIdentifier string

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

DbInstanceArn string

The Amazon Resource Name (ARN) for the DB instance.

DbInstanceClass string

Contains the name of the compute and memory capacity class of the DB instance.

DbInstanceIdentifier string
DbInstancePort int

Specifies the port that the DB instance listens on.

DbName string

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.

DbParameterGroups List<string>

Provides the list of DB parameter groups applied to this DB instance.

DbSecurityGroups List<string>

Provides List of DB security groups associated to this DB instance.

DbSubnetGroup string

Specifies the name of the subnet group associated with the DB instance.

EnabledCloudwatchLogsExports List<string>

List of log types to export to cloudwatch.

Endpoint string

The connection endpoint in address:port format.

Engine string

Provides the name of the database engine to be used for this DB instance.

EngineVersion string

Indicates the database engine version.

HostedZoneId string

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).

Id string

The provider-assigned unique ID for this managed resource.

Iops int

Specifies the Provisioned IOPS (I/O operations per second) value.

KmsKeyId string

If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.

LicenseModel string

License model information for this DB instance.

MasterUsername string

Contains the master username for the DB instance.

MonitoringInterval int

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.

MonitoringRoleArn string

The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.

MultiAz bool

Specifies if the DB instance is a Multi-AZ deployment.

OptionGroupMemberships List<string>

Provides the list of option group memberships for this DB instance.

Port int

The database port.

PreferredBackupWindow string

Specifies the daily time range during which automated backups are created.

PreferredMaintenanceWindow string

Specifies the weekly time range during which system maintenance can occur in UTC.

PubliclyAccessible bool

Specifies the accessibility options for the DB instance.

ReplicateSourceDb string

The identifier of the source DB that this is a replica of.

ResourceId string

The RDS Resource ID of this instance.

StorageEncrypted bool

Specifies whether the DB instance is encrypted.

StorageType string

Specifies the storage type associated with DB instance.

Tags Dictionary<string, string>
Timezone string

The time zone of the DB instance.

VpcSecurityGroups List<string>

Provides a list of VPC security group elements that the DB instance belongs to.

Address string

The hostname of the RDS instance. See also endpoint and port.

AllocatedStorage int

Specifies the allocated storage size specified in gigabytes.

AutoMinorVersionUpgrade bool

Indicates that minor version patches are applied automatically.

AvailabilityZone string

Specifies the name of the Availability Zone the DB instance is located in.

BackupRetentionPeriod int

Specifies the number of days for which automatic DB snapshots are retained.

CaCertIdentifier string

Specifies the identifier of the CA certificate for the DB instance.

DbClusterIdentifier string

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

DbInstanceArn string

The Amazon Resource Name (ARN) for the DB instance.

DbInstanceClass string

Contains the name of the compute and memory capacity class of the DB instance.

DbInstanceIdentifier string
DbInstancePort int

Specifies the port that the DB instance listens on.

DbName string

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.

DbParameterGroups []string

Provides the list of DB parameter groups applied to this DB instance.

DbSecurityGroups []string

Provides List of DB security groups associated to this DB instance.

DbSubnetGroup string

Specifies the name of the subnet group associated with the DB instance.

EnabledCloudwatchLogsExports []string

List of log types to export to cloudwatch.

Endpoint string

The connection endpoint in address:port format.

Engine string

Provides the name of the database engine to be used for this DB instance.

EngineVersion string

Indicates the database engine version.

HostedZoneId string

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).

Id string

The provider-assigned unique ID for this managed resource.

Iops int

Specifies the Provisioned IOPS (I/O operations per second) value.

KmsKeyId string

If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.

LicenseModel string

License model information for this DB instance.

MasterUsername string

Contains the master username for the DB instance.

MonitoringInterval int

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.

MonitoringRoleArn string

The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.

MultiAz bool

Specifies if the DB instance is a Multi-AZ deployment.

OptionGroupMemberships []string

Provides the list of option group memberships for this DB instance.

Port int

The database port.

PreferredBackupWindow string

Specifies the daily time range during which automated backups are created.

PreferredMaintenanceWindow string

Specifies the weekly time range during which system maintenance can occur in UTC.

PubliclyAccessible bool

Specifies the accessibility options for the DB instance.

ReplicateSourceDb string

The identifier of the source DB that this is a replica of.

ResourceId string

The RDS Resource ID of this instance.

StorageEncrypted bool

Specifies whether the DB instance is encrypted.

StorageType string

Specifies the storage type associated with DB instance.

Tags map[string]string
Timezone string

The time zone of the DB instance.

VpcSecurityGroups []string

Provides a list of VPC security group elements that the DB instance belongs to.

address String

The hostname of the RDS instance. See also endpoint and port.

allocatedStorage Integer

Specifies the allocated storage size specified in gigabytes.

autoMinorVersionUpgrade Boolean

Indicates that minor version patches are applied automatically.

availabilityZone String

Specifies the name of the Availability Zone the DB instance is located in.

backupRetentionPeriod Integer

Specifies the number of days for which automatic DB snapshots are retained.

caCertIdentifier String

Specifies the identifier of the CA certificate for the DB instance.

dbClusterIdentifier String

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

dbInstanceArn String

The Amazon Resource Name (ARN) for the DB instance.

dbInstanceClass String

Contains the name of the compute and memory capacity class of the DB instance.

dbInstanceIdentifier String
dbInstancePort Integer

Specifies the port that the DB instance listens on.

dbName String

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.

dbParameterGroups List<String>

Provides the list of DB parameter groups applied to this DB instance.

dbSecurityGroups List<String>

Provides List of DB security groups associated to this DB instance.

dbSubnetGroup String

Specifies the name of the subnet group associated with the DB instance.

enabledCloudwatchLogsExports List<String>

List of log types to export to cloudwatch.

endpoint String

The connection endpoint in address:port format.

engine String

Provides the name of the database engine to be used for this DB instance.

engineVersion String

Indicates the database engine version.

hostedZoneId String

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).

id String

The provider-assigned unique ID for this managed resource.

iops Integer

Specifies the Provisioned IOPS (I/O operations per second) value.

kmsKeyId String

If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.

licenseModel String

License model information for this DB instance.

masterUsername String

Contains the master username for the DB instance.

monitoringInterval Integer

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.

monitoringRoleArn String

The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.

multiAz Boolean

Specifies if the DB instance is a Multi-AZ deployment.

optionGroupMemberships List<String>

Provides the list of option group memberships for this DB instance.

port Integer

The database port.

preferredBackupWindow String

Specifies the daily time range during which automated backups are created.

preferredMaintenanceWindow String

Specifies the weekly time range during which system maintenance can occur in UTC.

publiclyAccessible Boolean

Specifies the accessibility options for the DB instance.

replicateSourceDb String

The identifier of the source DB that this is a replica of.

resourceId String

The RDS Resource ID of this instance.

storageEncrypted Boolean

Specifies whether the DB instance is encrypted.

storageType String

Specifies the storage type associated with DB instance.

tags Map<String,String>
timezone String

The time zone of the DB instance.

vpcSecurityGroups List<String>

Provides a list of VPC security group elements that the DB instance belongs to.

address string

The hostname of the RDS instance. See also endpoint and port.

allocatedStorage number

Specifies the allocated storage size specified in gigabytes.

autoMinorVersionUpgrade boolean

Indicates that minor version patches are applied automatically.

availabilityZone string

Specifies the name of the Availability Zone the DB instance is located in.

backupRetentionPeriod number

Specifies the number of days for which automatic DB snapshots are retained.

caCertIdentifier string

Specifies the identifier of the CA certificate for the DB instance.

dbClusterIdentifier string

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

dbInstanceArn string

The Amazon Resource Name (ARN) for the DB instance.

dbInstanceClass string

Contains the name of the compute and memory capacity class of the DB instance.

dbInstanceIdentifier string
dbInstancePort number

Specifies the port that the DB instance listens on.

dbName string

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.

dbParameterGroups string[]

Provides the list of DB parameter groups applied to this DB instance.

dbSecurityGroups string[]

Provides List of DB security groups associated to this DB instance.

dbSubnetGroup string

Specifies the name of the subnet group associated with the DB instance.

enabledCloudwatchLogsExports string[]

List of log types to export to cloudwatch.

endpoint string

The connection endpoint in address:port format.

engine string

Provides the name of the database engine to be used for this DB instance.

engineVersion string

Indicates the database engine version.

hostedZoneId string

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).

id string

The provider-assigned unique ID for this managed resource.

iops number

Specifies the Provisioned IOPS (I/O operations per second) value.

kmsKeyId string

If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.

licenseModel string

License model information for this DB instance.

masterUsername string

Contains the master username for the DB instance.

monitoringInterval number

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.

monitoringRoleArn string

The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.

multiAz boolean

Specifies if the DB instance is a Multi-AZ deployment.

optionGroupMemberships string[]

Provides the list of option group memberships for this DB instance.

port number

The database port.

preferredBackupWindow string

Specifies the daily time range during which automated backups are created.

preferredMaintenanceWindow string

Specifies the weekly time range during which system maintenance can occur in UTC.

publiclyAccessible boolean

Specifies the accessibility options for the DB instance.

replicateSourceDb string

The identifier of the source DB that this is a replica of.

resourceId string

The RDS Resource ID of this instance.

storageEncrypted boolean

Specifies whether the DB instance is encrypted.

storageType string

Specifies the storage type associated with DB instance.

tags {[key: string]: string}
timezone string

The time zone of the DB instance.

vpcSecurityGroups string[]

Provides a list of VPC security group elements that the DB instance belongs to.

address str

The hostname of the RDS instance. See also endpoint and port.

allocated_storage int

Specifies the allocated storage size specified in gigabytes.

auto_minor_version_upgrade bool

Indicates that minor version patches are applied automatically.

availability_zone str

Specifies the name of the Availability Zone the DB instance is located in.

backup_retention_period int

Specifies the number of days for which automatic DB snapshots are retained.

ca_cert_identifier str

Specifies the identifier of the CA certificate for the DB instance.

db_cluster_identifier str

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

db_instance_arn str

The Amazon Resource Name (ARN) for the DB instance.

db_instance_class str

Contains the name of the compute and memory capacity class of the DB instance.

db_instance_identifier str
db_instance_port int

Specifies the port that the DB instance listens on.

db_name str

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.

db_parameter_groups Sequence[str]

Provides the list of DB parameter groups applied to this DB instance.

db_security_groups Sequence[str]

Provides List of DB security groups associated to this DB instance.

db_subnet_group str

Specifies the name of the subnet group associated with the DB instance.

enabled_cloudwatch_logs_exports Sequence[str]

List of log types to export to cloudwatch.

endpoint str

The connection endpoint in address:port format.

engine str

Provides the name of the database engine to be used for this DB instance.

engine_version str

Indicates the database engine version.

hosted_zone_id str

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).

id str

The provider-assigned unique ID for this managed resource.

iops int

Specifies the Provisioned IOPS (I/O operations per second) value.

kms_key_id str

If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.

license_model str

License model information for this DB instance.

master_username str

Contains the master username for the DB instance.

monitoring_interval int

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.

monitoring_role_arn str

The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.

multi_az bool

Specifies if the DB instance is a Multi-AZ deployment.

option_group_memberships Sequence[str]

Provides the list of option group memberships for this DB instance.

port int

The database port.

preferred_backup_window str

Specifies the daily time range during which automated backups are created.

preferred_maintenance_window str

Specifies the weekly time range during which system maintenance can occur in UTC.

publicly_accessible bool

Specifies the accessibility options for the DB instance.

replicate_source_db str

The identifier of the source DB that this is a replica of.

resource_id str

The RDS Resource ID of this instance.

storage_encrypted bool

Specifies whether the DB instance is encrypted.

storage_type str

Specifies the storage type associated with DB instance.

tags Mapping[str, str]
timezone str

The time zone of the DB instance.

vpc_security_groups Sequence[str]

Provides a list of VPC security group elements that the DB instance belongs to.

address String

The hostname of the RDS instance. See also endpoint and port.

allocatedStorage Number

Specifies the allocated storage size specified in gigabytes.

autoMinorVersionUpgrade Boolean

Indicates that minor version patches are applied automatically.

availabilityZone String

Specifies the name of the Availability Zone the DB instance is located in.

backupRetentionPeriod Number

Specifies the number of days for which automatic DB snapshots are retained.

caCertIdentifier String

Specifies the identifier of the CA certificate for the DB instance.

dbClusterIdentifier String

If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.

dbInstanceArn String

The Amazon Resource Name (ARN) for the DB instance.

dbInstanceClass String

Contains the name of the compute and memory capacity class of the DB instance.

dbInstanceIdentifier String
dbInstancePort Number

Specifies the port that the DB instance listens on.

dbName String

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.

dbParameterGroups List<String>

Provides the list of DB parameter groups applied to this DB instance.

dbSecurityGroups List<String>

Provides List of DB security groups associated to this DB instance.

dbSubnetGroup String

Specifies the name of the subnet group associated with the DB instance.

enabledCloudwatchLogsExports List<String>

List of log types to export to cloudwatch.

endpoint String

The connection endpoint in address:port format.

engine String

Provides the name of the database engine to be used for this DB instance.

engineVersion String

Indicates the database engine version.

hostedZoneId String

The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).

id String

The provider-assigned unique ID for this managed resource.

iops Number

Specifies the Provisioned IOPS (I/O operations per second) value.

kmsKeyId String

If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.

licenseModel String

License model information for this DB instance.

masterUsername String

Contains the master username for the DB instance.

monitoringInterval Number

The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.

monitoringRoleArn String

The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.

multiAz Boolean

Specifies if the DB instance is a Multi-AZ deployment.

optionGroupMemberships List<String>

Provides the list of option group memberships for this DB instance.

port Number

The database port.

preferredBackupWindow String

Specifies the daily time range during which automated backups are created.

preferredMaintenanceWindow String

Specifies the weekly time range during which system maintenance can occur in UTC.

publiclyAccessible Boolean

Specifies the accessibility options for the DB instance.

replicateSourceDb String

The identifier of the source DB that this is a replica of.

resourceId String

The RDS Resource ID of this instance.

storageEncrypted Boolean

Specifies whether the DB instance is encrypted.

storageType String

Specifies the storage type associated with DB instance.

tags Map<String>
timezone String

The time zone of the DB instance.

vpcSecurityGroups List<String>

Provides a list of VPC security group elements that the DB instance belongs to.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.