"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! ***
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.IntegrationAccount = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Provides a Datadog—Amazon Web Services integration resource. This can be used to create and manage Datadog—Amazon Web Services integration.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as datadog from "@pulumi/datadog";
 *
 * // Create new integration_aws_account resource
 * const foo = new datadog.aws.IntegrationAccount("foo", {
 *     accountTags: ["env:prod"],
 *     awsAccountId: "123456789012",
 *     awsPartition: "aws",
 *     awsRegions: [{
 *         includeAll: true,
 *     }],
 *     authConfig: [{
 *         awsAuthConfigRole: [{
 *             roleName: "DatadogIntegrationRole",
 *         }],
 *     }],
 *     logsConfig: [{
 *         lambdaForwarder: [{
 *             lambdas: ["arn:aws:lambda:us-east-1:123456789012:function:my-lambda"],
 *             sources: ["s3"],
 *             logSourceConfig: [{
 *                 tagFilters: [{
 *                     source: "s3",
 *                     tags: [
 *                         "env:prod",
 *                         "team:backend",
 *                     ],
 *                 }],
 *             }],
 *         }],
 *     }],
 *     metricsConfig: [{
 *         automuteEnabled: true,
 *         collectCloudwatchAlarms: true,
 *         collectCustomMetrics: true,
 *         enabled: true,
 *         namespaceFilters: [{
 *             excludeOnlies: [
 *                 "AWS/SQS",
 *                 "AWS/ElasticMapReduce",
 *                 "AWS/Usage",
 *             ],
 *         }],
 *         tagFilters: [{
 *             namespace: "AWS/EC2",
 *             tags: ["datadog:true"],
 *         }],
 *     }],
 *     resourcesConfig: [{
 *         cloudSecurityPostureManagementCollection: true,
 *         extendedCollection: true,
 *     }],
 *     tracesConfig: [{
 *         xrayServices: [{
 *             includeAll: true,
 *         }],
 *     }],
 * });
 * // Create new integration_aws_account resource with all Datadog-provided defaults configured
 * const foo_defaults = new datadog.aws.IntegrationAccount("foo-defaults", {
 *     awsRegions: [{}],
 *     logsConfig: [{
 *         lambdaForwarder: [{}],
 *     }],
 *     metricsConfig: [{
 *         namespaceFilters: [{}],
 *     }],
 *     resourcesConfig: [{}],
 *     tracesConfig: [{
 *         xrayServices: [{}],
 *     }],
 *     awsAccountId: "234567890123",
 *     awsPartition: "aws",
 *     authConfig: [{
 *         awsAuthConfigRole: [{
 *             roleName: "DatadogIntegrationRole",
 *         }],
 *     }],
 * });
 * ```
 *
 * ## Upgrading from `datadogIntegrationAws` resources
 *
 *  To migrate your account configuration from `datadog_integration_aws*` resources to `datadog.aws.IntegrationAccount`:
 *  1. Import your integrated accounts into `datadog.aws.IntegrationAccount` resources using the import command below.
 *  2. Once successfully imported, you can run `terraform state rm` to delete all resources of the deprecated types from state:
 *     - `datadogIntegrationAws`
 *     - `datadogIntegrationAwsLambdaArn`
 *     - `datadogIntegrationAwsLogCollection`
 *     - `datadogIntegrationAwsTagFilter`
 *
 * ## Import
 *
 * ```sh
 * $ pulumi import datadog:aws/integrationAccount:IntegrationAccount example "<datadog-aws-account-config-id>"
 * ```
 *  AWS Account Config ID can be retrieved by using the [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) endpoint and querying by AWS Account ID.
 */
class IntegrationAccount extends pulumi.CustomResource {
    /**
     * Get an existing IntegrationAccount 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 IntegrationAccount(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'datadog:aws/integrationAccount:IntegrationAccount';
    /**
     * Returns true if the given object is an instance of IntegrationAccount.  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'] === IntegrationAccount.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountTags"] = state?.accountTags;
            resourceInputs["authConfig"] = state?.authConfig;
            resourceInputs["awsAccountId"] = state?.awsAccountId;
            resourceInputs["awsPartition"] = state?.awsPartition;
            resourceInputs["awsRegions"] = state?.awsRegions;
            resourceInputs["logsConfig"] = state?.logsConfig;
            resourceInputs["metricsConfig"] = state?.metricsConfig;
            resourceInputs["resourcesConfig"] = state?.resourcesConfig;
            resourceInputs["tracesConfig"] = state?.tracesConfig;
        }
        else {
            const args = argsOrState;
            if (args?.awsAccountId === undefined && !opts.urn) {
                throw new Error("Missing required property 'awsAccountId'");
            }
            if (args?.awsPartition === undefined && !opts.urn) {
                throw new Error("Missing required property 'awsPartition'");
            }
            resourceInputs["accountTags"] = args?.accountTags;
            resourceInputs["authConfig"] = args?.authConfig;
            resourceInputs["awsAccountId"] = args?.awsAccountId;
            resourceInputs["awsPartition"] = args?.awsPartition;
            resourceInputs["awsRegions"] = args?.awsRegions;
            resourceInputs["logsConfig"] = args?.logsConfig;
            resourceInputs["metricsConfig"] = args?.metricsConfig;
            resourceInputs["resourcesConfig"] = args?.resourcesConfig;
            resourceInputs["tracesConfig"] = args?.tracesConfig;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(IntegrationAccount.__pulumiType, name, resourceInputs, opts);
    }
}
exports.IntegrationAccount = IntegrationAccount;
//# sourceMappingURL=integrationAccount.js.map