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

com.pulumi.azure.compute.kotlin.SharedImageVersionArgs.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.SharedImageVersionArgs.builder
import com.pulumi.azure.compute.kotlin.inputs.SharedImageVersionTargetRegionArgs
import com.pulumi.azure.compute.kotlin.inputs.SharedImageVersionTargetRegionArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Version of a Shared Image within a Shared Image Gallery.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const existing = azure.compute.getImage({
 *     name: "search-api",
 *     resourceGroupName: "packerimages",
 * });
 * const existingGetSharedImage = azure.compute.getSharedImage({
 *     name: "existing-image",
 *     galleryName: "existing_gallery",
 *     resourceGroupName: "existing-resources",
 * });
 * const example = new azure.compute.SharedImageVersion("example", {
 *     name: "0.0.1",
 *     galleryName: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.galleryName),
 *     imageName: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.name),
 *     resourceGroupName: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.resourceGroupName),
 *     location: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.location),
 *     managedImageId: existing.then(existing => existing.id),
 *     targetRegions: [{
 *         name: existingGetSharedImage.then(existingGetSharedImage => existingGetSharedImage.location),
 *         regionalReplicaCount: 5,
 *         storageAccountType: "Standard_LRS",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * existing = azure.compute.get_image(name="search-api",
 *     resource_group_name="packerimages")
 * existing_get_shared_image = azure.compute.get_shared_image(name="existing-image",
 *     gallery_name="existing_gallery",
 *     resource_group_name="existing-resources")
 * example = azure.compute.SharedImageVersion("example",
 *     name="0.0.1",
 *     gallery_name=existing_get_shared_image.gallery_name,
 *     image_name=existing_get_shared_image.name,
 *     resource_group_name=existing_get_shared_image.resource_group_name,
 *     location=existing_get_shared_image.location,
 *     managed_image_id=existing.id,
 *     target_regions=[azure.compute.SharedImageVersionTargetRegionArgs(
 *         name=existing_get_shared_image.location,
 *         regional_replica_count=5,
 *         storage_account_type="Standard_LRS",
 *     )])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var existing = Azure.Compute.GetImage.Invoke(new()
 *     {
 *         Name = "search-api",
 *         ResourceGroupName = "packerimages",
 *     });
 *     var existingGetSharedImage = Azure.Compute.GetSharedImage.Invoke(new()
 *     {
 *         Name = "existing-image",
 *         GalleryName = "existing_gallery",
 *         ResourceGroupName = "existing-resources",
 *     });
 *     var example = new Azure.Compute.SharedImageVersion("example", new()
 *     {
 *         Name = "0.0.1",
 *         GalleryName = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.GalleryName),
 *         ImageName = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.Name),
 *         ResourceGroupName = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.ResourceGroupName),
 *         Location = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.Location),
 *         ManagedImageId = existing.Apply(getImageResult => getImageResult.Id),
 *         TargetRegions = new[]
 *         {
 *             new Azure.Compute.Inputs.SharedImageVersionTargetRegionArgs
 *             {
 *                 Name = existingGetSharedImage.Apply(getSharedImageResult => getSharedImageResult.Location),
 *                 RegionalReplicaCount = 5,
 *                 StorageAccountType = "Standard_LRS",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		existing, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
 * 			Name:              pulumi.StringRef("search-api"),
 * 			ResourceGroupName: "packerimages",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		existingGetSharedImage, err := compute.LookupSharedImage(ctx, &compute.LookupSharedImageArgs{
 * 			Name:              "existing-image",
 * 			GalleryName:       "existing_gallery",
 * 			ResourceGroupName: "existing-resources",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewSharedImageVersion(ctx, "example", &compute.SharedImageVersionArgs{
 * 			Name:              pulumi.String("0.0.1"),
 * 			GalleryName:       pulumi.String(existingGetSharedImage.GalleryName),
 * 			ImageName:         pulumi.String(existingGetSharedImage.Name),
 * 			ResourceGroupName: pulumi.String(existingGetSharedImage.ResourceGroupName),
 * 			Location:          pulumi.String(existingGetSharedImage.Location),
 * 			ManagedImageId:    pulumi.String(existing.Id),
 * 			TargetRegions: compute.SharedImageVersionTargetRegionArray{
 * 				&compute.SharedImageVersionTargetRegionArgs{
 * 					Name:                 pulumi.String(existingGetSharedImage.Location),
 * 					RegionalReplicaCount: pulumi.Int(5),
 * 					StorageAccountType:   pulumi.String("Standard_LRS"),
 * 				},
 * 			},
 * 		})
 * 		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.compute.ComputeFunctions;
 * import com.pulumi.azure.compute.inputs.GetImageArgs;
 * import com.pulumi.azure.compute.inputs.GetSharedImageArgs;
 * import com.pulumi.azure.compute.SharedImageVersion;
 * import com.pulumi.azure.compute.SharedImageVersionArgs;
 * import com.pulumi.azure.compute.inputs.SharedImageVersionTargetRegionArgs;
 * 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 existing = ComputeFunctions.getImage(GetImageArgs.builder()
 *             .name("search-api")
 *             .resourceGroupName("packerimages")
 *             .build());
 *         final var existingGetSharedImage = ComputeFunctions.getSharedImage(GetSharedImageArgs.builder()
 *             .name("existing-image")
 *             .galleryName("existing_gallery")
 *             .resourceGroupName("existing-resources")
 *             .build());
 *         var example = new SharedImageVersion("example", SharedImageVersionArgs.builder()
 *             .name("0.0.1")
 *             .galleryName(existingGetSharedImage.applyValue(getSharedImageResult -> getSharedImageResult.galleryName()))
 *             .imageName(existingGetSharedImage.applyValue(getSharedImageResult -> getSharedImageResult.name()))
 *             .resourceGroupName(existingGetSharedImage.applyValue(getSharedImageResult -> getSharedImageResult.resourceGroupName()))
 *             .location(existingGetSharedImage.applyValue(getSharedImageResult -> getSharedImageResult.location()))
 *             .managedImageId(existing.applyValue(getImageResult -> getImageResult.id()))
 *             .targetRegions(SharedImageVersionTargetRegionArgs.builder()
 *                 .name(existingGetSharedImage.applyValue(getSharedImageResult -> getSharedImageResult.location()))
 *                 .regionalReplicaCount(5)
 *                 .storageAccountType("Standard_LRS")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:compute:SharedImageVersion
 *     properties:
 *       name: 0.0.1
 *       galleryName: ${existingGetSharedImage.galleryName}
 *       imageName: ${existingGetSharedImage.name}
 *       resourceGroupName: ${existingGetSharedImage.resourceGroupName}
 *       location: ${existingGetSharedImage.location}
 *       managedImageId: ${existing.id}
 *       targetRegions:
 *         - name: ${existingGetSharedImage.location}
 *           regionalReplicaCount: 5
 *           storageAccountType: Standard_LRS
 * variables:
 *   existing:
 *     fn::invoke:
 *       Function: azure:compute:getImage
 *       Arguments:
 *         name: search-api
 *         resourceGroupName: packerimages
 *   existingGetSharedImage:
 *     fn::invoke:
 *       Function: azure:compute:getSharedImage
 *       Arguments:
 *         name: existing-image
 *         galleryName: existing_gallery
 *         resourceGroupName: existing-resources
 * ```
 * 
 * ## Import
 * Shared Image Versions can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:compute/sharedImageVersion:SharedImageVersion version /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/images/image1/versions/1.2.3
 * ```
 * @property blobUri URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created.
 * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
 * > **NOTE:** `blob_uri` and `storage_account_id` must be specified together
 * @property deletionOfReplicatedLocationsEnabled Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created.
 * @property endOfLifeDate The end of life date in RFC3339 format of the Image Version.
 * @property excludeFromLatest Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`.
 * @property galleryName The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created.
 * @property imageName The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created.
 * @property location The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
 * @property managedImageId The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created.
 * > **NOTE:** The ID can be sourced from the `azure.compute.Image` data source or resource
 * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
 * @property name The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created.
 * @property osDiskSnapshotId The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created.
 * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
 * @property replicationMode Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
 * @property storageAccountId The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created.
 * > **NOTE:** `blob_uri` and `storage_account_id` must be specified together
 * @property tags A collection of tags which should be applied to this resource.
 * @property targetRegions One or more `target_region` blocks as documented below.
 */
public data class SharedImageVersionArgs(
    public val blobUri: Output? = null,
    public val deletionOfReplicatedLocationsEnabled: Output? = null,
    public val endOfLifeDate: Output? = null,
    public val excludeFromLatest: Output? = null,
    public val galleryName: Output? = null,
    public val imageName: Output? = null,
    public val location: Output? = null,
    public val managedImageId: Output? = null,
    public val name: Output? = null,
    public val osDiskSnapshotId: Output? = null,
    public val replicationMode: Output? = null,
    public val resourceGroupName: Output? = null,
    public val storageAccountId: Output? = null,
    public val tags: Output>? = null,
    public val targetRegions: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.SharedImageVersionArgs =
        com.pulumi.azure.compute.SharedImageVersionArgs.builder()
            .blobUri(blobUri?.applyValue({ args0 -> args0 }))
            .deletionOfReplicatedLocationsEnabled(
                deletionOfReplicatedLocationsEnabled?.applyValue({ args0 ->
                    args0
                }),
            )
            .endOfLifeDate(endOfLifeDate?.applyValue({ args0 -> args0 }))
            .excludeFromLatest(excludeFromLatest?.applyValue({ args0 -> args0 }))
            .galleryName(galleryName?.applyValue({ args0 -> args0 }))
            .imageName(imageName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .managedImageId(managedImageId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .osDiskSnapshotId(osDiskSnapshotId?.applyValue({ args0 -> args0 }))
            .replicationMode(replicationMode?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .storageAccountId(storageAccountId?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .targetRegions(
                targetRegions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [SharedImageVersionArgs].
 */
@PulumiTagMarker
public class SharedImageVersionArgsBuilder internal constructor() {
    private var blobUri: Output? = null

    private var deletionOfReplicatedLocationsEnabled: Output? = null

    private var endOfLifeDate: Output? = null

    private var excludeFromLatest: Output? = null

    private var galleryName: Output? = null

    private var imageName: Output? = null

    private var location: Output? = null

    private var managedImageId: Output? = null

    private var name: Output? = null

    private var osDiskSnapshotId: Output? = null

    private var replicationMode: Output? = null

    private var resourceGroupName: Output? = null

    private var storageAccountId: Output? = null

    private var tags: Output>? = null

    private var targetRegions: Output>? = null

    /**
     * @param value URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created.
     * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
     * > **NOTE:** `blob_uri` and `storage_account_id` must be specified together
     */
    @JvmName("byysxptsxakxvvst")
    public suspend fun blobUri(`value`: Output) {
        this.blobUri = value
    }

    /**
     * @param value Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created.
     */
    @JvmName("stvmugfrnjifgymu")
    public suspend fun deletionOfReplicatedLocationsEnabled(`value`: Output) {
        this.deletionOfReplicatedLocationsEnabled = value
    }

    /**
     * @param value The end of life date in RFC3339 format of the Image Version.
     */
    @JvmName("nicxdjgpgaltxmoo")
    public suspend fun endOfLifeDate(`value`: Output) {
        this.endOfLifeDate = value
    }

    /**
     * @param value Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`.
     */
    @JvmName("vrtiemcdfxcknffp")
    public suspend fun excludeFromLatest(`value`: Output) {
        this.excludeFromLatest = value
    }

    /**
     * @param value The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created.
     */
    @JvmName("nefukcmmaxkstkij")
    public suspend fun galleryName(`value`: Output) {
        this.galleryName = value
    }

    /**
     * @param value The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created.
     */
    @JvmName("uihvcxauvufxrvgm")
    public suspend fun imageName(`value`: Output) {
        this.imageName = value
    }

    /**
     * @param value The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
     */
    @JvmName("gataenexbfxccwfn")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created.
     * > **NOTE:** The ID can be sourced from the `azure.compute.Image` data source or resource
     * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
     */
    @JvmName("pksptiuuexjtytrn")
    public suspend fun managedImageId(`value`: Output) {
        this.managedImageId = value
    }

    /**
     * @param value The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created.
     */
    @JvmName("qcqeqfojlgoneikl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created.
     * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
     */
    @JvmName("qluojgusmhcjbwuh")
    public suspend fun osDiskSnapshotId(`value`: Output) {
        this.osDiskSnapshotId = value
    }

    /**
     * @param value Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created.
     */
    @JvmName("svhgfcvdnflforxf")
    public suspend fun replicationMode(`value`: Output) {
        this.replicationMode = value
    }

    /**
     * @param value The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
     */
    @JvmName("uhdnjdgbxfblofgf")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created.
     * > **NOTE:** `blob_uri` and `storage_account_id` must be specified together
     */
    @JvmName("fnfvohlasapryhuk")
    public suspend fun storageAccountId(`value`: Output) {
        this.storageAccountId = value
    }

    /**
     * @param value A collection of tags which should be applied to this resource.
     */
    @JvmName("lluvsgbqcgpjmqbp")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value One or more `target_region` blocks as documented below.
     */
    @JvmName("rqfjhytqkwxjhepp")
    public suspend fun targetRegions(`value`: Output>) {
        this.targetRegions = value
    }

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

    /**
     * @param values One or more `target_region` blocks as documented below.
     */
    @JvmName("mrjywsprcjedbtrn")
    public suspend fun targetRegions(values: List>) {
        this.targetRegions = Output.all(values)
    }

    /**
     * @param value URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created.
     * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
     * > **NOTE:** `blob_uri` and `storage_account_id` must be specified together
     */
    @JvmName("isnwnfyoidfxhyxf")
    public suspend fun blobUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blobUri = mapped
    }

    /**
     * @param value Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created.
     */
    @JvmName("dfejwxvbtahqgjsu")
    public suspend fun deletionOfReplicatedLocationsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deletionOfReplicatedLocationsEnabled = mapped
    }

    /**
     * @param value The end of life date in RFC3339 format of the Image Version.
     */
    @JvmName("woqgnkhtjmequghp")
    public suspend fun endOfLifeDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endOfLifeDate = mapped
    }

    /**
     * @param value Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`.
     */
    @JvmName("rqurkkfeelfhqwak")
    public suspend fun excludeFromLatest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeFromLatest = mapped
    }

    /**
     * @param value The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created.
     */
    @JvmName("kaupkpgbtovjkvgn")
    public suspend fun galleryName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.galleryName = mapped
    }

    /**
     * @param value The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created.
     */
    @JvmName("glcgdavtclntkndl")
    public suspend fun imageName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageName = mapped
    }

    /**
     * @param value The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
     */
    @JvmName("gwqyyqwctuqplcod")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created.
     * > **NOTE:** The ID can be sourced from the `azure.compute.Image` data source or resource
     * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
     */
    @JvmName("lfixjhjrgybseksu")
    public suspend fun managedImageId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedImageId = mapped
    }

    /**
     * @param value The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created.
     */
    @JvmName("kgflmmccwjasvaht")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created.
     * > **NOTE:** You must specify exact one of `blob_uri`, `managed_image_id` and `os_disk_snapshot_id`.
     */
    @JvmName("qywxilttiyrgomul")
    public suspend fun osDiskSnapshotId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osDiskSnapshotId = mapped
    }

    /**
     * @param value Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created.
     */
    @JvmName("yghdbiahtvrswcix")
    public suspend fun replicationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicationMode = mapped
    }

    /**
     * @param value The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created.
     */
    @JvmName("wbjmtkavwnecluxa")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created.
     * > **NOTE:** `blob_uri` and `storage_account_id` must be specified together
     */
    @JvmName("epaxhsbpfvrfvbst")
    public suspend fun storageAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountId = mapped
    }

    /**
     * @param value A collection of tags which should be applied to this resource.
     */
    @JvmName("csafxmufmijdnxig")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A collection of tags which should be applied to this resource.
     */
    @JvmName("msmtiiaibpufmiwt")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value One or more `target_region` blocks as documented below.
     */
    @JvmName("nissskffvuawhmev")
    public suspend fun targetRegions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetRegions = mapped
    }

    /**
     * @param argument One or more `target_region` blocks as documented below.
     */
    @JvmName("wtbuekssqkuwblrk")
    public suspend
    fun targetRegions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SharedImageVersionTargetRegionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetRegions = mapped
    }

    /**
     * @param argument One or more `target_region` blocks as documented below.
     */
    @JvmName("girrccplvkvqfdxn")
    public suspend fun targetRegions(
        vararg
        argument: suspend SharedImageVersionTargetRegionArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            SharedImageVersionTargetRegionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.targetRegions = mapped
    }

    /**
     * @param argument One or more `target_region` blocks as documented below.
     */
    @JvmName("tliigjywixtutgqc")
    public suspend
    fun targetRegions(argument: suspend SharedImageVersionTargetRegionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SharedImageVersionTargetRegionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.targetRegions = mapped
    }

    /**
     * @param values One or more `target_region` blocks as documented below.
     */
    @JvmName("hvvnexflwieqsegb")
    public suspend fun targetRegions(vararg values: SharedImageVersionTargetRegionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetRegions = mapped
    }

    internal fun build(): SharedImageVersionArgs = SharedImageVersionArgs(
        blobUri = blobUri,
        deletionOfReplicatedLocationsEnabled = deletionOfReplicatedLocationsEnabled,
        endOfLifeDate = endOfLifeDate,
        excludeFromLatest = excludeFromLatest,
        galleryName = galleryName,
        imageName = imageName,
        location = location,
        managedImageId = managedImageId,
        name = name,
        osDiskSnapshotId = osDiskSnapshotId,
        replicationMode = replicationMode,
        resourceGroupName = resourceGroupName,
        storageAccountId = storageAccountId,
        tags = tags,
        targetRegions = targetRegions,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy