"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.InstanceIamBinding = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a Data Fusion instance.
 *
 * To get more information about Instance, see:
 *
 * * [API documentation](https://cloud.google.com/data-fusion/docs/reference/rest/v1beta1/projects.locations.instances)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/data-fusion/docs/)
 *
 * ## Example Usage
 *
 * ### Data Fusion Instance Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basicInstance = new gcp.datafusion.Instance("basic_instance", {
 *     name: "my-instance",
 *     region: "us-central1",
 *     type: "BASIC",
 * });
 * ```
 * ### Data Fusion Instance Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = gcp.appengine.getDefaultServiceAccount({});
 * const network = new gcp.compute.Network("network", {name: "datafusion-full-network"});
 * const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
 *     name: "datafusion-ip-alloc",
 *     addressType: "INTERNAL",
 *     purpose: "VPC_PEERING",
 *     prefixLength: 22,
 *     network: network.id,
 * });
 * const extendedInstance = new gcp.datafusion.Instance("extended_instance", {
 *     name: "my-instance",
 *     description: "My Data Fusion instance",
 *     displayName: "My Data Fusion instance",
 *     region: "us-central1",
 *     type: "BASIC",
 *     enableStackdriverLogging: true,
 *     enableStackdriverMonitoring: true,
 *     privateInstance: true,
 *     dataprocServiceAccount: _default.then(_default => _default.email),
 *     labels: {
 *         example_key: "example_value",
 *     },
 *     networkConfig: {
 *         network: "default",
 *         ipAllocation: pulumi.interpolate`${privateIpAlloc.address}/${privateIpAlloc.prefixLength}`,
 *     },
 *     accelerators: [{
 *         acceleratorType: "CDC",
 *         state: "ENABLED",
 *     }],
 * });
 * ```
 * ### Data Fusion Instance Psc
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const psc = new gcp.compute.Network("psc", {
 *     name: "datafusion-psc-network",
 *     autoCreateSubnetworks: false,
 * });
 * const pscSubnetwork = new gcp.compute.Subnetwork("psc", {
 *     name: "datafusion-psc-subnet",
 *     region: "us-central1",
 *     network: psc.id,
 *     ipCidrRange: "10.0.0.0/16",
 * });
 * const pscNetworkAttachment = new gcp.compute.NetworkAttachment("psc", {
 *     name: "datafusion-psc-attachment",
 *     region: "us-central1",
 *     connectionPreference: "ACCEPT_AUTOMATIC",
 *     subnetworks: [pscSubnetwork.selfLink],
 * });
 * const pscInstance = new gcp.datafusion.Instance("psc_instance", {
 *     name: "psc-instance",
 *     region: "us-central1",
 *     type: "BASIC",
 *     privateInstance: true,
 *     networkConfig: {
 *         connectionType: "PRIVATE_SERVICE_CONNECT_INTERFACES",
 *         privateServiceConnectConfig: {
 *             networkAttachment: pscNetworkAttachment.id,
 *             unreachableCidrBlock: "192.168.0.0/25",
 *         },
 *     },
 * });
 * ```
 * ### Data Fusion Instance Cmek
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const keyRing = new gcp.kms.KeyRing("key_ring", {
 *     name: "my-instance",
 *     location: "us-central1",
 * });
 * const cryptoKey = new gcp.kms.CryptoKey("crypto_key", {
 *     name: "my-instance",
 *     keyRing: keyRing.id,
 * });
 * const project = gcp.organizations.getProject({});
 * const cryptoKeyMemberCdfSa = new gcp.kms.CryptoKeyIAMMember("crypto_key_member_cdf_sa", {
 *     cryptoKeyId: cryptoKey.id,
 *     role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datafusion.iam.gserviceaccount.com`),
 * });
 * const cryptoKeyMemberGcsSa = new gcp.kms.CryptoKeyIAMMember("crypto_key_member_gcs_sa", {
 *     cryptoKeyId: cryptoKey.id,
 *     role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gs-project-accounts.iam.gserviceaccount.com`),
 * });
 * const cmek = new gcp.datafusion.Instance("cmek", {
 *     name: "my-instance",
 *     region: "us-central1",
 *     type: "BASIC",
 *     cryptoKeyConfig: {
 *         keyReference: cryptoKey.id,
 *     },
 * }, {
 *     dependsOn: [
 *         cryptoKeyMemberCdfSa,
 *         cryptoKeyMemberGcsSa,
 *     ],
 * });
 * ```
 * ### Data Fusion Instance Enterprise
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const enterpriseInstance = new gcp.datafusion.Instance("enterprise_instance", {
 *     name: "my-instance",
 *     region: "us-central1",
 *     type: "ENTERPRISE",
 *     enableRbac: true,
 * });
 * ```
 * ### Data Fusion Instance Event
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const eventTopic = new gcp.pubsub.Topic("event", {name: "my-instance"});
 * const event = new gcp.datafusion.Instance("event", {
 *     name: "my-instance",
 *     region: "us-central1",
 *     type: "BASIC",
 *     eventPublishConfig: {
 *         enabled: true,
 *         topic: eventTopic.id,
 *     },
 * });
 * ```
 * ### Data Fusion Instance Zone
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const zone = new gcp.datafusion.Instance("zone", {
 *     name: "my-instance",
 *     region: "us-central1",
 *     zone: "us-central1-a",
 *     type: "DEVELOPER",
 * });
 * ```
 *
 * ## Import
 *
 * Instance can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{region}}/instances/{{name}}`
 *
 * * `{{project}}/{{region}}/{{name}}`
 *
 * * `{{region}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Instance can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/instanceIamBinding:InstanceIamBinding default projects/{{project}}/locations/{{region}}/instances/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/instanceIamBinding:InstanceIamBinding default {{project}}/{{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/instanceIamBinding:InstanceIamBinding default {{region}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/instanceIamBinding:InstanceIamBinding default {{name}}
 * ```
 */
class InstanceIamBinding extends pulumi.CustomResource {
    /**
     * Get an existing InstanceIamBinding 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 InstanceIamBinding(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of InstanceIamBinding.  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'] === InstanceIamBinding.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["condition"] = state?.condition;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["members"] = state?.members;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["region"] = state?.region;
            resourceInputs["role"] = state?.role;
        }
        else {
            const args = argsOrState;
            if (args?.members === undefined && !opts.urn) {
                throw new Error("Missing required property 'members'");
            }
            if (args?.role === undefined && !opts.urn) {
                throw new Error("Missing required property 'role'");
            }
            resourceInputs["condition"] = args?.condition;
            resourceInputs["members"] = args?.members;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["region"] = args?.region;
            resourceInputs["role"] = args?.role;
            resourceInputs["etag"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(InstanceIamBinding.__pulumiType, name, resourceInputs, opts);
    }
}
exports.InstanceIamBinding = InstanceIamBinding;
/** @internal */
InstanceIamBinding.__pulumiType = 'gcp:securitycenter/instanceIamBinding:InstanceIamBinding';
//# sourceMappingURL=instanceIamBinding.js.map