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/v2/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v2/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
})
}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",
}, { async: true }));Using GetInstance
function getInstance(args: GetInstanceArgs, opts?: InvokeOptions): Promise<GetInstanceResult>function get_instance(db_instance_identifier=None, tags=None, opts=None)func LookupInstance(ctx *Context, args *LookupInstanceArgs, opts ...InvokeOption) (*LookupInstanceResult, error)Note: This function is named
LookupInstancein the Go SDK.
public static class GetInstance {
public static Task<GetInstanceResult> InvokeAsync(GetInstanceArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Db
Instance stringIdentifier The name of the RDS instance
- Dictionary<string, string>
- Db
Instance stringIdentifier The name of the RDS instance
- map[string]string
- db
Instance stringIdentifier The name of the RDS instance
- {[key: string]: string}
- db_
instance_ stridentifier The name of the RDS instance
- Dict[str, str]
GetInstance Result
The following output properties are available:
- Address string
The hostname of the RDS instance. See also
endpointandport.- Allocated
Storage int Specifies the allocated storage size specified in gigabytes.
- Auto
Minor boolVersion Upgrade Indicates that minor version patches are applied automatically.
- Availability
Zone string Specifies the name of the Availability Zone the DB instance is located in.
- Backup
Retention intPeriod Specifies the number of days for which automatic DB snapshots are retained.
- Ca
Cert stringIdentifier Specifies the identifier of the CA certificate for the DB instance.
- Db
Cluster stringIdentifier 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 stringArn The Amazon Resource Name (ARN) for the DB instance.
- Db
Instance stringClass Contains the name of the compute and memory capacity class of the DB instance.
- Db
Instance stringIdentifier - Db
Instance intPort Specifies the port that the DB instance listens on.
- Db
Name 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.
- Db
Parameter List<string>Groups Provides the list of DB parameter groups applied to this DB instance.
- Db
Security List<string>Groups Provides List of DB security groups associated to this DB instance.
- Db
Subnet stringGroup Specifies the name of the subnet group associated with the DB instance.
- Enabled
Cloudwatch List<string>Logs Exports List of log types to export to cloudwatch.
- Endpoint string
The connection endpoint in
address:portformat.- Engine string
Provides the name of the database engine to be used for this DB instance.
- Engine
Version string Indicates the database engine version.
- Hosted
Zone stringId 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.
- Kms
Key stringId If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.
- License
Model string License model information for this DB instance.
- Master
Username string 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 stringArn 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 List<string>Memberships Provides the list of option group memberships for this DB instance.
- Port int
The database port.
- Preferred
Backup stringWindow Specifies the daily time range during which automated backups are created.
- Preferred
Maintenance stringWindow 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 stringDb The identifier of the source DB that this is a replica of.
- Resource
Id string The RDS Resource ID of this instance.
- Storage
Encrypted bool Specifies whether the DB instance is encrypted.
- Storage
Type string Specifies the storage type associated with DB instance.
- Dictionary<string, string>
- Timezone string
The time zone of the DB instance.
- Vpc
Security List<string>Groups Provides a list of VPC security group elements that the DB instance belongs to.
- Address string
The hostname of the RDS instance. See also
endpointandport.- Allocated
Storage int Specifies the allocated storage size specified in gigabytes.
- Auto
Minor boolVersion Upgrade Indicates that minor version patches are applied automatically.
- Availability
Zone string Specifies the name of the Availability Zone the DB instance is located in.
- Backup
Retention intPeriod Specifies the number of days for which automatic DB snapshots are retained.
- Ca
Cert stringIdentifier Specifies the identifier of the CA certificate for the DB instance.
- Db
Cluster stringIdentifier 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 stringArn The Amazon Resource Name (ARN) for the DB instance.
- Db
Instance stringClass Contains the name of the compute and memory capacity class of the DB instance.
- Db
Instance stringIdentifier - Db
Instance intPort Specifies the port that the DB instance listens on.
- Db
Name 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.
- Db
Parameter []stringGroups Provides the list of DB parameter groups applied to this DB instance.
- Db
Security []stringGroups Provides List of DB security groups associated to this DB instance.
- Db
Subnet stringGroup Specifies the name of the subnet group associated with the DB instance.
- Enabled
Cloudwatch []stringLogs Exports List of log types to export to cloudwatch.
- Endpoint string
The connection endpoint in
address:portformat.- Engine string
Provides the name of the database engine to be used for this DB instance.
- Engine
Version string Indicates the database engine version.
- Hosted
Zone stringId 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.
- Kms
Key stringId If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.
- License
Model string License model information for this DB instance.
- Master
Username string 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 stringArn 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 []stringMemberships Provides the list of option group memberships for this DB instance.
- Port int
The database port.
- Preferred
Backup stringWindow Specifies the daily time range during which automated backups are created.
- Preferred
Maintenance stringWindow 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 stringDb The identifier of the source DB that this is a replica of.
- Resource
Id string The RDS Resource ID of this instance.
- Storage
Encrypted bool Specifies whether the DB instance is encrypted.
- Storage
Type string Specifies the storage type associated with DB instance.
- map[string]string
- Timezone string
The time zone of the DB instance.
- Vpc
Security []stringGroups Provides a list of VPC security group elements that the DB instance belongs to.
- address string
The hostname of the RDS instance. See also
endpointandport.- allocated
Storage number Specifies the allocated storage size specified in gigabytes.
- auto
Minor booleanVersion Upgrade Indicates that minor version patches are applied automatically.
- availability
Zone string Specifies the name of the Availability Zone the DB instance is located in.
- backup
Retention numberPeriod Specifies the number of days for which automatic DB snapshots are retained.
- ca
Cert stringIdentifier Specifies the identifier of the CA certificate for the DB instance.
- db
Cluster stringIdentifier 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 stringArn The Amazon Resource Name (ARN) for the DB instance.
- db
Instance stringClass Contains the name of the compute and memory capacity class of the DB instance.
- db
Instance stringIdentifier - db
Instance numberPort Specifies the port that the DB instance listens on.
- db
Name 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.
- db
Parameter string[]Groups Provides the list of DB parameter groups applied to this DB instance.
- db
Security string[]Groups Provides List of DB security groups associated to this DB instance.
- db
Subnet stringGroup Specifies the name of the subnet group associated with the DB instance.
- enabled
Cloudwatch string[]Logs Exports List of log types to export to cloudwatch.
- endpoint string
The connection endpoint in
address:portformat.- engine string
Provides the name of the database engine to be used for this DB instance.
- engine
Version string Indicates the database engine version.
- hosted
Zone stringId 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.
- kms
Key stringId If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.
- license
Model string License model information for this DB instance.
- master
Username string Contains the master username for the DB instance.
- monitoring
Interval number The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- monitoring
Role stringArn The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.
- multi
Az boolean Specifies if the DB instance is a Multi-AZ deployment.
- option
Group string[]Memberships Provides the list of option group memberships for this DB instance.
- port number
The database port.
- preferred
Backup stringWindow Specifies the daily time range during which automated backups are created.
- preferred
Maintenance stringWindow Specifies the weekly time range during which system maintenance can occur in UTC.
- publicly
Accessible boolean Specifies the accessibility options for the DB instance.
- replicate
Source stringDb The identifier of the source DB that this is a replica of.
- resource
Id string The RDS Resource ID of this instance.
- storage
Encrypted boolean Specifies whether the DB instance is encrypted.
- storage
Type string Specifies the storage type associated with DB instance.
- {[key: string]: string}
- timezone string
The time zone of the DB instance.
- vpc
Security string[]Groups Provides a list of VPC security group elements that the DB instance belongs to.
- address str
The hostname of the RDS instance. See also
endpointandport.- allocated_
storage float Specifies the allocated storage size specified in gigabytes.
- auto_
minor_ boolversion_ upgrade 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_ floatperiod Specifies the number of days for which automatic DB snapshots are retained.
- ca_
cert_ stridentifier Specifies the identifier of the CA certificate for the DB instance.
- db_
cluster_ stridentifier 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_ strarn The Amazon Resource Name (ARN) for the DB instance.
- db_
instance_ strclass Contains the name of the compute and memory capacity class of the DB instance.
- db_
instance_ stridentifier - db_
instance_ floatport 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_ List[str]groups Provides the list of DB parameter groups applied to this DB instance.
- db_
security_ List[str]groups Provides List of DB security groups associated to this DB instance.
- db_
subnet_ strgroup Specifies the name of the subnet group associated with the DB instance.
- enabled_
cloudwatch_ List[str]logs_ exports List of log types to export to cloudwatch.
- endpoint str
The connection endpoint in
address:portformat.- 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_ strid 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 float
Specifies the Provisioned IOPS (I/O operations per second) value.
- kms_
key_ strid 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 float The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
- monitoring_
role_ strarn 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_ List[str]memberships Provides the list of option group memberships for this DB instance.
- port float
The database port.
- preferred_
backup_ strwindow Specifies the daily time range during which automated backups are created.
- preferred_
maintenance_ strwindow 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_ strdb 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.
- Dict[str, str]
- timezone str
The time zone of the DB instance.
- vpc_
security_ List[str]groups 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
awsTerraform Provider.