1. Packages
  2. AWS
  3. API Docs
  4. rds
  5. InstanceDesiredState
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

aws.rds.InstanceDesiredState

Explore with Pulumi AI

Resource for managing an AWS RDS (Relational Database) RDS Instance State.

Destruction of this resource is a no-op and will not modify the instance state

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.rds.InstanceDesiredState("test", {
    identifier: testAwsDbInstance.identifier,
    state: "available",
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.rds.InstanceDesiredState("test",
    identifier=test_aws_db_instance["identifier"],
    state="available")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rds.NewInstanceDesiredState(ctx, "test", &rds.InstanceDesiredStateArgs{
			Identifier: pulumi.Any(testAwsDbInstance.Identifier),
			State:      pulumi.String("available"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.Rds.InstanceDesiredState("test", new()
    {
        Identifier = testAwsDbInstance.Identifier,
        State = "available",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.InstanceDesiredState;
import com.pulumi.aws.rds.InstanceDesiredStateArgs;
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) {
        var test = new InstanceDesiredState("test", InstanceDesiredStateArgs.builder()
            .identifier(testAwsDbInstance.identifier())
            .state("available")
            .build());

    }
}
Copy
resources:
  test:
    type: aws:rds:InstanceDesiredState
    properties:
      identifier: ${testAwsDbInstance.identifier}
      state: available
Copy

Create InstanceDesiredState Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new InstanceDesiredState(name: string, args: InstanceDesiredStateArgs, opts?: CustomResourceOptions);
@overload
def InstanceDesiredState(resource_name: str,
                         args: InstanceDesiredStateArgs,
                         opts: Optional[ResourceOptions] = None)

@overload
def InstanceDesiredState(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         identifier: Optional[str] = None,
                         state: Optional[str] = None,
                         timeouts: Optional[InstanceDesiredStateTimeoutsArgs] = None)
func NewInstanceDesiredState(ctx *Context, name string, args InstanceDesiredStateArgs, opts ...ResourceOption) (*InstanceDesiredState, error)
public InstanceDesiredState(string name, InstanceDesiredStateArgs args, CustomResourceOptions? opts = null)
public InstanceDesiredState(String name, InstanceDesiredStateArgs args)
public InstanceDesiredState(String name, InstanceDesiredStateArgs args, CustomResourceOptions options)
type: aws:rds:InstanceDesiredState
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InstanceDesiredStateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InstanceDesiredStateArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceDesiredStateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceDesiredStateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InstanceDesiredStateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var instanceDesiredStateResource = new Aws.Rds.InstanceDesiredState("instanceDesiredStateResource", new()
{
    Identifier = "string",
    State = "string",
    Timeouts = new Aws.Rds.Inputs.InstanceDesiredStateTimeoutsArgs
    {
        Create = "string",
        Update = "string",
    },
});
Copy
example, err := rds.NewInstanceDesiredState(ctx, "instanceDesiredStateResource", &rds.InstanceDesiredStateArgs{
	Identifier: pulumi.String("string"),
	State:      pulumi.String("string"),
	Timeouts: &rds.InstanceDesiredStateTimeoutsArgs{
		Create: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var instanceDesiredStateResource = new InstanceDesiredState("instanceDesiredStateResource", InstanceDesiredStateArgs.builder()
    .identifier("string")
    .state("string")
    .timeouts(InstanceDesiredStateTimeoutsArgs.builder()
        .create("string")
        .update("string")
        .build())
    .build());
Copy
instance_desired_state_resource = aws.rds.InstanceDesiredState("instanceDesiredStateResource",
    identifier="string",
    state="string",
    timeouts={
        "create": "string",
        "update": "string",
    })
Copy
const instanceDesiredStateResource = new aws.rds.InstanceDesiredState("instanceDesiredStateResource", {
    identifier: "string",
    state: "string",
    timeouts: {
        create: "string",
        update: "string",
    },
});
Copy
type: aws:rds:InstanceDesiredState
properties:
    identifier: string
    state: string
    timeouts:
        create: string
        update: string
Copy

InstanceDesiredState Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The InstanceDesiredState resource accepts the following input properties:

Identifier This property is required. string
DB Instance Identifier
State This property is required. string
Configured state of the DB Instance. Valid values are available and stopped.
Timeouts InstanceDesiredStateTimeouts
Identifier This property is required. string
DB Instance Identifier
State This property is required. string
Configured state of the DB Instance. Valid values are available and stopped.
Timeouts InstanceDesiredStateTimeoutsArgs
identifier This property is required. String
DB Instance Identifier
state This property is required. String
Configured state of the DB Instance. Valid values are available and stopped.
timeouts InstanceDesiredStateTimeouts
identifier This property is required. string
DB Instance Identifier
state This property is required. string
Configured state of the DB Instance. Valid values are available and stopped.
timeouts InstanceDesiredStateTimeouts
identifier This property is required. str
DB Instance Identifier
state This property is required. str
Configured state of the DB Instance. Valid values are available and stopped.
timeouts InstanceDesiredStateTimeoutsArgs
identifier This property is required. String
DB Instance Identifier
state This property is required. String
Configured state of the DB Instance. Valid values are available and stopped.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the InstanceDesiredState resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing InstanceDesiredState Resource

Get an existing InstanceDesiredState resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InstanceDesiredStateState, opts?: CustomResourceOptions): InstanceDesiredState
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        identifier: Optional[str] = None,
        state: Optional[str] = None,
        timeouts: Optional[InstanceDesiredStateTimeoutsArgs] = None) -> InstanceDesiredState
func GetInstanceDesiredState(ctx *Context, name string, id IDInput, state *InstanceDesiredStateState, opts ...ResourceOption) (*InstanceDesiredState, error)
public static InstanceDesiredState Get(string name, Input<string> id, InstanceDesiredStateState? state, CustomResourceOptions? opts = null)
public static InstanceDesiredState get(String name, Output<String> id, InstanceDesiredStateState state, CustomResourceOptions options)
resources:  _:    type: aws:rds:InstanceDesiredState    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Identifier string
DB Instance Identifier
State string
Configured state of the DB Instance. Valid values are available and stopped.
Timeouts InstanceDesiredStateTimeouts
Identifier string
DB Instance Identifier
State string
Configured state of the DB Instance. Valid values are available and stopped.
Timeouts InstanceDesiredStateTimeoutsArgs
identifier String
DB Instance Identifier
state String
Configured state of the DB Instance. Valid values are available and stopped.
timeouts InstanceDesiredStateTimeouts
identifier string
DB Instance Identifier
state string
Configured state of the DB Instance. Valid values are available and stopped.
timeouts InstanceDesiredStateTimeouts
identifier str
DB Instance Identifier
state str
Configured state of the DB Instance. Valid values are available and stopped.
timeouts InstanceDesiredStateTimeoutsArgs
identifier String
DB Instance Identifier
state String
Configured state of the DB Instance. Valid values are available and stopped.
timeouts Property Map

Supporting Types

InstanceDesiredStateTimeouts
, InstanceDesiredStateTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Using pulumi import, import RDS (Relational Database) RDS Instance State using the example_id_arg. For example:

$ pulumi import aws:rds/instanceDesiredState:InstanceDesiredState example rds_instance_state-id-12345678
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.