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

com.pulumi.azure.compute.kotlin.SharedImageGalleryArgs.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.SharedImageGalleryArgs.builder
import com.pulumi.azure.compute.kotlin.inputs.SharedImageGallerySharingArgs
import com.pulumi.azure.compute.kotlin.inputs.SharedImageGallerySharingArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Shared Image Gallery.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleSharedImageGallery = new azure.compute.SharedImageGallery("example", {
 *     name: "example_image_gallery",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     description: "Shared images and things.",
 *     tags: {
 *         Hello: "There",
 *         World: "Example",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_shared_image_gallery = azure.compute.SharedImageGallery("example",
 *     name="example_image_gallery",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     description="Shared images and things.",
 *     tags={
 *         "Hello": "There",
 *         "World": "Example",
 *     })
 * ```
 * ```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-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleSharedImageGallery = new Azure.Compute.SharedImageGallery("example", new()
 *     {
 *         Name = "example_image_gallery",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Description = "Shared images and things.",
 *         Tags =
 *         {
 *             { "Hello", "There" },
 *             { "World", "Example" },
 *         },
 *     });
 * });
 * ```
 * ```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-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewSharedImageGallery(ctx, "example", &compute.SharedImageGalleryArgs{
 * 			Name:              pulumi.String("example_image_gallery"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			Description:       pulumi.String("Shared images and things."),
 * 			Tags: pulumi.StringMap{
 * 				"Hello": pulumi.String("There"),
 * 				"World": pulumi.String("Example"),
 * 			},
 * 		})
 * 		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.SharedImageGallery;
 * import com.pulumi.azure.compute.SharedImageGalleryArgs;
 * 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-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleSharedImageGallery = new SharedImageGallery("exampleSharedImageGallery", SharedImageGalleryArgs.builder()
 *             .name("example_image_gallery")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .description("Shared images and things.")
 *             .tags(Map.ofEntries(
 *                 Map.entry("Hello", "There"),
 *                 Map.entry("World", "Example")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleSharedImageGallery:
 *     type: azure:compute:SharedImageGallery
 *     name: example
 *     properties:
 *       name: example_image_gallery
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       description: Shared images and things.
 *       tags:
 *         Hello: There
 *         World: Example
 * ```
 * 
 * ## Import
 * Shared Image Galleries can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:compute/sharedImageGallery:SharedImageGallery gallery1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1
 * ```
 * @property description A description for this Shared Image Gallery.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property name Specifies the name of the Shared Image Gallery. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which to create the Shared Image Gallery. Changing this forces a new resource to be created.
 * @property sharing A `sharing` block as defined below. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the Shared Image Gallery.
 */
public data class SharedImageGalleryArgs(
    public val description: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sharing: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.SharedImageGalleryArgs =
        com.pulumi.azure.compute.SharedImageGalleryArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sharing(sharing?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [SharedImageGalleryArgs].
 */
@PulumiTagMarker
public class SharedImageGalleryArgsBuilder internal constructor() {
    private var description: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var sharing: Output? = null

    private var tags: Output>? = null

    /**
     * @param value A description for this Shared Image Gallery.
     */
    @JvmName("nuccrctaptfgwlxl")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

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

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

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

    /**
     * @param value A `sharing` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("dfjfquoevslvpoje")
    public suspend fun sharing(`value`: Output) {
        this.sharing = value
    }

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

    /**
     * @param value A description for this Shared Image Gallery.
     */
    @JvmName("qqooevsxuajbdptb")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("adkddjigkkvegwuf")
    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 the Shared Image Gallery. Changing this forces a new resource to be created.
     */
    @JvmName("jxjnvhobrwmycnwa")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

    /**
     * @param value A `sharing` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("iitwxqiocrrpsiii")
    public suspend fun sharing(`value`: SharedImageGallerySharingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sharing = mapped
    }

    /**
     * @param argument A `sharing` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("kjalpmmxrtolafde")
    public suspend fun sharing(argument: suspend SharedImageGallerySharingArgsBuilder.() -> Unit) {
        val toBeMapped = SharedImageGallerySharingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sharing = mapped
    }

    /**
     * @param value A mapping of tags to assign to the Shared Image Gallery.
     */
    @JvmName("knoebkcdlhjeitki")
    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 Shared Image Gallery.
     */
    @JvmName("mfuogentakovxffj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): SharedImageGalleryArgs = SharedImageGalleryArgs(
        description = description,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        sharing = sharing,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy