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

com.pulumi.gcp.firebase.kotlin.HostingRelease.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.firebase.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

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

    public var args: HostingReleaseArgs = HostingReleaseArgs()

    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 HostingReleaseArgsBuilder.() -> Unit) {
        val builder = HostingReleaseArgsBuilder()
        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(): HostingRelease {
        val builtJavaResource = com.pulumi.gcp.firebase.HostingRelease(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return HostingRelease(builtJavaResource)
    }
}

/**
 * ## Example Usage
 * ### Firebasehosting Release In Site
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.firebase.HostingSite("default", {
 *     project: "my-project-name",
 *     siteId: "site-id",
 * });
 * const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
 *     siteId: _default.siteId,
 *     config: {
 *         redirects: [{
 *             glob: "/google/**",
 *             statusCode: 302,
 *             location: "https://www.google.com",
 *         }],
 *     },
 * });
 * const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
 *     siteId: _default.siteId,
 *     versionName: defaultHostingVersion.name,
 *     message: "Test release",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.firebase.HostingSite("default",
 *     project="my-project-name",
 *     site_id="site-id")
 * default_hosting_version = gcp.firebase.HostingVersion("default",
 *     site_id=default.site_id,
 *     config=gcp.firebase.HostingVersionConfigArgs(
 *         redirects=[gcp.firebase.HostingVersionConfigRedirectArgs(
 *             glob="/google/**",
 *             status_code=302,
 *             location="https://www.google.com",
 *         )],
 *     ))
 * default_hosting_release = gcp.firebase.HostingRelease("default",
 *     site_id=default.site_id,
 *     version_name=default_hosting_version.name,
 *     message="Test release")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Firebase.HostingSite("default", new()
 *     {
 *         Project = "my-project-name",
 *         SiteId = "site-id",
 *     });
 *     var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
 *     {
 *         SiteId = @default.SiteId,
 *         Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
 *         {
 *             Redirects = new[]
 *             {
 *                 new Gcp.Firebase.Inputs.HostingVersionConfigRedirectArgs
 *                 {
 *                     Glob = "/google/**",
 *                     StatusCode = 302,
 *                     Location = "https://www.google.com",
 *                 },
 *             },
 *         },
 *     });
 *     var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
 *     {
 *         SiteId = @default.SiteId,
 *         VersionName = defaultHostingVersion.Name,
 *         Message = "Test release",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
 * 			Project: pulumi.String("my-project-name"),
 * 			SiteId:  pulumi.String("site-id"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
 * 			SiteId: _default.SiteId,
 * 			Config: &firebase.HostingVersionConfigArgs{
 * 				Redirects: firebase.HostingVersionConfigRedirectArray{
 * 					&firebase.HostingVersionConfigRedirectArgs{
 * 						Glob:       pulumi.String("/google/**"),
 * 						StatusCode: pulumi.Int(302),
 * 						Location:   pulumi.String("https://www.google.com"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
 * 			SiteId:      _default.SiteId,
 * 			VersionName: defaultHostingVersion.Name,
 * 			Message:     pulumi.String("Test release"),
 * 		})
 * 		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.gcp.firebase.HostingSite;
 * import com.pulumi.gcp.firebase.HostingSiteArgs;
 * import com.pulumi.gcp.firebase.HostingVersion;
 * import com.pulumi.gcp.firebase.HostingVersionArgs;
 * import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
 * import com.pulumi.gcp.firebase.HostingRelease;
 * import com.pulumi.gcp.firebase.HostingReleaseArgs;
 * 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 default_ = new HostingSite("default", HostingSiteArgs.builder()
 *             .project("my-project-name")
 *             .siteId("site-id")
 *             .build());
 *         var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
 *             .siteId(default_.siteId())
 *             .config(HostingVersionConfigArgs.builder()
 *                 .redirects(HostingVersionConfigRedirectArgs.builder()
 *                     .glob("/google/**")
 *                     .statusCode(302)
 *                     .location("https://www.google.com")
 *                     .build())
 *                 .build())
 *             .build());
 *         var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
 *             .siteId(default_.siteId())
 *             .versionName(defaultHostingVersion.name())
 *             .message("Test release")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:firebase:HostingSite
 *     properties:
 *       project: my-project-name
 *       siteId: site-id
 *   defaultHostingVersion:
 *     type: gcp:firebase:HostingVersion
 *     name: default
 *     properties:
 *       siteId: ${default.siteId}
 *       config:
 *         redirects:
 *           - glob: /google/**
 *             statusCode: 302
 *             location: https://www.google.com
 *   defaultHostingRelease:
 *     type: gcp:firebase:HostingRelease
 *     name: default
 *     properties:
 *       siteId: ${default.siteId}
 *       versionName: ${defaultHostingVersion.name}
 *       message: Test release
 * ```
 * 
 * ### Firebasehosting Release In Channel
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.firebase.HostingSite("default", {
 *     project: "my-project-name",
 *     siteId: "site-with-channel",
 * });
 * const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
 *     siteId: _default.siteId,
 *     config: {
 *         redirects: [{
 *             glob: "/google/**",
 *             statusCode: 302,
 *             location: "https://www.google.com",
 *         }],
 *     },
 * });
 * const defaultHostingChannel = new gcp.firebase.HostingChannel("default", {
 *     siteId: _default.siteId,
 *     channelId: "channel-id",
 * });
 * const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
 *     siteId: _default.siteId,
 *     channelId: defaultHostingChannel.channelId,
 *     versionName: defaultHostingVersion.name,
 *     message: "Test release in channel",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.firebase.HostingSite("default",
 *     project="my-project-name",
 *     site_id="site-with-channel")
 * default_hosting_version = gcp.firebase.HostingVersion("default",
 *     site_id=default.site_id,
 *     config=gcp.firebase.HostingVersionConfigArgs(
 *         redirects=[gcp.firebase.HostingVersionConfigRedirectArgs(
 *             glob="/google/**",
 *             status_code=302,
 *             location="https://www.google.com",
 *         )],
 *     ))
 * default_hosting_channel = gcp.firebase.HostingChannel("default",
 *     site_id=default.site_id,
 *     channel_id="channel-id")
 * default_hosting_release = gcp.firebase.HostingRelease("default",
 *     site_id=default.site_id,
 *     channel_id=default_hosting_channel.channel_id,
 *     version_name=default_hosting_version.name,
 *     message="Test release in channel")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Firebase.HostingSite("default", new()
 *     {
 *         Project = "my-project-name",
 *         SiteId = "site-with-channel",
 *     });
 *     var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
 *     {
 *         SiteId = @default.SiteId,
 *         Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
 *         {
 *             Redirects = new[]
 *             {
 *                 new Gcp.Firebase.Inputs.HostingVersionConfigRedirectArgs
 *                 {
 *                     Glob = "/google/**",
 *                     StatusCode = 302,
 *                     Location = "https://www.google.com",
 *                 },
 *             },
 *         },
 *     });
 *     var defaultHostingChannel = new Gcp.Firebase.HostingChannel("default", new()
 *     {
 *         SiteId = @default.SiteId,
 *         ChannelId = "channel-id",
 *     });
 *     var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
 *     {
 *         SiteId = @default.SiteId,
 *         ChannelId = defaultHostingChannel.ChannelId,
 *         VersionName = defaultHostingVersion.Name,
 *         Message = "Test release in channel",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
 * 			Project: pulumi.String("my-project-name"),
 * 			SiteId:  pulumi.String("site-with-channel"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
 * 			SiteId: _default.SiteId,
 * 			Config: &firebase.HostingVersionConfigArgs{
 * 				Redirects: firebase.HostingVersionConfigRedirectArray{
 * 					&firebase.HostingVersionConfigRedirectArgs{
 * 						Glob:       pulumi.String("/google/**"),
 * 						StatusCode: pulumi.Int(302),
 * 						Location:   pulumi.String("https://www.google.com"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultHostingChannel, err := firebase.NewHostingChannel(ctx, "default", &firebase.HostingChannelArgs{
 * 			SiteId:    _default.SiteId,
 * 			ChannelId: pulumi.String("channel-id"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
 * 			SiteId:      _default.SiteId,
 * 			ChannelId:   defaultHostingChannel.ChannelId,
 * 			VersionName: defaultHostingVersion.Name,
 * 			Message:     pulumi.String("Test release in channel"),
 * 		})
 * 		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.gcp.firebase.HostingSite;
 * import com.pulumi.gcp.firebase.HostingSiteArgs;
 * import com.pulumi.gcp.firebase.HostingVersion;
 * import com.pulumi.gcp.firebase.HostingVersionArgs;
 * import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
 * import com.pulumi.gcp.firebase.HostingChannel;
 * import com.pulumi.gcp.firebase.HostingChannelArgs;
 * import com.pulumi.gcp.firebase.HostingRelease;
 * import com.pulumi.gcp.firebase.HostingReleaseArgs;
 * 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 default_ = new HostingSite("default", HostingSiteArgs.builder()
 *             .project("my-project-name")
 *             .siteId("site-with-channel")
 *             .build());
 *         var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
 *             .siteId(default_.siteId())
 *             .config(HostingVersionConfigArgs.builder()
 *                 .redirects(HostingVersionConfigRedirectArgs.builder()
 *                     .glob("/google/**")
 *                     .statusCode(302)
 *                     .location("https://www.google.com")
 *                     .build())
 *                 .build())
 *             .build());
 *         var defaultHostingChannel = new HostingChannel("defaultHostingChannel", HostingChannelArgs.builder()
 *             .siteId(default_.siteId())
 *             .channelId("channel-id")
 *             .build());
 *         var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
 *             .siteId(default_.siteId())
 *             .channelId(defaultHostingChannel.channelId())
 *             .versionName(defaultHostingVersion.name())
 *             .message("Test release in channel")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:firebase:HostingSite
 *     properties:
 *       project: my-project-name
 *       siteId: site-with-channel
 *   defaultHostingVersion:
 *     type: gcp:firebase:HostingVersion
 *     name: default
 *     properties:
 *       siteId: ${default.siteId}
 *       config:
 *         redirects:
 *           - glob: /google/**
 *             statusCode: 302
 *             location: https://www.google.com
 *   defaultHostingChannel:
 *     type: gcp:firebase:HostingChannel
 *     name: default
 *     properties:
 *       siteId: ${default.siteId}
 *       channelId: channel-id
 *   defaultHostingRelease:
 *     type: gcp:firebase:HostingRelease
 *     name: default
 *     properties:
 *       siteId: ${default.siteId}
 *       channelId: ${defaultHostingChannel.channelId}
 *       versionName: ${defaultHostingVersion.name}
 *       message: Test release in channel
 * ```
 * 
 * ### Firebasehosting Release Disable
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.firebase.HostingSite("default", {
 *     project: "my-project-name",
 *     siteId: "site-id",
 * });
 * const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
 *     siteId: _default.siteId,
 *     type: "SITE_DISABLE",
 *     message: "Take down site",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.firebase.HostingSite("default",
 *     project="my-project-name",
 *     site_id="site-id")
 * default_hosting_release = gcp.firebase.HostingRelease("default",
 *     site_id=default.site_id,
 *     type="SITE_DISABLE",
 *     message="Take down site")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Firebase.HostingSite("default", new()
 *     {
 *         Project = "my-project-name",
 *         SiteId = "site-id",
 *     });
 *     var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
 *     {
 *         SiteId = @default.SiteId,
 *         Type = "SITE_DISABLE",
 *         Message = "Take down site",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
 * 			Project: pulumi.String("my-project-name"),
 * 			SiteId:  pulumi.String("site-id"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
 * 			SiteId:  _default.SiteId,
 * 			Type:    pulumi.String("SITE_DISABLE"),
 * 			Message: pulumi.String("Take down site"),
 * 		})
 * 		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.gcp.firebase.HostingSite;
 * import com.pulumi.gcp.firebase.HostingSiteArgs;
 * import com.pulumi.gcp.firebase.HostingRelease;
 * import com.pulumi.gcp.firebase.HostingReleaseArgs;
 * 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 default_ = new HostingSite("default", HostingSiteArgs.builder()
 *             .project("my-project-name")
 *             .siteId("site-id")
 *             .build());
 *         var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
 *             .siteId(default_.siteId())
 *             .type("SITE_DISABLE")
 *             .message("Take down site")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:firebase:HostingSite
 *     properties:
 *       project: my-project-name
 *       siteId: site-id
 *   defaultHostingRelease:
 *     type: gcp:firebase:HostingRelease
 *     name: default
 *     properties:
 *       siteId: ${default.siteId}
 *       type: SITE_DISABLE
 *       message: Take down site
 * ```
 * 
 * ## Import
 * Release can be imported using any of these accepted formats:
 * * `sites/{{site_id}}/channels/{{channel_id}}/releases/{{release_id}}`
 * * `sites/{{site_id}}/releases/{{release_id}}`
 * * `{{site_id}}/{{channel_id}}/{{release_id}}`
 * * `{{site_id}}/{{release_id}}`
 * When using the `pulumi import` command, Release can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:firebase/hostingRelease:HostingRelease default sites/{{site_id}}/channels/{{channel_id}}/releases/{{release_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/hostingRelease:HostingRelease default sites/{{site_id}}/releases/{{release_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/hostingRelease:HostingRelease default {{site_id}}/{{channel_id}}/{{release_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:firebase/hostingRelease:HostingRelease default {{site_id}}/{{release_id}}
 * ```
 * */*/*/*/*/*/*/*/*/*/*/*/
 */
public class HostingRelease internal constructor(
    override val javaResource: com.pulumi.gcp.firebase.HostingRelease,
) : KotlinCustomResource(javaResource, HostingReleaseMapper) {
    /**
     * The ID of the channel to which the release belongs. If not provided, the release will
     * belong to the default "live" channel
     */
    public val channelId: Output?
        get() = javaResource.channelId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The deploy description when the release was created. The value can be up to 512 characters.
     */
    public val message: Output?
        get() = javaResource.message().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The unique identifier for the release, in either of the following formats:
     * sites/SITE_ID/releases/RELEASE_ID
     * sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The unique identifier for the Release.
     */
    public val releaseId: Output
        get() = javaResource.releaseId().applyValue({ args0 -> args0 })

    /**
     * Required. The ID of the site to which the release belongs.
     * - - -
     */
    public val siteId: Output
        get() = javaResource.siteId().applyValue({ args0 -> args0 })

    /**
     * The type of the release; indicates what happened to the content of the site. There is no need to specify
     * `DEPLOY` or `ROLLBACK` type if a `version_name` is provided.
     * DEPLOY: A version was uploaded to Firebase Hosting and released. Output only.
     * ROLLBACK: The release points back to a previously deployed version. Output only.
     * SITE_DISABLE: The release prevents the site from serving content. Firebase Hosting acts as if the site never existed
     * Possible values are: `DEPLOY`, `ROLLBACK`, `SITE_DISABLE`.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })

    /**
     * The unique identifier for a version, in the format: sites/SITE_ID/versions/VERSION_ID.
     * The content of the version specified will be actively displayed on the appropriate URL.
     * The Version must belong to the same site as in the `site_id`.
     * This parameter must be empty if the `type` of the release is `SITE_DISABLE`.
     */
    public val versionName: Output?
        get() = javaResource.versionName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object HostingReleaseMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.firebase.HostingRelease::class == javaResource::class

    override fun map(javaResource: Resource): HostingRelease = HostingRelease(
        javaResource as
            com.pulumi.gcp.firebase.HostingRelease,
    )
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy