"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) {
        let resourceInputs = {};
        opts = opts || {};
        {
            if (args?.region === undefined && !opts.urn) {
                throw new Error("Missing required property 'region'");
            }
            resourceInputs["accessKey"] = args?.accessKey ? pulumi.secret(args.accessKey) : undefined;
            resourceInputs["allowedAccountIds"] = pulumi.output(args?.allowedAccountIds).apply(JSON.stringify);
            resourceInputs["assumeRole"] = pulumi.output(args?.assumeRole).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?.defaultTags).apply(JSON.stringify);
            resourceInputs["endpoints"] = pulumi.output(args?.endpoints).apply(JSON.stringify);
            resourceInputs["forbiddenAccountIds"] = pulumi.output(args?.forbiddenAccountIds).apply(JSON.stringify);
            resourceInputs["ignoreTags"] = pulumi.output(args?.ignoreTags).apply(JSON.stringify);
            resourceInputs["insecure"] = pulumi.output(args?.insecure).apply(JSON.stringify);
            resourceInputs["maxRetries"] = pulumi.output(args?.maxRetries).apply(JSON.stringify);
            resourceInputs["profile"] = (args?.profile) ?? utilities.getEnv("AWS_PROFILE");
            resourceInputs["region"] = (args?.region) ?? utilities.getEnv("AWS_REGION", "AWS_DEFAULT_REGION");
            resourceInputs["roleArn"] = args?.roleArn;
            resourceInputs["s3UsePathStyle"] = pulumi.output(args?.s3UsePathStyle).apply(JSON.stringify);
            resourceInputs["secretKey"] = args?.secretKey ? pulumi.secret(args.secretKey) : undefined;
            resourceInputs["sharedCredentialsFile"] = (args?.sharedCredentialsFile) ?? utilities.getEnv("AWS_SHARED_CREDENTIALS_FILE");
            resourceInputs["skipCredentialsValidation"] = pulumi.output((args?.skipCredentialsValidation) ?? true).apply(JSON.stringify);
            resourceInputs["skipGetEc2Platforms"] = pulumi.output((args?.skipGetEc2Platforms) ?? true).apply(JSON.stringify);
            resourceInputs["skipMetadataApiCheck"] = pulumi.output((args?.skipMetadataApiCheck) ?? true).apply(JSON.stringify);
            resourceInputs["skipRegionValidation"] = pulumi.output((args?.skipRegionValidation) ?? true).apply(JSON.stringify);
            resourceInputs["skipRequestingAccountId"] = pulumi.output(args?.skipRequestingAccountId).apply(JSON.stringify);
            resourceInputs["token"] = 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