ReservedInstanceArgs

data class ReservedInstanceArgs(val instanceCount: Output<Int>? = null, val offeringId: Output<String>? = null, val reservationId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ReservedInstanceArgs>

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

Constructors

Link copied to clipboard
constructor(instanceCount: Output<Int>? = null, offeringId: Output<String>? = null, reservationId: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val instanceCount: Output<Int>? = null

Number of instances to reserve. Default value is 1.

Link copied to clipboard
val offeringId: Output<String>? = null

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 reservationId: Output<String>? = null

Customer-specified identifier to track this reservation.

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

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.

Functions

Link copied to clipboard
open override fun toJava(): ReservedInstanceArgs