@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
95 lines • 3.94 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.AdmChannel = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Pinpoint ADM (Amazon Device Messaging) Channel resource.
*
* > **Note:** All arguments including the Client ID and Client Secret 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.AdmChannel("channel", {
* applicationId: app.applicationId,
* clientId: "",
* clientSecret: "",
* enabled: true,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Pinpoint ADM Channel using the `application-id`. For example:
*
* ```sh
* $ pulumi import aws:pinpoint/admChannel:AdmChannel channel application-id
* ```
*/
class AdmChannel extends pulumi.CustomResource {
/**
* Get an existing AdmChannel 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 AdmChannel(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AdmChannel. 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'] === AdmChannel.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["clientId"] = state?.clientId;
resourceInputs["clientSecret"] = state?.clientSecret;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.applicationId === undefined && !opts.urn) {
throw new Error("Missing required property 'applicationId'");
}
if (args?.clientId === undefined && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if (args?.clientSecret === undefined && !opts.urn) {
throw new Error("Missing required property 'clientSecret'");
}
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["clientId"] = args?.clientId ? pulumi.secret(args.clientId) : undefined;
resourceInputs["clientSecret"] = args?.clientSecret ? pulumi.secret(args.clientSecret) : undefined;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["clientId", "clientSecret"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(AdmChannel.__pulumiType, name, resourceInputs, opts);
}
}
exports.AdmChannel = AdmChannel;
/** @internal */
AdmChannel.__pulumiType = 'aws:pinpoint/admChannel:AdmChannel';
//# sourceMappingURL=admChannel.js.map