gcp logo
Google Cloud Classic v6.52.0, Mar 22 23

gcp.firebase.HostingChannel

Import

Channel can be imported using any of these accepted formats

 $ pulumi import gcp:firebase/hostingChannel:HostingChannel default sites/{{site_id}}/channels/{{channel_id}}
 $ pulumi import gcp:firebase/hostingChannel:HostingChannel default {{site_id}}/{{channel_id}}

Example Usage

Firebasehosting Channel Basic

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var defaultHostingSite = new Gcp.Firebase.HostingSite("defaultHostingSite", new()
    {
        Project = "my-project-name",
        SiteId = "site-with-channel",
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

    var defaultHostingChannel = new Gcp.Firebase.HostingChannel("defaultHostingChannel", new()
    {
        SiteId = defaultHostingSite.SiteId,
        ChannelId = "channel-basic",
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultHostingSite, err := firebase.NewHostingSite(ctx, "defaultHostingSite", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-with-channel"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingChannel(ctx, "defaultHostingChannel", &firebase.HostingChannelArgs{
			SiteId:    defaultHostingSite.SiteId,
			ChannelId: pulumi.String("channel-basic"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
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 com.pulumi.resources.CustomResourceOptions;
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 defaultHostingSite = new HostingSite("defaultHostingSite", HostingSiteArgs.builder()        
            .project("my-project-name")
            .siteId("site-with-channel")
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var defaultHostingChannel = new HostingChannel("defaultHostingChannel", HostingChannelArgs.builder()        
            .siteId(defaultHostingSite.siteId())
            .channelId("channel-basic")
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

default_hosting_site = gcp.firebase.HostingSite("defaultHostingSite",
    project="my-project-name",
    site_id="site-with-channel",
    opts=pulumi.ResourceOptions(provider=google_beta))
default_hosting_channel = gcp.firebase.HostingChannel("defaultHostingChannel",
    site_id=default_hosting_site.site_id,
    channel_id="channel-basic",
    opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultHostingSite = new gcp.firebase.HostingSite("defaultHostingSite", {
    project: "my-project-name",
    siteId: "site-with-channel",
}, {
    provider: google_beta,
});
const defaultHostingChannel = new gcp.firebase.HostingChannel("defaultHostingChannel", {
    siteId: defaultHostingSite.siteId,
    channelId: "channel-basic",
}, {
    provider: google_beta,
});
resources:
  defaultHostingSite:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-with-channel
    options:
      provider: ${["google-beta"]}
  defaultHostingChannel:
    type: gcp:firebase:HostingChannel
    properties:
      siteId: ${defaultHostingSite.siteId}
      channelId: channel-basic
    options:
      provider: ${["google-beta"]}

Firebasehosting Channel Full

using System.Collections.Generic;
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",
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

    var full = new Gcp.Firebase.HostingChannel("full", new()
    {
        SiteId = @default.SiteId,
        ChannelId = "channel-full",
        Ttl = "86400s",
        RetainedReleaseCount = 20,
        Labels = 
        {
            { "some-key", "some-value" },
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/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"),
		}, pulumi.Provider(google_beta))
		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"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
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 com.pulumi.resources.CustomResourceOptions;
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(), CustomResourceOptions.builder()
                .provider(google_beta)
                .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(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-with-channel",
    opts=pulumi.ResourceOptions(provider=google_beta))
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",
    },
    opts=pulumi.ResourceOptions(provider=google_beta))
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",
}, {
    provider: google_beta,
});
const full = new gcp.firebase.HostingChannel("full", {
    siteId: _default.siteId,
    channelId: "channel-full",
    ttl: "86400s",
    retainedReleaseCount: 20,
    labels: {
        "some-key": "some-value",
    },
}, {
    provider: google_beta,
});
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-with-channel
    options:
      provider: ${["google-beta"]}
  full:
    type: gcp:firebase:HostingChannel
    properties:
      siteId: ${default.siteId}
      channelId: channel-full
      ttl: 86400s
      retainedReleaseCount: 20
      labels:
        some-key: some-value
    options:
      provider: ${["google-beta"]}

Create HostingChannel Resource

new HostingChannel(name: string, args: HostingChannelArgs, opts?: CustomResourceOptions);
@overload
def HostingChannel(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   channel_id: Optional[str] = None,
                   expire_time: Optional[str] = None,
                   labels: Optional[Mapping[str, str]] = None,
                   retained_release_count: Optional[int] = None,
                   site_id: Optional[str] = None,
                   ttl: Optional[str] = None)
@overload
def HostingChannel(resource_name: str,
                   args: HostingChannelArgs,
                   opts: Optional[ResourceOptions] = None)
func NewHostingChannel(ctx *Context, name string, args HostingChannelArgs, opts ...ResourceOption) (*HostingChannel, error)
public HostingChannel(string name, HostingChannelArgs args, CustomResourceOptions? opts = null)
public HostingChannel(String name, HostingChannelArgs args)
public HostingChannel(String name, HostingChannelArgs args, CustomResourceOptions options)
type: gcp:firebase:HostingChannel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args HostingChannelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args HostingChannelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HostingChannelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HostingChannelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args HostingChannelArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

HostingChannel Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The HostingChannel resource accepts the following input properties:

ChannelId string

Required. Immutable. A unique ID within the site that identifies the channel.

SiteId string

Required. The ID of the site in which to create this channel.

ExpireTime string

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

Labels Dictionary<string, string>

Text labels used for extra metadata and/or filtering

RetainedReleaseCount int

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

Ttl string

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

ChannelId string

Required. Immutable. A unique ID within the site that identifies the channel.

SiteId string

Required. The ID of the site in which to create this channel.

ExpireTime string

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

Labels map[string]string

Text labels used for extra metadata and/or filtering

RetainedReleaseCount int

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

Ttl string

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channelId String

Required. Immutable. A unique ID within the site that identifies the channel.

siteId String

Required. The ID of the site in which to create this channel.

expireTime String

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels Map<String,String>

Text labels used for extra metadata and/or filtering

retainedReleaseCount Integer

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

ttl String

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channelId string

Required. Immutable. A unique ID within the site that identifies the channel.

siteId string

Required. The ID of the site in which to create this channel.

expireTime string

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels {[key: string]: string}

Text labels used for extra metadata and/or filtering

retainedReleaseCount number

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

ttl string

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channel_id str

Required. Immutable. A unique ID within the site that identifies the channel.

site_id str

Required. The ID of the site in which to create this channel.

expire_time str

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels Mapping[str, str]

Text labels used for extra metadata and/or filtering

retained_release_count int

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

ttl str

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channelId String

Required. Immutable. A unique ID within the site that identifies the channel.

siteId String

Required. The ID of the site in which to create this channel.

expireTime String

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels Map<String>

Text labels used for extra metadata and/or filtering

retainedReleaseCount Number

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

ttl String

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

Outputs

All input properties are implicitly available as output properties. Additionally, the HostingChannel resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

Id string

The provider-assigned unique ID for this managed resource.

Name string

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

id String

The provider-assigned unique ID for this managed resource.

name String

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

id string

The provider-assigned unique ID for this managed resource.

name string

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

id str

The provider-assigned unique ID for this managed resource.

name str

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

id String

The provider-assigned unique ID for this managed resource.

name String

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

Look up Existing HostingChannel Resource

Get an existing HostingChannel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HostingChannelState, opts?: CustomResourceOptions): HostingChannel
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        channel_id: Optional[str] = None,
        expire_time: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        retained_release_count: Optional[int] = None,
        site_id: Optional[str] = None,
        ttl: Optional[str] = None) -> HostingChannel
func GetHostingChannel(ctx *Context, name string, id IDInput, state *HostingChannelState, opts ...ResourceOption) (*HostingChannel, error)
public static HostingChannel Get(string name, Input<string> id, HostingChannelState? state, CustomResourceOptions? opts = null)
public static HostingChannel get(String name, Output<String> id, HostingChannelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ChannelId string

Required. Immutable. A unique ID within the site that identifies the channel.

ExpireTime string

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

Labels Dictionary<string, string>

Text labels used for extra metadata and/or filtering

Name string

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

RetainedReleaseCount int

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

SiteId string

Required. The ID of the site in which to create this channel.

Ttl string

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

ChannelId string

Required. Immutable. A unique ID within the site that identifies the channel.

ExpireTime string

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

Labels map[string]string

Text labels used for extra metadata and/or filtering

Name string

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

RetainedReleaseCount int

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

SiteId string

Required. The ID of the site in which to create this channel.

Ttl string

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channelId String

Required. Immutable. A unique ID within the site that identifies the channel.

expireTime String

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels Map<String,String>

Text labels used for extra metadata and/or filtering

name String

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

retainedReleaseCount Integer

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

siteId String

Required. The ID of the site in which to create this channel.

ttl String

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channelId string

Required. Immutable. A unique ID within the site that identifies the channel.

expireTime string

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels {[key: string]: string}

Text labels used for extra metadata and/or filtering

name string

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

retainedReleaseCount number

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

siteId string

Required. The ID of the site in which to create this channel.

ttl string

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channel_id str

Required. Immutable. A unique ID within the site that identifies the channel.

expire_time str

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels Mapping[str, str]

Text labels used for extra metadata and/or filtering

name str

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

retained_release_count int

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

site_id str

Required. The ID of the site in which to create this channel.

ttl str

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

channelId String

Required. Immutable. A unique ID within the site that identifies the channel.

expireTime String

The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the ttl field.

labels Map<String>

Text labels used for extra metadata and/or filtering

name String

The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID

retainedReleaseCount Number

The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels.

siteId String

Required. The ID of the site in which to create this channel.

ttl String

Input only. A time-to-live for this channel. Sets expire_time to the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.