"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.ControlPlaneAccess = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Authorize the Runtime components to access directly with Apigee Control Plane.
 *
 * To get more information about ControlPlaneAccess, see:
 *
 * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/updateControlPlaneAccess)
 * * How-to Guides
 *     * [Enable ControlPlane access](https://cloud.google.com/apigee/docs/hybrid/v1.14/install-enable-control-plane-access)
 *
 * ## Example Usage
 *
 * ### Apigee Control Plane Access Basic Test
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = new gcp.organizations.Project("project", {
 *     projectId: "my-project",
 *     name: "my-project",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 * });
 * const apigee = new gcp.projects.Service("apigee", {
 *     project: project.projectId,
 *     service: "apigee.googleapis.com",
 * });
 * const apigeeOrg = new gcp.apigee.Organization("apigee_org", {
 *     analyticsRegion: "us-central1",
 *     projectId: project.projectId,
 *     runtimeType: "HYBRID",
 * }, {
 *     dependsOn: [apigee],
 * });
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {
 *     accountId: "my-account",
 *     displayName: "Service Account",
 * });
 * const synchronizer_iam = new gcp.projects.IAMMember("synchronizer-iam", {
 *     project: project.projectId,
 *     role: "roles/apigee.synchronizerManager",
 *     member: pulumi.interpolate`serviceAccount:${serviceAccount.email}`,
 * });
 * const apigeeControlPlaneAccess = new gcp.apigee.ControlPlaneAccess("apigee_control_plane_access", {
 *     name: apigeeOrg.name,
 *     synchronizerIdentities: [pulumi.interpolate`serviceAccount:${serviceAccount.email}`],
 *     analyticsPublisherIdentities: [pulumi.interpolate`serviceAccount:${serviceAccount.email}`],
 * });
 * ```
 *
 * ## Import
 *
 * ControlPlaneAccess can be imported using any of these accepted formats:
 *
 * * `organizations/{{name}}/controlPlaneAccess`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, ControlPlaneAccess can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:apigee/controlPlaneAccess:ControlPlaneAccess default organizations/{{name}}/controlPlaneAccess
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/controlPlaneAccess:ControlPlaneAccess default {{name}}
 * ```
 */
class ControlPlaneAccess extends pulumi.CustomResource {
    /**
     * Get an existing ControlPlaneAccess 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 ControlPlaneAccess(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of ControlPlaneAccess.  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'] === ControlPlaneAccess.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["analyticsPublisherIdentities"] = state?.analyticsPublisherIdentities;
            resourceInputs["name"] = state?.name;
            resourceInputs["synchronizerIdentities"] = state?.synchronizerIdentities;
        }
        else {
            const args = argsOrState;
            resourceInputs["analyticsPublisherIdentities"] = args?.analyticsPublisherIdentities;
            resourceInputs["name"] = args?.name;
            resourceInputs["synchronizerIdentities"] = args?.synchronizerIdentities;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ControlPlaneAccess.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ControlPlaneAccess = ControlPlaneAccess;
/** @internal */
ControlPlaneAccess.__pulumiType = 'gcp:apigee/controlPlaneAccess:ControlPlaneAccess';
//# sourceMappingURL=controlPlaneAccess.js.map