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

com.pulumi.azurenative.azurefleet.kotlin.Fleet.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.azurefleet.kotlin

import com.pulumi.azurenative.azurefleet.kotlin.outputs.ComputeProfileResponse
import com.pulumi.azurenative.azurefleet.kotlin.outputs.ManagedServiceIdentityResponse
import com.pulumi.azurenative.azurefleet.kotlin.outputs.PlanResponse
import com.pulumi.azurenative.azurefleet.kotlin.outputs.RegularPriorityProfileResponse
import com.pulumi.azurenative.azurefleet.kotlin.outputs.SpotPriorityProfileResponse
import com.pulumi.azurenative.azurefleet.kotlin.outputs.SystemDataResponse
import com.pulumi.azurenative.azurefleet.kotlin.outputs.VmSizeProfileResponse
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azurenative.azurefleet.kotlin.outputs.ComputeProfileResponse.Companion.toKotlin as computeProfileResponseToKotlin
import com.pulumi.azurenative.azurefleet.kotlin.outputs.ManagedServiceIdentityResponse.Companion.toKotlin as managedServiceIdentityResponseToKotlin
import com.pulumi.azurenative.azurefleet.kotlin.outputs.PlanResponse.Companion.toKotlin as planResponseToKotlin
import com.pulumi.azurenative.azurefleet.kotlin.outputs.RegularPriorityProfileResponse.Companion.toKotlin as regularPriorityProfileResponseToKotlin
import com.pulumi.azurenative.azurefleet.kotlin.outputs.SpotPriorityProfileResponse.Companion.toKotlin as spotPriorityProfileResponseToKotlin
import com.pulumi.azurenative.azurefleet.kotlin.outputs.SystemDataResponse.Companion.toKotlin as systemDataResponseToKotlin
import com.pulumi.azurenative.azurefleet.kotlin.outputs.VmSizeProfileResponse.Companion.toKotlin as vmSizeProfileResponseToKotlin

/**
 * Builder for [Fleet].
 */
@PulumiTagMarker
public class FleetResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: FleetArgs = FleetArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend FleetArgsBuilder.() -> Unit) {
        val builder = FleetArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Fleet {
        val builtJavaResource = com.pulumi.azurenative.azurefleet.Fleet(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Fleet(builtJavaResource)
    }
}

/**
 * An Compute Fleet resource
 * Azure REST API version: 2024-05-01-preview.
 * Other available API versions: 2023-11-01-preview.
 * ## Example Usage
 * ### Fleets_CreateOrUpdate_MinimumSet
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var fleet = new AzureNative.AzureFleet.Fleet("fleet", new()
 *     {
 *         ComputeProfile = new AzureNative.AzureFleet.Inputs.ComputeProfileArgs
 *         {
 *             BaseVirtualMachineProfile = new AzureNative.AzureFleet.Inputs.BaseVirtualMachineProfileArgs
 *             {
 *                 NetworkProfile = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetNetworkProfileArgs
 *                 {
 *                     NetworkApiVersion = "2022-07-01",
 *                     NetworkInterfaceConfigurations = new[]
 *                     {
 *                         new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetNetworkConfigurationArgs
 *                         {
 *                             Name = "vmNameTest",
 *                             Properties = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetNetworkConfigurationPropertiesArgs
 *                             {
 *                                 EnableAcceleratedNetworking = false,
 *                                 EnableIPForwarding = true,
 *                                 IpConfigurations = new[]
 *                                 {
 *                                     new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetIPConfigurationArgs
 *                                     {
 *                                         Name = "vmNameTest",
 *                                         Properties = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetIPConfigurationPropertiesArgs
 *                                         {
 *                                             LoadBalancerBackendAddressPools = new[]
 *                                             {
 *                                                 new AzureNative.AzureFleet.Inputs.SubResourceArgs
 *                                                 {
 *                                                     Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}",
 *                                                 },
 *                                             },
 *                                             Primary = true,
 *                                             Subnet = new AzureNative.AzureFleet.Inputs.ApiEntityReferenceArgs
 *                                             {
 *                                                 Id = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}",
 *                                             },
 *                                         },
 *                                     },
 *                                 },
 *                                 Primary = true,
 *                             },
 *                         },
 *                     },
 *                 },
 *                 OsProfile = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetOSProfileArgs
 *                 {
 *                     AdminPassword = "TestPassword$0",
 *                     AdminUsername = "azureuser",
 *                     ComputerNamePrefix = "prefix",
 *                     LinuxConfiguration = new AzureNative.AzureFleet.Inputs.LinuxConfigurationArgs
 *                     {
 *                         DisablePasswordAuthentication = false,
 *                     },
 *                 },
 *                 StorageProfile = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetStorageProfileArgs
 *                 {
 *                     ImageReference = new AzureNative.AzureFleet.Inputs.ImageReferenceArgs
 *                     {
 *                         Offer = "0001-com-ubuntu-server-focal",
 *                         Publisher = "canonical",
 *                         Sku = "20_04-lts-gen2",
 *                         Version = "latest",
 *                     },
 *                     OsDisk = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetOSDiskArgs
 *                     {
 *                         Caching = AzureNative.AzureFleet.CachingTypes.ReadWrite,
 *                         CreateOption = AzureNative.AzureFleet.DiskCreateOptionTypes.FromImage,
 *                         ManagedDisk = new AzureNative.AzureFleet.Inputs.VirtualMachineScaleSetManagedDiskParametersArgs
 *                         {
 *                             StorageAccountType = AzureNative.AzureFleet.StorageAccountTypes.Standard_LRS,
 *                         },
 *                         OsType = AzureNative.AzureFleet.OperatingSystemTypes.Linux,
 *                     },
 *                 },
 *             },
 *             ComputeApiVersion = "2023-09-01",
 *             PlatformFaultDomainCount = 1,
 *         },
 *         FleetName = "testFleet",
 *         Location = "eastus2euap",
 *         RegularPriorityProfile = new AzureNative.AzureFleet.Inputs.RegularPriorityProfileArgs
 *         {
 *             AllocationStrategy = AzureNative.AzureFleet.RegularPriorityAllocationStrategy.LowestPrice,
 *             Capacity = 2,
 *             MinCapacity = 1,
 *         },
 *         ResourceGroupName = "rgazurefleet",
 *         SpotPriorityProfile = new AzureNative.AzureFleet.Inputs.SpotPriorityProfileArgs
 *         {
 *             AllocationStrategy = AzureNative.AzureFleet.SpotAllocationStrategy.PriceCapacityOptimized,
 *             Capacity = 2,
 *             EvictionPolicy = AzureNative.AzureFleet.EvictionPolicy.Delete,
 *             Maintain = true,
 *             MinCapacity = 1,
 *         },
 *         Tags =
 *         {
 *             { "key", "fleets-test" },
 *         },
 *         VmSizesProfile = new[]
 *         {
 *             new AzureNative.AzureFleet.Inputs.VmSizeProfileArgs
 *             {
 *                 Name = "Standard_D2s_v3",
 *             },
 *             new AzureNative.AzureFleet.Inputs.VmSizeProfileArgs
 *             {
 *                 Name = "Standard_D4s_v3",
 *             },
 *             new AzureNative.AzureFleet.Inputs.VmSizeProfileArgs
 *             {
 *                 Name = "Standard_E2s_v3",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurefleet "github.com/pulumi/pulumi-azure-native-sdk/azurefleet/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurefleet.NewFleet(ctx, "fleet", &azurefleet.FleetArgs{
 * 			ComputeProfile: &azurefleet.ComputeProfileArgs{
 * 				BaseVirtualMachineProfile: &azurefleet.BaseVirtualMachineProfileArgs{
 * 					NetworkProfile: &azurefleet.VirtualMachineScaleSetNetworkProfileArgs{
 * 						NetworkApiVersion: pulumi.String("2022-07-01"),
 * 						NetworkInterfaceConfigurations: azurefleet.VirtualMachineScaleSetNetworkConfigurationArray{
 * 							&azurefleet.VirtualMachineScaleSetNetworkConfigurationArgs{
 * 								Name: pulumi.String("vmNameTest"),
 * 								Properties: &azurefleet.VirtualMachineScaleSetNetworkConfigurationPropertiesArgs{
 * 									EnableAcceleratedNetworking: pulumi.Bool(false),
 * 									EnableIPForwarding:          pulumi.Bool(true),
 * 									IpConfigurations: azurefleet.VirtualMachineScaleSetIPConfigurationArray{
 * 										&azurefleet.VirtualMachineScaleSetIPConfigurationArgs{
 * 											Name: pulumi.String("vmNameTest"),
 * 											Properties: &azurefleet.VirtualMachineScaleSetIPConfigurationPropertiesArgs{
 * 												LoadBalancerBackendAddressPools: azurefleet.SubResourceArray{
 * 													&azurefleet.SubResourceArgs{
 * 														Id: pulumi.String("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"),
 * 													},
 * 												},
 * 												Primary: pulumi.Bool(true),
 * 												Subnet: &azurefleet.ApiEntityReferenceArgs{
 * 													Id: pulumi.String("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"),
 * 												},
 * 											},
 * 										},
 * 									},
 * 									Primary: pulumi.Bool(true),
 * 								},
 * 							},
 * 						},
 * 					},
 * 					OsProfile: &azurefleet.VirtualMachineScaleSetOSProfileArgs{
 * 						AdminPassword:      pulumi.String("TestPassword$0"),
 * 						AdminUsername:      pulumi.String("azureuser"),
 * 						ComputerNamePrefix: pulumi.String("prefix"),
 * 						LinuxConfiguration: &azurefleet.LinuxConfigurationArgs{
 * 							DisablePasswordAuthentication: pulumi.Bool(false),
 * 						},
 * 					},
 * 					StorageProfile: &azurefleet.VirtualMachineScaleSetStorageProfileArgs{
 * 						ImageReference: &azurefleet.ImageReferenceArgs{
 * 							Offer:     pulumi.String("0001-com-ubuntu-server-focal"),
 * 							Publisher: pulumi.String("canonical"),
 * 							Sku:       pulumi.String("20_04-lts-gen2"),
 * 							Version:   pulumi.String("latest"),
 * 						},
 * 						OsDisk: &azurefleet.VirtualMachineScaleSetOSDiskArgs{
 * 							Caching:      pulumi.String(azurefleet.CachingTypesReadWrite),
 * 							CreateOption: pulumi.String(azurefleet.DiskCreateOptionTypesFromImage),
 * 							ManagedDisk: &azurefleet.VirtualMachineScaleSetManagedDiskParametersArgs{
 * 								StorageAccountType: pulumi.String(azurefleet.StorageAccountTypes_Standard_LRS),
 * 							},
 * 							OsType: pulumi.String(azurefleet.OperatingSystemTypesLinux),
 * 						},
 * 					},
 * 				},
 * 				ComputeApiVersion:        pulumi.String("2023-09-01"),
 * 				PlatformFaultDomainCount: pulumi.Int(1),
 * 			},
 * 			FleetName: pulumi.String("testFleet"),
 * 			Location:  pulumi.String("eastus2euap"),
 * 			RegularPriorityProfile: &azurefleet.RegularPriorityProfileArgs{
 * 				AllocationStrategy: pulumi.String(azurefleet.RegularPriorityAllocationStrategyLowestPrice),
 * 				Capacity:           pulumi.Int(2),
 * 				MinCapacity:        pulumi.Int(1),
 * 			},
 * 			ResourceGroupName: pulumi.String("rgazurefleet"),
 * 			SpotPriorityProfile: &azurefleet.SpotPriorityProfileArgs{
 * 				AllocationStrategy: pulumi.String(azurefleet.SpotAllocationStrategyPriceCapacityOptimized),
 * 				Capacity:           pulumi.Int(2),
 * 				EvictionPolicy:     pulumi.String(azurefleet.EvictionPolicyDelete),
 * 				Maintain:           pulumi.Bool(true),
 * 				MinCapacity:        pulumi.Int(1),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"key": pulumi.String("fleets-test"),
 * 			},
 * 			VmSizesProfile: azurefleet.VmSizeProfileArray{
 * 				&azurefleet.VmSizeProfileArgs{
 * 					Name: pulumi.String("Standard_D2s_v3"),
 * 				},
 * 				&azurefleet.VmSizeProfileArgs{
 * 					Name: pulumi.String("Standard_D4s_v3"),
 * 				},
 * 				&azurefleet.VmSizeProfileArgs{
 * 					Name: pulumi.String("Standard_E2s_v3"),
 * 				},
 * 			},
 * 		})
 * 		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.azurenative.azurefleet.Fleet;
 * import com.pulumi.azurenative.azurefleet.FleetArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.ComputeProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.BaseVirtualMachineProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.VirtualMachineScaleSetNetworkProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.VirtualMachineScaleSetOSProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.LinuxConfigurationArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.VirtualMachineScaleSetStorageProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.ImageReferenceArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.VirtualMachineScaleSetOSDiskArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.VirtualMachineScaleSetManagedDiskParametersArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.RegularPriorityProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.SpotPriorityProfileArgs;
 * import com.pulumi.azurenative.azurefleet.inputs.VmSizeProfileArgs;
 * 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 fleet = new Fleet("fleet", FleetArgs.builder()
 *             .computeProfile(ComputeProfileArgs.builder()
 *                 .baseVirtualMachineProfile(BaseVirtualMachineProfileArgs.builder()
 *                     .networkProfile(VirtualMachineScaleSetNetworkProfileArgs.builder()
 *                         .networkApiVersion("2022-07-01")
 *                         .networkInterfaceConfigurations(VirtualMachineScaleSetNetworkConfigurationArgs.builder()
 *                             .name("vmNameTest")
 *                             .properties(VirtualMachineScaleSetNetworkConfigurationPropertiesArgs.builder()
 *                                 .enableAcceleratedNetworking(false)
 *                                 .enableIPForwarding(true)
 *                                 .ipConfigurations(VirtualMachineScaleSetIPConfigurationArgs.builder()
 *                                     .name("vmNameTest")
 *                                     .properties(VirtualMachineScaleSetIPConfigurationPropertiesArgs.builder()
 *                                         .loadBalancerBackendAddressPools(SubResourceArgs.builder()
 *                                             .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}")
 *                                             .build())
 *                                         .primary(true)
 *                                         .subnet(ApiEntityReferenceArgs.builder()
 *                                             .id("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")
 *                                             .build())
 *                                         .build())
 *                                     .build())
 *                                 .primary(true)
 *                                 .build())
 *                             .build())
 *                         .build())
 *                     .osProfile(VirtualMachineScaleSetOSProfileArgs.builder()
 *                         .adminPassword("TestPassword$0")
 *                         .adminUsername("azureuser")
 *                         .computerNamePrefix("prefix")
 *                         .linuxConfiguration(LinuxConfigurationArgs.builder()
 *                             .disablePasswordAuthentication(false)
 *                             .build())
 *                         .build())
 *                     .storageProfile(VirtualMachineScaleSetStorageProfileArgs.builder()
 *                         .imageReference(ImageReferenceArgs.builder()
 *                             .offer("0001-com-ubuntu-server-focal")
 *                             .publisher("canonical")
 *                             .sku("20_04-lts-gen2")
 *                             .version("latest")
 *                             .build())
 *                         .osDisk(VirtualMachineScaleSetOSDiskArgs.builder()
 *                             .caching("ReadWrite")
 *                             .createOption("FromImage")
 *                             .managedDisk(VirtualMachineScaleSetManagedDiskParametersArgs.builder()
 *                                 .storageAccountType("Standard_LRS")
 *                                 .build())
 *                             .osType("Linux")
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .computeApiVersion("2023-09-01")
 *                 .platformFaultDomainCount(1)
 *                 .build())
 *             .fleetName("testFleet")
 *             .location("eastus2euap")
 *             .regularPriorityProfile(RegularPriorityProfileArgs.builder()
 *                 .allocationStrategy("LowestPrice")
 *                 .capacity(2)
 *                 .minCapacity(1)
 *                 .build())
 *             .resourceGroupName("rgazurefleet")
 *             .spotPriorityProfile(SpotPriorityProfileArgs.builder()
 *                 .allocationStrategy("PriceCapacityOptimized")
 *                 .capacity(2)
 *                 .evictionPolicy("Delete")
 *                 .maintain(true)
 *                 .minCapacity(1)
 *                 .build())
 *             .tags(Map.of("key", "fleets-test"))
 *             .vmSizesProfile(
 *                 VmSizeProfileArgs.builder()
 *                     .name("Standard_D2s_v3")
 *                     .build(),
 *                 VmSizeProfileArgs.builder()
 *                     .name("Standard_D4s_v3")
 *                     .build(),
 *                 VmSizeProfileArgs.builder()
 *                     .name("Standard_E2s_v3")
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:azurefleet:Fleet testFleet /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}
 * ```
 */
public class Fleet internal constructor(
    override val javaResource: com.pulumi.azurenative.azurefleet.Fleet,
) : KotlinCustomResource(javaResource, FleetMapper) {
    /**
     * Compute Profile to use for running user's workloads.
     */
    public val computeProfile: Output
        get() = javaResource.computeProfile().applyValue({ args0 ->
            args0.let({ args0 ->
                computeProfileResponseToKotlin(args0)
            })
        })

    /**
     * The managed service identities assigned to this resource.
     */
    public val identity: Output?
        get() = javaResource.identity().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    managedServiceIdentityResponseToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The geo-location where the resource lives
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The name of the resource
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Details of the resource plan.
     */
    public val plan: Output?
        get() = javaResource.plan().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    planResponseToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The status of the last operation.
     */
    public val provisioningState: Output
        get() = javaResource.provisioningState().applyValue({ args0 -> args0 })

    /**
     * Configuration Options for Regular instances in Compute Fleet.
     */
    public val regularPriorityProfile: Output?
        get() = javaResource.regularPriorityProfile().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> regularPriorityProfileResponseToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Configuration Options for Spot instances in Compute Fleet.
     */
    public val spotPriorityProfile: Output?
        get() = javaResource.spotPriorityProfile().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> spotPriorityProfileResponseToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    public val systemData: Output
        get() = javaResource.systemData().applyValue({ args0 ->
            args0.let({ args0 ->
                systemDataResponseToKotlin(args0)
            })
        })

    /**
     * Resource tags.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Specifies the time at which the Compute Fleet is created.
     */
    public val timeCreated: Output
        get() = javaResource.timeCreated().applyValue({ args0 -> args0 })

    /**
     * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })

    /**
     * Specifies the ID which uniquely identifies a Compute Fleet.
     */
    public val uniqueId: Output
        get() = javaResource.uniqueId().applyValue({ args0 -> args0 })

    /**
     * List of VM sizes supported for Compute Fleet
     */
    public val vmSizesProfile: Output>
        get() = javaResource.vmSizesProfile().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> vmSizeProfileResponseToKotlin(args0) })
            })
        })

    /**
     * Zones in which the Compute Fleet is available
     */
    public val zones: Output>?
        get() = javaResource.zones().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0
                })
            }).orElse(null)
        })
}

public object FleetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azurenative.azurefleet.Fleet::class == javaResource::class

    override fun map(javaResource: Resource): Fleet = Fleet(
        javaResource as
            com.pulumi.azurenative.azurefleet.Fleet,
    )
}

/**
 * @see [Fleet].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Fleet].
 */
public suspend fun fleet(name: String, block: suspend FleetResourceBuilder.() -> Unit): Fleet {
    val builder = FleetResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Fleet].
 * @param name The _unique_ name of the resulting resource.
 */
public fun fleet(name: String): Fleet {
    val builder = FleetResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy