All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.compute.kotlin.CapacityReservationGroupArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.compute.kotlin

import com.pulumi.azure.compute.CapacityReservationGroupArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Capacity Reservation Group.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "West Europe",
 * });
 * const exampleCapacityReservationGroup = new azure.compute.CapacityReservationGroup("example", {
 *     name: "example-capacity-reservation-group",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="West Europe")
 * example_capacity_reservation_group = azure.compute.CapacityReservationGroup("example",
 *     name="example-capacity-reservation-group",
 *     resource_group_name=example.name,
 *     location=example.location)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-rg",
 *         Location = "West Europe",
 *     });
 *     var exampleCapacityReservationGroup = new Azure.Compute.CapacityReservationGroup("example", new()
 *     {
 *         Name = "example-capacity-reservation-group",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-rg"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewCapacityReservationGroup(ctx, "example", &compute.CapacityReservationGroupArgs{
 * 			Name:              pulumi.String("example-capacity-reservation-group"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.compute.CapacityReservationGroup;
 * import com.pulumi.azure.compute.CapacityReservationGroupArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-rg")
 *             .location("West Europe")
 *             .build());
 *         var exampleCapacityReservationGroup = new CapacityReservationGroup("exampleCapacityReservationGroup", CapacityReservationGroupArgs.builder()
 *             .name("example-capacity-reservation-group")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: West Europe
 *   exampleCapacityReservationGroup:
 *     type: azure:compute:CapacityReservationGroup
 *     name: example
 *     properties:
 *       name: example-capacity-reservation-group
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 * ```
 * 
 * ## Import
 * Capacity Reservation Groups can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:compute/capacityReservationGroup:CapacityReservationGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/capacityReservationGroups/capacityReservationGroup1
 * ```
 * @property location The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created.
 * @property name Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created.
 * @property resourceGroupName Specifies the name of the resource group the Capacity Reservation Group is located in. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 * @property zones Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created.
 */
public data class CapacityReservationGroupArgs(
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.CapacityReservationGroupArgs =
        com.pulumi.azure.compute.CapacityReservationGroupArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [CapacityReservationGroupArgs].
 */
@PulumiTagMarker
public class CapacityReservationGroupArgsBuilder internal constructor() {
    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created.
     */
    @JvmName("tyabmvoautlrctgx")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created.
     */
    @JvmName("ovfweelrujlcoupc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the name of the resource group the Capacity Reservation Group is located in. Changing this forces a new resource to be created.
     */
    @JvmName("rarhenitpaludomn")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("wjwtmuvejkybanrw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created.
     */
    @JvmName("verkxjpjsfrjvghm")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

    @JvmName("ekoyjtjmjurublrr")
    public suspend fun zones(vararg values: Output) {
        this.zones = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created.
     */
    @JvmName("rocrsnxpgappfwer")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created.
     */
    @JvmName("emuysxgudacirjay")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created.
     */
    @JvmName("aucumuvhnkwkgwtw")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the name of the resource group the Capacity Reservation Group is located in. Changing this forces a new resource to be created.
     */
    @JvmName("ttpixahtfyjeupnd")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("edhwyhcvybaiudwk")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("mivibpyviwqvnoyv")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created.
     */
    @JvmName("hhouyarpgldbxcws")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created.
     */
    @JvmName("xhgpyyskywxussuq")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): CapacityReservationGroupArgs = CapacityReservationGroupArgs(
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy