UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

239 lines (238 loc) • 9.27 kB
import * as pulumi from "@pulumi/pulumi"; /** * A `Channel` represents a stream of releases for a site. All sites have a default * `live` channel that serves content to the Firebase-provided subdomains and any * connected custom domains. * * To get more information about Channel, see: * * * [API documentation](https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels) * * How-to Guides * * [Official Documentation](https://firebase.google.com/docs/hosting) * * ## 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", * }); * ``` * ### 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", * }, * }); * ``` * * ## 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}} * ``` */ export declare class HostingChannel extends pulumi.CustomResource { /** * Get an existing HostingChannel resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: HostingChannelState, opts?: pulumi.CustomResourceOptions): HostingChannel; /** * Returns true if the given object is an instance of HostingChannel. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is HostingChannel; /** * Required. Immutable. A unique ID within the site that identifies the channel. */ readonly channelId: pulumi.Output<string>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: 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. */ readonly expireTime: pulumi.Output<string>; /** * Text labels used for extra metadata and/or filtering * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The fully-qualified resource name for the channel, in the format: * sites/SITE_ID/channels/CHANNEL_ID */ readonly name: pulumi.Output<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * 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. */ readonly retainedReleaseCount: pulumi.Output<number>; /** * Required. The ID of the site in which to create this channel. */ readonly siteId: pulumi.Output<string>; /** * Input only. A time-to-live for this channel. Sets `expireTime` 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). */ readonly ttl: pulumi.Output<string | undefined>; /** * Create a HostingChannel resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: HostingChannelArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering HostingChannel resources. */ export interface HostingChannelState { /** * Required. Immutable. A unique ID within the site that identifies the channel. */ channelId?: pulumi.Input<string>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input<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. */ expireTime?: pulumi.Input<string>; /** * Text labels used for extra metadata and/or filtering * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The fully-qualified resource name for the channel, in the format: * sites/SITE_ID/channels/CHANNEL_ID */ name?: pulumi.Input<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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. */ retainedReleaseCount?: pulumi.Input<number>; /** * Required. The ID of the site in which to create this channel. */ siteId?: pulumi.Input<string>; /** * Input only. A time-to-live for this channel. Sets `expireTime` 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). */ ttl?: pulumi.Input<string>; } /** * The set of arguments for constructing a HostingChannel resource. */ export interface HostingChannelArgs { /** * Required. Immutable. A unique ID within the site that identifies the channel. */ channelId: pulumi.Input<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. */ expireTime?: pulumi.Input<string>; /** * Text labels used for extra metadata and/or filtering * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * 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. */ retainedReleaseCount?: pulumi.Input<number>; /** * Required. The ID of the site in which to create this channel. */ siteId: pulumi.Input<string>; /** * Input only. A time-to-live for this channel. Sets `expireTime` 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). */ ttl?: pulumi.Input<string>; }