UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

68 lines 5.33 kB
"use strict"; // *** 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.Provider = void 0; const pulumi = require("@pulumi/pulumi"); const inputs = require("./types/input"); const utilities = require("./utilities"); /** * The provider type for the AWS Cloud Control package. By default, resources use package-wide configuration settings, however an explicit `Provider` instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information. */ class Provider extends pulumi.ProviderResource { /** * Returns true if the given object is an instance of Provider. 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'] === "pulumi:providers:" + Provider.__pulumiType; } /** * Create a Provider 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, args, opts) { var _a, _b, _c, _d, _e, _f, _g; let resourceInputs = {}; opts = opts || {}; { if ((!args || args.region === undefined) && !opts.urn) { throw new Error("Missing required property 'region'"); } resourceInputs["accessKey"] = (args === null || args === void 0 ? void 0 : args.accessKey) ? pulumi.secret(args.accessKey) : undefined; resourceInputs["allowedAccountIds"] = pulumi.output(args ? args.allowedAccountIds : undefined).apply(JSON.stringify); resourceInputs["assumeRole"] = pulumi.output(args ? args.assumeRole : undefined).apply(JSON.stringify); resourceInputs["autoNaming"] = pulumi.output(args ? (args.autoNaming ? pulumi.output(args.autoNaming).apply(inputs.providerAutoNamingArgsProvideDefaults) : undefined) : undefined).apply(JSON.stringify); resourceInputs["defaultTags"] = pulumi.output(args ? args.defaultTags : undefined).apply(JSON.stringify); resourceInputs["endpoints"] = pulumi.output(args ? args.endpoints : undefined).apply(JSON.stringify); resourceInputs["forbiddenAccountIds"] = pulumi.output(args ? args.forbiddenAccountIds : undefined).apply(JSON.stringify); resourceInputs["ignoreTags"] = pulumi.output(args ? args.ignoreTags : undefined).apply(JSON.stringify); resourceInputs["insecure"] = pulumi.output(args ? args.insecure : undefined).apply(JSON.stringify); resourceInputs["maxRetries"] = pulumi.output(args ? args.maxRetries : undefined).apply(JSON.stringify); resourceInputs["profile"] = (_a = (args ? args.profile : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnv("AWS_PROFILE"); resourceInputs["region"] = (_b = (args ? args.region : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("AWS_REGION", "AWS_DEFAULT_REGION"); resourceInputs["roleArn"] = args ? args.roleArn : undefined; resourceInputs["s3ForcePathStyle"] = pulumi.output(args ? args.s3ForcePathStyle : undefined).apply(JSON.stringify); resourceInputs["secretKey"] = (args === null || args === void 0 ? void 0 : args.secretKey) ? pulumi.secret(args.secretKey) : undefined; resourceInputs["sharedCredentialsFile"] = (_c = (args ? args.sharedCredentialsFile : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnv("AWS_SHARED_CREDENTIALS_FILE"); resourceInputs["skipCredentialsValidation"] = pulumi.output((_d = (args ? args.skipCredentialsValidation : undefined)) !== null && _d !== void 0 ? _d : true).apply(JSON.stringify); resourceInputs["skipGetEc2Platforms"] = pulumi.output((_e = (args ? args.skipGetEc2Platforms : undefined)) !== null && _e !== void 0 ? _e : true).apply(JSON.stringify); resourceInputs["skipMetadataApiCheck"] = pulumi.output((_f = (args ? args.skipMetadataApiCheck : undefined)) !== null && _f !== void 0 ? _f : true).apply(JSON.stringify); resourceInputs["skipRegionValidation"] = pulumi.output((_g = (args ? args.skipRegionValidation : undefined)) !== null && _g !== void 0 ? _g : true).apply(JSON.stringify); resourceInputs["skipRequestingAccountId"] = pulumi.output(args ? args.skipRequestingAccountId : undefined).apply(JSON.stringify); resourceInputs["token"] = (args === null || args === void 0 ? void 0 : args.token) ? pulumi.secret(args.token) : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Provider.__pulumiType, name, resourceInputs, opts); } } exports.Provider = Provider; /** @internal */ Provider.__pulumiType = 'aws-native'; //# sourceMappingURL=provider.js.map