"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.DataRepositoryAssociation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Resource Type definition for AWS::FSx::DataRepositoryAssociation
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const config = new pulumi.Config();
 * const fsId = config.require("fsId");
 * const draIdExportName = config.require("draIdExportName");
 * const fileSystemPath = config.require("fileSystemPath");
 * const importedFileChunkSize = config.require("importedFileChunkSize");
 * const testDRA = new aws_native.fsx.DataRepositoryAssociation("testDRA", {
 *     fileSystemId: fsId,
 *     fileSystemPath: fileSystemPath,
 *     dataRepositoryPath: "s3://example-bucket",
 *     batchImportMetaDataOnCreate: true,
 *     importedFileChunkSize: importedFileChunkSize,
 *     s3: {
 *         autoImportPolicy: {
 *             events: [
 *                 aws_native.fsx.DataRepositoryAssociationEventType.New,
 *                 aws_native.fsx.DataRepositoryAssociationEventType.Changed,
 *                 aws_native.fsx.DataRepositoryAssociationEventType.Deleted,
 *             ],
 *         },
 *         autoExportPolicy: {
 *             events: [
 *                 aws_native.fsx.DataRepositoryAssociationEventType.New,
 *                 aws_native.fsx.DataRepositoryAssociationEventType.Changed,
 *                 aws_native.fsx.DataRepositoryAssociationEventType.Deleted,
 *             ],
 *         },
 *     },
 *     tags: [{
 *         key: "Location",
 *         value: "Boston",
 *     }],
 * });
 * export const draId = testDRA.id;
 *
 * ```
 */
class DataRepositoryAssociation extends pulumi.CustomResource {
    /**
     * Get an existing DataRepositoryAssociation 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 opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new DataRepositoryAssociation(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of DataRepositoryAssociation.  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'] === DataRepositoryAssociation.__pulumiType;
    }
    /**
     * Create a DataRepositoryAssociation 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 (!opts.id) {
            if (args?.dataRepositoryPath === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataRepositoryPath'");
            }
            if (args?.fileSystemId === undefined && !opts.urn) {
                throw new Error("Missing required property 'fileSystemId'");
            }
            if (args?.fileSystemPath === undefined && !opts.urn) {
                throw new Error("Missing required property 'fileSystemPath'");
            }
            resourceInputs["batchImportMetaDataOnCreate"] = args?.batchImportMetaDataOnCreate;
            resourceInputs["dataRepositoryPath"] = args?.dataRepositoryPath;
            resourceInputs["fileSystemId"] = args?.fileSystemId;
            resourceInputs["fileSystemPath"] = args?.fileSystemPath;
            resourceInputs["importedFileChunkSize"] = args?.importedFileChunkSize;
            resourceInputs["s3"] = args?.s3;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["associationId"] = undefined /*out*/;
            resourceInputs["resourceArn"] = undefined /*out*/;
        }
        else {
            resourceInputs["associationId"] = undefined /*out*/;
            resourceInputs["batchImportMetaDataOnCreate"] = undefined /*out*/;
            resourceInputs["dataRepositoryPath"] = undefined /*out*/;
            resourceInputs["fileSystemId"] = undefined /*out*/;
            resourceInputs["fileSystemPath"] = undefined /*out*/;
            resourceInputs["importedFileChunkSize"] = undefined /*out*/;
            resourceInputs["resourceArn"] = undefined /*out*/;
            resourceInputs["s3"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["batchImportMetaDataOnCreate", "dataRepositoryPath", "fileSystemId", "fileSystemPath"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(DataRepositoryAssociation.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DataRepositoryAssociation = DataRepositoryAssociation;
/** @internal */
DataRepositoryAssociation.__pulumiType = 'aws-native:fsx:DataRepositoryAssociation';
//# sourceMappingURL=dataRepositoryAssociation.js.map