@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
94 lines • 3.88 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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaiduChannel = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Pinpoint Baidu Channel resource.
*
* > **Note:** All arguments including the Api Key and Secret Key will be stored in the raw state as plain-text.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const app = new aws.pinpoint.App("app", {});
* const channel = new aws.pinpoint.BaiduChannel("channel", {
* applicationId: app.applicationId,
* apiKey: "",
* secretKey: "",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Pinpoint Baidu Channel using the `application-id`. For example:
*
* ```sh
* $ pulumi import aws:pinpoint/baiduChannel:BaiduChannel channel application-id
* ```
*/
class BaiduChannel extends pulumi.CustomResource {
/**
* Get an existing BaiduChannel 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 BaiduChannel(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of BaiduChannel. 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'] === BaiduChannel.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["apiKey"] = state?.apiKey;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["region"] = state?.region;
resourceInputs["secretKey"] = state?.secretKey;
}
else {
const args = argsOrState;
if (args?.apiKey === undefined && !opts.urn) {
throw new Error("Missing required property 'apiKey'");
}
if (args?.applicationId === undefined && !opts.urn) {
throw new Error("Missing required property 'applicationId'");
}
if (args?.secretKey === undefined && !opts.urn) {
throw new Error("Missing required property 'secretKey'");
}
resourceInputs["apiKey"] = args?.apiKey ? pulumi.secret(args.apiKey) : undefined;
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["region"] = args?.region;
resourceInputs["secretKey"] = args?.secretKey ? pulumi.secret(args.secretKey) : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["apiKey", "secretKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(BaiduChannel.__pulumiType, name, resourceInputs, opts);
}
}
exports.BaiduChannel = BaiduChannel;
/** @internal */
BaiduChannel.__pulumiType = 'aws:pinpoint/baiduChannel:BaiduChannel';
//# sourceMappingURL=baiduChannel.js.map