import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * A connection allows BigQuery connections to external data sources..
 *
 * To get more information about Connection, see:
 *
 * * [API documentation](https://cloud.google.com/bigquery/docs/reference/bigqueryconnection/rest/v1/projects.locations.connections/create)
 * * How-to Guides
 *     * [Cloud SQL federated queries](https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries)
 *
 * ## Example Usage
 *
 * ### Bigquery Connection Cloud Resource
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "US",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     cloudResource: {},
 * });
 * ```
 * ### Bigquery Connection Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-database-instance",
 *     databaseVersion: "POSTGRES_11",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.index.Password("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     password: pwd.result,
 * });
 * const connection = new gcp.bigquery.Connection("connection", {
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     location: "US",
 *     cloudSql: {
 *         instanceId: instance.connectionName,
 *         database: db.name,
 *         type: "POSTGRES",
 *         credential: {
 *             username: user.name,
 *             password: user.password,
 *         },
 *     },
 * });
 * ```
 * ### Bigquery Connection Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-database-instance",
 *     databaseVersion: "POSTGRES_11",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.index.Password("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     password: pwd.result,
 * });
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "US",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     cloudSql: {
 *         instanceId: instance.connectionName,
 *         database: db.name,
 *         type: "POSTGRES",
 *         credential: {
 *             username: user.name,
 *             password: user.password,
 *         },
 *     },
 * });
 * ```
 * ### Bigquery Connection Aws
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "aws-us-east-1",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     aws: {
 *         accessRole: {
 *             iamRoleId: "arn:aws:iam::999999999999:role/omnirole",
 *         },
 *     },
 * });
 * ```
 * ### Bigquery Connection Azure
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "azure-eastus2",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     azure: {
 *         customerTenantId: "customer-tenant-id",
 *         federatedApplicationClientId: "b43eeeee-eeee-eeee-eeee-a480155501ce",
 *     },
 * });
 * ```
 * ### Bigquery Connection Cloudspanner
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "US",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     cloudSpanner: {
 *         database: "projects/project/instances/instance/databases/database",
 *         databaseRole: "database_role",
 *     },
 * });
 * ```
 * ### Bigquery Connection Cloudspanner Databoost
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "US",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     cloudSpanner: {
 *         database: "projects/project/instances/instance/databases/database",
 *         useParallelism: true,
 *         useDataBoost: true,
 *         maxParallelism: 100,
 *     },
 * });
 * ```
 * ### Bigquery Connection Spark
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.dataproc.Cluster("basic", {
 *     name: "my-connection",
 *     region: "us-central1",
 *     clusterConfig: {
 *         softwareConfig: {
 *             overrideProperties: {
 *                 "dataproc:dataproc.allow.zero.workers": "true",
 *             },
 *         },
 *         masterConfig: {
 *             numInstances: 1,
 *             machineType: "e2-standard-2",
 *             diskConfig: {
 *                 bootDiskSizeGb: 35,
 *             },
 *         },
 *     },
 * });
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "US",
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     spark: {
 *         sparkHistoryServerConfig: {
 *             dataprocCluster: basic.id,
 *         },
 *     },
 * });
 * ```
 * ### Bigquery Connection Sql With Cmek
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-database-instance",
 *     region: "us-central1",
 *     databaseVersion: "POSTGRES_11",
 *     settings: {
 *         tier: "db-f1-micro",
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     password: "tf-test-my-password_15222",
 * });
 * const bq_connection_cmek = new gcp.bigquery.Connection("bq-connection-cmek", {
 *     friendlyName: "👋",
 *     description: "a riveting description",
 *     location: "US",
 *     kmsKeyName: "projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key",
 *     cloudSql: {
 *         instanceId: instance.connectionName,
 *         database: db.name,
 *         type: "POSTGRES",
 *         credential: {
 *             username: user.name,
 *             password: user.password,
 *         },
 *     },
 * });
 * ```
 * ### Bigquery Connection Connector Configuration
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const nameSuffix = "my-connection";
 * const defaultNetwork = new gcp.compute.Network("default", {name: `alloydb-network-${nameSuffix}`});
 * const _default = new gcp.alloydb.Cluster("default", {
 *     clusterId: `alloydb-cluster-${nameSuffix}`,
 *     location: "us-central1",
 *     networkConfig: {
 *         network: defaultNetwork.id,
 *     },
 *     initialUser: {
 *         password: "alloydb-cluster-password",
 *     },
 *     deletionProtection: false,
 * });
 * const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
 *     name: `alloydb-ip-${nameSuffix}`,
 *     addressType: "INTERNAL",
 *     purpose: "VPC_PEERING",
 *     prefixLength: 16,
 *     network: defaultNetwork.id,
 * });
 * const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
 *     network: defaultNetwork.id,
 *     service: "servicenetworking.googleapis.com",
 *     reservedPeeringRanges: [privateIpAlloc.name],
 * });
 * const defaultInstance = new gcp.alloydb.Instance("default", {
 *     cluster: _default.name,
 *     instanceId: `alloydb-instance-${nameSuffix}`,
 *     instanceType: "PRIMARY",
 *     machineConfig: {
 *         cpuCount: 2,
 *     },
 * }, {
 *     dependsOn: [vpcConnection],
 * });
 * const connection = new gcp.bigquery.Connection("connection", {
 *     connectionId: "my-connection",
 *     location: "us-central1",
 *     friendlyName: "alloydb connection",
 *     description: "AlloyDB connection using connector configuration",
 *     configuration: {
 *         connectorId: "google-alloydb",
 *         asset: {
 *             database: "postgres",
 *             googleCloudResource: pulumi.interpolate`//alloydb.googleapis.com/${defaultInstance.id}`,
 *         },
 *         authentication: {
 *             usernamePassword: {
 *                 username: "user",
 *                 password: {
 *                     plaintext: "password",
 *                 },
 *             },
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Connection can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/connections/{{connection_id}}`
 * * `{{project}}/{{location}}/{{connection_id}}`
 * * `{{location}}/{{connection_id}}`
 *
 * When using the `pulumi import` command, Connection can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:bigquery/connection:Connection default projects/{{project}}/locations/{{location}}/connections/{{connection_id}}
 * $ pulumi import gcp:bigquery/connection:Connection default {{project}}/{{location}}/{{connection_id}}
 * $ pulumi import gcp:bigquery/connection:Connection default {{location}}/{{connection_id}}
 * ```
 */
export declare class Connection extends pulumi.CustomResource {
    /**
     * Get an existing Connection 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: string, id: pulumi.Input<pulumi.ID>, state?: ConnectionState, opts?: pulumi.CustomResourceOptions): Connection;
    /**
     * Returns true if the given object is an instance of Connection.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj: any): obj is Connection;
    /**
     * Connection properties specific to Amazon Web Services.
     * Structure is documented below.
     */
    readonly aws: pulumi.Output<outputs.bigquery.ConnectionAws | undefined>;
    /**
     * Container for connection properties specific to Azure.
     * Structure is documented below.
     */
    readonly azure: pulumi.Output<outputs.bigquery.ConnectionAzure | undefined>;
    /**
     * Container for connection properties for delegation of access to GCP resources.
     * Structure is documented below.
     */
    readonly cloudResource: pulumi.Output<outputs.bigquery.ConnectionCloudResource | undefined>;
    /**
     * Connection properties specific to Cloud Spanner
     * Structure is documented below.
     */
    readonly cloudSpanner: pulumi.Output<outputs.bigquery.ConnectionCloudSpanner | undefined>;
    /**
     * Connection properties specific to the Cloud SQL.
     * Structure is documented below.
     */
    readonly cloudSql: pulumi.Output<outputs.bigquery.ConnectionCloudSql | undefined>;
    /**
     * Connector configuration. This is a generic configuration that is used to connect to
     * external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery
     * Connector framework.
     * Structure is documented below.
     */
    readonly configuration: pulumi.Output<outputs.bigquery.ConnectionConfiguration | undefined>;
    /**
     * Optional connection id that should be assigned to the created connection.
     */
    readonly connectionId: pulumi.Output<string>;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    readonly deletionPolicy: pulumi.Output<string>;
    /**
     * A descriptive description for the connection
     */
    readonly description: pulumi.Output<string | undefined>;
    /**
     * A descriptive name for the connection
     */
    readonly friendlyName: pulumi.Output<string | undefined>;
    /**
     * True if the connection has credential assigned.
     */
    readonly hasCredential: pulumi.Output<boolean>;
    /**
     * Optional. The Cloud KMS key that is used for encryption.
     * Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
     */
    readonly kmsKeyName: pulumi.Output<string | undefined>;
    /**
     * The geographic location where the connection should reside.
     * Cloud SQL instance must be in the same location as the connection
     * with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU.
     * Examples: US, EU, asia-northeast1, us-central1, europe-west1.
     * Spanner Connections same as spanner region
     * AWS allowed regions are aws-us-east-1
     * Azure allowed regions are azure-eastus2
     */
    readonly location: pulumi.Output<string | undefined>;
    /**
     * The resource name of the connection in the form of:
     * "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
     */
    readonly name: pulumi.Output<string>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    readonly project: pulumi.Output<string>;
    /**
     * Container for connection properties to execute stored procedures for Apache Spark. resources.
     * Structure is documented below.
     */
    readonly spark: pulumi.Output<outputs.bigquery.ConnectionSpark | undefined>;
    /**
     * Create a Connection 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: string, args?: ConnectionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering Connection resources.
 */
export interface ConnectionState {
    /**
     * Connection properties specific to Amazon Web Services.
     * Structure is documented below.
     */
    aws?: pulumi.Input<inputs.bigquery.ConnectionAws | undefined>;
    /**
     * Container for connection properties specific to Azure.
     * Structure is documented below.
     */
    azure?: pulumi.Input<inputs.bigquery.ConnectionAzure | undefined>;
    /**
     * Container for connection properties for delegation of access to GCP resources.
     * Structure is documented below.
     */
    cloudResource?: pulumi.Input<inputs.bigquery.ConnectionCloudResource | undefined>;
    /**
     * Connection properties specific to Cloud Spanner
     * Structure is documented below.
     */
    cloudSpanner?: pulumi.Input<inputs.bigquery.ConnectionCloudSpanner | undefined>;
    /**
     * Connection properties specific to the Cloud SQL.
     * Structure is documented below.
     */
    cloudSql?: pulumi.Input<inputs.bigquery.ConnectionCloudSql | undefined>;
    /**
     * Connector configuration. This is a generic configuration that is used to connect to
     * external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery
     * Connector framework.
     * Structure is documented below.
     */
    configuration?: pulumi.Input<inputs.bigquery.ConnectionConfiguration | undefined>;
    /**
     * Optional connection id that should be assigned to the created connection.
     */
    connectionId?: pulumi.Input<string | undefined>;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    deletionPolicy?: pulumi.Input<string | undefined>;
    /**
     * A descriptive description for the connection
     */
    description?: pulumi.Input<string | undefined>;
    /**
     * A descriptive name for the connection
     */
    friendlyName?: pulumi.Input<string | undefined>;
    /**
     * True if the connection has credential assigned.
     */
    hasCredential?: pulumi.Input<boolean | undefined>;
    /**
     * Optional. The Cloud KMS key that is used for encryption.
     * Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
     */
    kmsKeyName?: pulumi.Input<string | undefined>;
    /**
     * The geographic location where the connection should reside.
     * Cloud SQL instance must be in the same location as the connection
     * with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU.
     * Examples: US, EU, asia-northeast1, us-central1, europe-west1.
     * Spanner Connections same as spanner region
     * AWS allowed regions are aws-us-east-1
     * Azure allowed regions are azure-eastus2
     */
    location?: pulumi.Input<string | undefined>;
    /**
     * The resource name of the connection in the form of:
     * "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string | undefined>;
    /**
     * Container for connection properties to execute stored procedures for Apache Spark. resources.
     * Structure is documented below.
     */
    spark?: pulumi.Input<inputs.bigquery.ConnectionSpark | undefined>;
}
/**
 * The set of arguments for constructing a Connection resource.
 */
export interface ConnectionArgs {
    /**
     * Connection properties specific to Amazon Web Services.
     * Structure is documented below.
     */
    aws?: pulumi.Input<inputs.bigquery.ConnectionAws | undefined>;
    /**
     * Container for connection properties specific to Azure.
     * Structure is documented below.
     */
    azure?: pulumi.Input<inputs.bigquery.ConnectionAzure | undefined>;
    /**
     * Container for connection properties for delegation of access to GCP resources.
     * Structure is documented below.
     */
    cloudResource?: pulumi.Input<inputs.bigquery.ConnectionCloudResource | undefined>;
    /**
     * Connection properties specific to Cloud Spanner
     * Structure is documented below.
     */
    cloudSpanner?: pulumi.Input<inputs.bigquery.ConnectionCloudSpanner | undefined>;
    /**
     * Connection properties specific to the Cloud SQL.
     * Structure is documented below.
     */
    cloudSql?: pulumi.Input<inputs.bigquery.ConnectionCloudSql | undefined>;
    /**
     * Connector configuration. This is a generic configuration that is used to connect to
     * external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery
     * Connector framework.
     * Structure is documented below.
     */
    configuration?: pulumi.Input<inputs.bigquery.ConnectionConfiguration | undefined>;
    /**
     * Optional connection id that should be assigned to the created connection.
     */
    connectionId?: pulumi.Input<string | undefined>;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    deletionPolicy?: pulumi.Input<string | undefined>;
    /**
     * A descriptive description for the connection
     */
    description?: pulumi.Input<string | undefined>;
    /**
     * A descriptive name for the connection
     */
    friendlyName?: pulumi.Input<string | undefined>;
    /**
     * Optional. The Cloud KMS key that is used for encryption.
     * Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
     */
    kmsKeyName?: pulumi.Input<string | undefined>;
    /**
     * The geographic location where the connection should reside.
     * Cloud SQL instance must be in the same location as the connection
     * with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU.
     * Examples: US, EU, asia-northeast1, us-central1, europe-west1.
     * Spanner Connections same as spanner region
     * AWS allowed regions are aws-us-east-1
     * Azure allowed regions are azure-eastus2
     */
    location?: pulumi.Input<string | undefined>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string | undefined>;
    /**
     * Container for connection properties to execute stored procedures for Apache Spark. resources.
     * Structure is documented below.
     */
    spark?: pulumi.Input<inputs.bigquery.ConnectionSpark | undefined>;
}
//# sourceMappingURL=connection.d.ts.map