Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.compute.kotlin.GalleryApplication.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.compute.kotlin
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.Map
/**
* Builder for [GalleryApplication].
*/
@PulumiTagMarker
public class GalleryApplicationResourceBuilder internal constructor() {
public var name: String? = null
public var args: GalleryApplicationArgs = GalleryApplicationArgs()
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 GalleryApplicationArgsBuilder.() -> Unit) {
val builder = GalleryApplicationArgsBuilder()
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(): GalleryApplication {
val builtJavaResource = com.pulumi.azure.compute.GalleryApplication(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return GalleryApplication(builtJavaResource)
}
}
/**
* Manages a Gallery Application.
* ## 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 exampleSharedImageGallery = new azure.compute.SharedImageGallery("example", {
* name: "examplegallery",
* resourceGroupName: example.name,
* location: example.location,
* });
* const exampleGalleryApplication = new azure.compute.GalleryApplication("example", {
* name: "example-app",
* galleryId: exampleSharedImageGallery.id,
* location: example.location,
* supportedOsType: "Linux",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-rg",
* location="West Europe")
* example_shared_image_gallery = azure.compute.SharedImageGallery("example",
* name="examplegallery",
* resource_group_name=example.name,
* location=example.location)
* example_gallery_application = azure.compute.GalleryApplication("example",
* name="example-app",
* gallery_id=example_shared_image_gallery.id,
* location=example.location,
* supported_os_type="Linux")
* ```
* ```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 exampleSharedImageGallery = new Azure.Compute.SharedImageGallery("example", new()
* {
* Name = "examplegallery",
* ResourceGroupName = example.Name,
* Location = example.Location,
* });
* var exampleGalleryApplication = new Azure.Compute.GalleryApplication("example", new()
* {
* Name = "example-app",
* GalleryId = exampleSharedImageGallery.Id,
* Location = example.Location,
* SupportedOsType = "Linux",
* });
* });
* ```
* ```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
* }
* exampleSharedImageGallery, err := compute.NewSharedImageGallery(ctx, "example", &compute.SharedImageGalleryArgs{
* Name: pulumi.String("examplegallery"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* })
* if err != nil {
* return err
* }
* _, err = compute.NewGalleryApplication(ctx, "example", &compute.GalleryApplicationArgs{
* Name: pulumi.String("example-app"),
* GalleryId: exampleSharedImageGallery.ID(),
* Location: example.Location,
* SupportedOsType: pulumi.String("Linux"),
* })
* 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 com.pulumi.azure.compute.GalleryApplication;
* import com.pulumi.azure.compute.GalleryApplicationArgs;
* 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 exampleSharedImageGallery = new SharedImageGallery("exampleSharedImageGallery", SharedImageGalleryArgs.builder()
* .name("examplegallery")
* .resourceGroupName(example.name())
* .location(example.location())
* .build());
* var exampleGalleryApplication = new GalleryApplication("exampleGalleryApplication", GalleryApplicationArgs.builder()
* .name("example-app")
* .galleryId(exampleSharedImageGallery.id())
* .location(example.location())
* .supportedOsType("Linux")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-rg
* location: West Europe
* exampleSharedImageGallery:
* type: azure:compute:SharedImageGallery
* name: example
* properties:
* name: examplegallery
* resourceGroupName: ${example.name}
* location: ${example.location}
* exampleGalleryApplication:
* type: azure:compute:GalleryApplication
* name: example
* properties:
* name: example-app
* galleryId: ${exampleSharedImageGallery.id}
* location: ${example.location}
* supportedOsType: Linux
* ```
*
* ## Import
* Gallery Applications can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:compute/galleryApplication:GalleryApplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1
* ```
*/
public class GalleryApplication internal constructor(
override val javaResource: com.pulumi.azure.compute.GalleryApplication,
) : KotlinCustomResource(javaResource, GalleryApplicationMapper) {
/**
* A description of the Gallery Application.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The end of life date in RFC3339 format of the Gallery Application.
*/
public val endOfLifeDate: Output?
get() = javaResource.endOfLifeDate().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The End User Licence Agreement of the Gallery Application.
*/
public val eula: Output?
get() = javaResource.eula().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ID of the Shared Image Gallery. Changing this forces a new resource to be created.
*/
public val galleryId: Output
get() = javaResource.galleryId().applyValue({ args0 -> args0 })
/**
* The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of the Gallery Application. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The URI containing the Privacy Statement associated with the Gallery Application.
*/
public val privacyStatementUri: Output?
get() = javaResource.privacyStatementUri().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The URI containing the Release Notes associated with the Gallery Application.
*/
public val releaseNoteUri: Output?
get() = javaResource.releaseNoteUri().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created.
*/
public val supportedOsType: Output
get() = javaResource.supportedOsType().applyValue({ args0 -> args0 })
/**
* A mapping of tags to assign to the Gallery Application.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
}
public object GalleryApplicationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.compute.GalleryApplication::class == javaResource::class
override fun map(javaResource: Resource): GalleryApplication = GalleryApplication(
javaResource as
com.pulumi.azure.compute.GalleryApplication,
)
}
/**
* @see [GalleryApplication].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [GalleryApplication].
*/
public suspend fun galleryApplication(
name: String,
block: suspend GalleryApplicationResourceBuilder.() -> Unit,
): GalleryApplication {
val builder = GalleryApplicationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [GalleryApplication].
* @param name The _unique_ name of the resulting resource.
*/
public fun galleryApplication(name: String): GalleryApplication {
val builder = GalleryApplicationResourceBuilder()
builder.name(name)
return builder.build()
}