@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
150 lines • 6.06 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoteConfigRemoteConfig = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* A RemoteConfig represents a Remote Config template.
*
* To get more information about RemoteConfig, see:
*
* * [API documentation](https://firebase.google.com/docs/reference/remote-config/rest/v1/projects/getRemoteConfig)
* * How-to Guides
* * [Remote Config Introduction](https://firebase.google.com/docs/remote-config)
*
* ## Example Usage
*
* ### Firebase Remote Config Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basic = new gcp.firebase.RemoteConfigRemoteConfig("basic", {
* conditions: [{
* name: "ios_en",
* expression: "device.os == 'ios' && device.country in ['us']",
* tagColor: "TEAL",
* }],
* parameters: [{
* parameterName: "welcome_message",
* description: "Welcome message",
* valueType: "STRING",
* defaultValue: {
* value: "Welcome to the App!",
* },
* conditionalValues: [{
* conditionName: "ios_en",
* value: "Welcome to the App on iOS!",
* }],
* }],
* parameterGroups: [{
* parameterGroupName: "group_a",
* description: "Parameter group A description",
* parameters: [{
* parameterName: "welcome_message_group",
* description: "Welcome message for group A",
* valueType: "STRING",
* defaultValue: {
* value: "Welcome Group A!",
* },
* conditionalValues: [{
* conditionName: "ios_en",
* value: "Welcome Group A on iOS!",
* }],
* }],
* }],
* });
* ```
*
* ## Import
*
* RemoteConfig can be imported using any of these accepted formats:
*
* * `projects/{{project}}/remoteConfig`
* * `{{project}}`
*
* When using the `pulumi import` command, RemoteConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:firebase/remoteConfigRemoteConfig:RemoteConfigRemoteConfig default projects/{{project}}/remoteConfig
* $ pulumi import gcp:firebase/remoteConfigRemoteConfig:RemoteConfigRemoteConfig default {{project}}
* ```
*/
class RemoteConfigRemoteConfig extends pulumi.CustomResource {
/**
* Get an existing RemoteConfigRemoteConfig 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, id, state, opts) {
return new RemoteConfigRemoteConfig(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:firebase/remoteConfigRemoteConfig:RemoteConfigRemoteConfig';
/**
* Returns true if the given object is an instance of RemoteConfigRemoteConfig. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === RemoteConfigRemoteConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["conditions"] = state?.conditions;
resourceInputs["name"] = state?.name;
resourceInputs["parameterGroups"] = state?.parameterGroups;
resourceInputs["parameters"] = state?.parameters;
resourceInputs["project"] = state?.project;
resourceInputs["versions"] = state?.versions;
}
else {
const args = argsOrState;
resourceInputs["conditions"] = args?.conditions;
resourceInputs["parameterGroups"] = args?.parameterGroups;
resourceInputs["parameters"] = args?.parameters;
resourceInputs["project"] = args?.project;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["versions"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RemoteConfigRemoteConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.RemoteConfigRemoteConfig = RemoteConfigRemoteConfig;
//# sourceMappingURL=remoteConfigRemoteConfig.js.map