com.pulumi.gcp.firebase.kotlin.HostingChannel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [HostingChannel].
*/
@PulumiTagMarker
public class HostingChannelResourceBuilder internal constructor() {
public var name: String? = null
public var args: HostingChannelArgs = HostingChannelArgs()
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 HostingChannelArgsBuilder.() -> Unit) {
val builder = HostingChannelArgsBuilder()
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(): HostingChannel {
val builtJavaResource = com.pulumi.gcp.firebase.HostingChannel(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return HostingChannel(builtJavaResource)
}
}
/**
* ## Example Usage
* ### Firebasehosting Channel Basic
*
* ```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 defaultHostingChannel = new gcp.firebase.HostingChannel("default", {
* siteId: _default.siteId,
* channelId: "channel-basic",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.firebase.HostingSite("default",
* project="my-project-name",
* site_id="site-with-channel")
* default_hosting_channel = gcp.firebase.HostingChannel("default",
* site_id=default.site_id,
* channel_id="channel-basic")
* ```
* ```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 defaultHostingChannel = new Gcp.Firebase.HostingChannel("default", new()
* {
* SiteId = @default.SiteId,
* ChannelId = "channel-basic",
* });
* });
* ```
* ```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
* }
* _, err = firebase.NewHostingChannel(ctx, "default", &firebase.HostingChannelArgs{
* SiteId: _default.SiteId,
* ChannelId: pulumi.String("channel-basic"),
* })
* 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.HostingChannel;
* import com.pulumi.gcp.firebase.HostingChannelArgs;
* 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 defaultHostingChannel = new HostingChannel("defaultHostingChannel", HostingChannelArgs.builder()
* .siteId(default_.siteId())
* .channelId("channel-basic")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:firebase:HostingSite
* properties:
* project: my-project-name
* siteId: site-with-channel
* defaultHostingChannel:
* type: gcp:firebase:HostingChannel
* name: default
* properties:
* siteId: ${default.siteId}
* channelId: channel-basic
* ```
*
* ### Firebasehosting Channel Full
*
* ```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 full = new gcp.firebase.HostingChannel("full", {
* siteId: _default.siteId,
* channelId: "channel-full",
* ttl: "86400s",
* retainedReleaseCount: 20,
* labels: {
* "some-key": "some-value",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.firebase.HostingSite("default",
* project="my-project-name",
* site_id="site-with-channel")
* full = gcp.firebase.HostingChannel("full",
* site_id=default.site_id,
* channel_id="channel-full",
* ttl="86400s",
* retained_release_count=20,
* labels={
* "some-key": "some-value",
* })
* ```
* ```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 full = new Gcp.Firebase.HostingChannel("full", new()
* {
* SiteId = @default.SiteId,
* ChannelId = "channel-full",
* Ttl = "86400s",
* RetainedReleaseCount = 20,
* Labels =
* {
* { "some-key", "some-value" },
* },
* });
* });
* ```
* ```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
* }
* _, err = firebase.NewHostingChannel(ctx, "full", &firebase.HostingChannelArgs{
* SiteId: _default.SiteId,
* ChannelId: pulumi.String("channel-full"),
* Ttl: pulumi.String("86400s"),
* RetainedReleaseCount: pulumi.Int(20),
* Labels: pulumi.StringMap{
* "some-key": pulumi.String("some-value"),
* },
* })
* 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.HostingChannel;
* import com.pulumi.gcp.firebase.HostingChannelArgs;
* 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 full = new HostingChannel("full", HostingChannelArgs.builder()
* .siteId(default_.siteId())
* .channelId("channel-full")
* .ttl("86400s")
* .retainedReleaseCount(20)
* .labels(Map.of("some-key", "some-value"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:firebase:HostingSite
* properties:
* project: my-project-name
* siteId: site-with-channel
* full:
* type: gcp:firebase:HostingChannel
* properties:
* siteId: ${default.siteId}
* channelId: channel-full
* ttl: 86400s
* retainedReleaseCount: 20
* labels:
* some-key: some-value
* ```
*
* ## Import
* Channel can be imported using any of these accepted formats:
* * `sites/{{site_id}}/channels/{{channel_id}}`
* * `{{site_id}}/{{channel_id}}`
* When using the `pulumi import` command, Channel can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:firebase/hostingChannel:HostingChannel default sites/{{site_id}}/channels/{{channel_id}}
* ```
* ```sh
* $ pulumi import gcp:firebase/hostingChannel:HostingChannel default {{site_id}}/{{channel_id}}
* ```
*/
public class HostingChannel internal constructor(
override val javaResource: com.pulumi.gcp.firebase.HostingChannel,
) : KotlinCustomResource(javaResource, HostingChannelMapper) {
/**
* Required. Immutable. A unique ID within the site that identifies the channel.
* - - -
*/
public val channelId: Output
get() = javaResource.channelId().applyValue({ args0 -> args0 })
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy