ReservedInstance

class ReservedInstance : KotlinCustomResource

Manages an RDS DB Reserved Instance.

NOTE: Once created, a reservation is valid for the duration of the provided offering_id and cannot be deleted. Performing a destroy will only remove the resource from state. For more information see RDS Reserved Instances Documentation and PurchaseReservedDBInstancesOffering. NOTE: Due to the expense of testing this resource, we provide it as best effort. If you find it useful, and have the ability to help test or notice issues, consider reaching out to us on GitHub.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.RdsFunctions;
import com.pulumi.aws.rds.inputs.GetReservedInstanceOfferingArgs;
import com.pulumi.aws.rds.ReservedInstance;
import com.pulumi.aws.rds.ReservedInstanceArgs;
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 = RdsFunctions.getReservedInstanceOffering(GetReservedInstanceOfferingArgs.builder()
.dbInstanceClass("db.t2.micro")
.duration(31536000)
.multiAz(false)
.offeringType("All Upfront")
.productDescription("mysql")
.build());
var example = new ReservedInstance("example", ReservedInstanceArgs.builder()
.offeringId(test.applyValue(getReservedInstanceOfferingResult -> getReservedInstanceOfferingResult.offeringId()))
.reservationId("optionalCustomReservationID")
.instanceCount(3)
.build());
}
}

Import

RDS DB Instance Reservations can be imported using the instance_id, e.g.,

$ pulumi import aws:rds/reservedInstance:ReservedInstance reservation_instance CustomReservationID

Properties

Link copied to clipboard
val arn: Output<String>

ARN for the reserved DB instance.

Link copied to clipboard
val currencyCode: Output<String>

Currency code for the reserved DB instance.

Link copied to clipboard
val dbInstanceClass: Output<String>

DB instance class for the reserved DB instance.

Link copied to clipboard
val duration: Output<Int>

Duration of the reservation in seconds.

Link copied to clipboard
val fixedPrice: Output<Double>

Fixed price charged for this reserved DB instance.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceCount: Output<Int>?

Number of instances to reserve. Default value is 1.

Link copied to clipboard
val leaseId: Output<String>

Unique identifier for the lease associated with the reserved DB instance. Amazon Web Services Support might request the lease ID for an issue related to a reserved DB instance.

Link copied to clipboard
val multiAz: Output<Boolean>

Whether the reservation applies to Multi-AZ deployments.

Link copied to clipboard
val offeringId: Output<String>

ID of the Reserved DB instance offering to purchase. To determine an offering_id, see the aws.rds.getReservedInstanceOffering data source. The following arguments are optional:

Link copied to clipboard
val offeringType: Output<String>

Offering type of this reserved DB instance.

Link copied to clipboard

Description of the reserved DB instance.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Recurring price charged to run this reserved DB instance.

Link copied to clipboard
val reservationId: Output<String>?

Customer-specified identifier to track this reservation.

Link copied to clipboard
val startTime: Output<String>

Time the reservation started.

Link copied to clipboard
val state: Output<String>

State of the reserved DB instance.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of tags to assign to the DB reservation. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val usagePrice: Output<Double>

Hourly price charged for this reserved DB instance.