Expand description
Manages a Capacity Reservation within a Capacity Reservation Group.
§Example Usage
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let example = resource_group::create(
"example",
ResourceGroupArgs::builder()
.location("West Europe")
.name("example-rg")
.build_struct(),
);
let exampleCapacityReservation = capacity_reservation::create(
"exampleCapacityReservation",
CapacityReservationArgs::builder()
.capacity_reservation_group_id("${exampleCapacityReservationGroup.id}")
.name("example-capacity-reservation")
.sku(
CapacityReservationSku::builder()
.capacity(1)
.name("Standard_D2s_v3")
.build_struct(),
)
.build_struct(),
);
let exampleCapacityReservationGroup = capacity_reservation_group::create(
"exampleCapacityReservationGroup",
CapacityReservationGroupArgs::builder()
.location("${example.location}")
.name("example-capacity-reservation-group")
.resource_group_name("${example.name}")
.build_struct(),
);
}
§Import
Capacity Reservations can be imported using the resource id
, e.g.
$ pulumi import azure:compute/capacityReservation:CapacityReservation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/capacityReservationGroups/capacityReservationGroup1/capacityReservations/capacityReservation1
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments