import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * A resource representing streaming data from a source to a destination.
 *
 * To get more information about Stream, see:
 *
 * * [API documentation](https://cloud.google.com/datastream/docs/reference/rest/v1/projects.locations.streams)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/datastream/docs/create-a-stream)
 *
 * ## Example Usage
 *
 * ### Datastream Stream Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const project = gcp.organizations.getProject({});
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-instance",
 *     databaseVersion: "MYSQL_8_0",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *         backupConfiguration: {
 *             enabled: true,
 *             binaryLogEnabled: true,
 *         },
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.RandomPassword("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     host: "%",
 *     password: pwd.result,
 * });
 * const sourceConnectionProfile = new gcp.datastream.ConnectionProfile("source_connection_profile", {
 *     displayName: "Source connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     mysqlProfile: {
 *         hostname: instance.publicIpAddress,
 *         username: user.name,
 *         password: user.password,
 *     },
 * });
 * const bucket = new gcp.storage.Bucket("bucket", {
 *     name: "my-bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const viewer = new gcp.storage.BucketIAMMember("viewer", {
 *     bucket: bucket.name,
 *     role: "roles/storage.objectViewer",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datastream.iam.gserviceaccount.com`),
 * });
 * const creator = new gcp.storage.BucketIAMMember("creator", {
 *     bucket: bucket.name,
 *     role: "roles/storage.objectCreator",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datastream.iam.gserviceaccount.com`),
 * });
 * const reader = new gcp.storage.BucketIAMMember("reader", {
 *     bucket: bucket.name,
 *     role: "roles/storage.legacyBucketReader",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datastream.iam.gserviceaccount.com`),
 * });
 * const keyUser = new gcp.kms.CryptoKeyIAMMember("key_user", {
 *     cryptoKeyId: "kms-name",
 *     role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datastream.iam.gserviceaccount.com`),
 * });
 * const destinationConnectionProfile = new gcp.datastream.ConnectionProfile("destination_connection_profile", {
 *     displayName: "Connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     gcsProfile: {
 *         bucket: bucket.name,
 *         rootPath: "/path",
 *     },
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     streamId: "my-stream",
 *     desiredState: "NOT_STARTED",
 *     location: "us-central1",
 *     displayName: "my stream",
 *     labels: {
 *         key: "value",
 *     },
 *     sourceConfig: {
 *         sourceConnectionProfile: sourceConnectionProfile.id,
 *         mysqlSourceConfig: {
 *             includeObjects: {
 *                 mysqlDatabases: [{
 *                     database: "my-database",
 *                     mysqlTables: [
 *                         {
 *                             table: "includedTable",
 *                             mysqlColumns: [{
 *                                 column: "includedColumn",
 *                                 dataType: "VARCHAR",
 *                                 collation: "utf8mb4",
 *                                 primaryKey: false,
 *                                 nullable: false,
 *                                 ordinalPosition: 0,
 *                             }],
 *                         },
 *                         {
 *                             table: "includedTable_2",
 *                         },
 *                     ],
 *                 }],
 *             },
 *             excludeObjects: {
 *                 mysqlDatabases: [{
 *                     database: "my-database",
 *                     mysqlTables: [{
 *                         table: "excludedTable",
 *                         mysqlColumns: [{
 *                             column: "excludedColumn",
 *                             dataType: "VARCHAR",
 *                             collation: "utf8mb4",
 *                             primaryKey: false,
 *                             nullable: false,
 *                             ordinalPosition: 0,
 *                         }],
 *                     }],
 *                 }],
 *             },
 *             maxConcurrentCdcTasks: 5,
 *         },
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destinationConnectionProfile.id,
 *         gcsDestinationConfig: {
 *             path: "mydata",
 *             fileRotationMb: 200,
 *             fileRotationInterval: "60s",
 *             jsonFileFormat: {
 *                 schemaFileFormat: "NO_SCHEMA_FILE",
 *                 compression: "GZIP",
 *             },
 *         },
 *     },
 *     backfillAll: {
 *         mysqlExcludedObjects: {
 *             mysqlDatabases: [{
 *                 database: "my-database",
 *                 mysqlTables: [{
 *                     table: "excludedTable",
 *                     mysqlColumns: [{
 *                         column: "excludedColumn",
 *                         dataType: "VARCHAR",
 *                         collation: "utf8mb4",
 *                         primaryKey: false,
 *                         nullable: false,
 *                         ordinalPosition: 0,
 *                     }],
 *                 }],
 *             }],
 *         },
 *     },
 *     customerManagedEncryptionKey: "kms-name",
 * }, {
 *     dependsOn: [keyUser],
 * });
 * ```
 * ### Datastream Stream Postgresql
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const source = new gcp.datastream.ConnectionProfile("source", {
 *     displayName: "Postgresql Source",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     postgresqlProfile: {
 *         hostname: "hostname",
 *         port: 5432,
 *         username: "user",
 *         password: "pass",
 *         database: "postgres",
 *     },
 * });
 * const destination = new gcp.datastream.ConnectionProfile("destination", {
 *     displayName: "BigQuery Destination",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     displayName: "Postgres to BigQuery",
 *     location: "us-central1",
 *     streamId: "my-stream",
 *     desiredState: "RUNNING",
 *     sourceConfig: {
 *         sourceConnectionProfile: source.id,
 *         postgresqlSourceConfig: {
 *             maxConcurrentBackfillTasks: 12,
 *             publication: "publication",
 *             replicationSlot: "replication_slot",
 *             includeObjects: {
 *                 postgresqlSchemas: [{
 *                     schema: "schema",
 *                     postgresqlTables: [{
 *                         table: "table",
 *                         postgresqlColumns: [{
 *                             column: "column",
 *                         }],
 *                     }],
 *                 }],
 *             },
 *             excludeObjects: {
 *                 postgresqlSchemas: [{
 *                     schema: "schema",
 *                     postgresqlTables: [{
 *                         table: "table",
 *                         postgresqlColumns: [{
 *                             column: "column",
 *                         }],
 *                     }],
 *                 }],
 *             },
 *         },
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destination.id,
 *         bigqueryDestinationConfig: {
 *             dataFreshness: "900s",
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *             },
 *         },
 *     },
 *     backfillAll: {
 *         postgresqlExcludedObjects: {
 *             postgresqlSchemas: [{
 *                 schema: "schema",
 *                 postgresqlTables: [{
 *                     table: "table",
 *                     postgresqlColumns: [{
 *                         column: "column",
 *                     }],
 *                 }],
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Datastream Stream Oracle
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const source = new gcp.datastream.ConnectionProfile("source", {
 *     displayName: "Oracle Source",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     oracleProfile: {
 *         hostname: "hostname",
 *         port: 1521,
 *         username: "user",
 *         password: "pass",
 *         databaseService: "ORCL",
 *     },
 * });
 * const destination = new gcp.datastream.ConnectionProfile("destination", {
 *     displayName: "BigQuery Destination",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const stream5 = new gcp.datastream.Stream("stream5", {
 *     displayName: "Oracle to BigQuery",
 *     location: "us-central1",
 *     streamId: "my-stream",
 *     desiredState: "RUNNING",
 *     sourceConfig: {
 *         sourceConnectionProfile: source.id,
 *         oracleSourceConfig: {
 *             maxConcurrentCdcTasks: 8,
 *             maxConcurrentBackfillTasks: 12,
 *             includeObjects: {
 *                 oracleSchemas: [{
 *                     schema: "schema",
 *                     oracleTables: [{
 *                         table: "table",
 *                         oracleColumns: [{
 *                             column: "column",
 *                         }],
 *                     }],
 *                 }],
 *             },
 *             excludeObjects: {
 *                 oracleSchemas: [{
 *                     schema: "schema",
 *                     oracleTables: [{
 *                         table: "table",
 *                         oracleColumns: [{
 *                             column: "column",
 *                         }],
 *                     }],
 *                 }],
 *             },
 *             dropLargeObjects: {},
 *         },
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destination.id,
 *         bigqueryDestinationConfig: {
 *             dataFreshness: "900s",
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *             },
 *         },
 *     },
 *     backfillAll: {
 *         oracleExcludedObjects: {
 *             oracleSchemas: [{
 *                 schema: "schema",
 *                 oracleTables: [{
 *                     table: "table",
 *                     oracleColumns: [{
 *                         column: "column",
 *                     }],
 *                 }],
 *             }],
 *         },
 *     },
 * });
 * ```
 * ### Datastream Stream Sql Server
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "sql-server",
 *     databaseVersion: "SQLSERVER_2019_STANDARD",
 *     region: "us-central1",
 *     rootPassword: "root-password",
 *     deletionProtection: true,
 *     settings: {
 *         tier: "db-custom-2-4096",
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     password: "password",
 * });
 * const db = new gcp.sql.Database("db", {
 *     name: "db",
 *     instance: instance.name,
 * }, {
 *     dependsOn: [user],
 * });
 * const source = new gcp.datastream.ConnectionProfile("source", {
 *     displayName: "SQL Server Source",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     sqlServerProfile: {
 *         hostname: instance.publicIpAddress,
 *         port: 1433,
 *         username: user.name,
 *         password: user.password,
 *         database: db.name,
 *     },
 * });
 * const destination = new gcp.datastream.ConnectionProfile("destination", {
 *     displayName: "BigQuery Destination",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     displayName: "SQL Server to BigQuery",
 *     location: "us-central1",
 *     streamId: "stream",
 *     sourceConfig: {
 *         sourceConnectionProfile: source.id,
 *         sqlServerSourceConfig: {
 *             includeObjects: {
 *                 schemas: [{
 *                     schema: "schema",
 *                     tables: [{
 *                         table: "table",
 *                     }],
 *                 }],
 *             },
 *             transactionLogs: {},
 *         },
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destination.id,
 *         bigqueryDestinationConfig: {
 *             dataFreshness: "900s",
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *             },
 *         },
 *     },
 *     backfillNone: {},
 * });
 * ```
 * ### Datastream Stream Sql Server Change Tables
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "sql-server",
 *     databaseVersion: "SQLSERVER_2019_STANDARD",
 *     region: "us-central1",
 *     rootPassword: "root-password",
 *     deletionProtection: true,
 *     settings: {
 *         tier: "db-custom-2-4096",
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     password: "password",
 * });
 * const db = new gcp.sql.Database("db", {
 *     name: "db",
 *     instance: instance.name,
 * }, {
 *     dependsOn: [user],
 * });
 * const source = new gcp.datastream.ConnectionProfile("source", {
 *     displayName: "SQL Server Source",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     sqlServerProfile: {
 *         hostname: instance.publicIpAddress,
 *         port: 1433,
 *         username: user.name,
 *         password: user.password,
 *         database: db.name,
 *     },
 * });
 * const destination = new gcp.datastream.ConnectionProfile("destination", {
 *     displayName: "BigQuery Destination",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     displayName: "SQL Server to BigQuery",
 *     location: "us-central1",
 *     streamId: "stream",
 *     sourceConfig: {
 *         sourceConnectionProfile: source.id,
 *         sqlServerSourceConfig: {
 *             includeObjects: {
 *                 schemas: [{
 *                     schema: "schema",
 *                     tables: [{
 *                         table: "table",
 *                     }],
 *                 }],
 *             },
 *             changeTables: {},
 *         },
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destination.id,
 *         bigqueryDestinationConfig: {
 *             dataFreshness: "900s",
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *             },
 *         },
 *     },
 *     backfillNone: {},
 * });
 * ```
 * ### Datastream Stream Mysql Gtid
 *
 * ### Datastream Stream Postgresql Bigquery Dataset Id
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const postgres = new gcp.bigquery.Dataset("postgres", {
 *     datasetId: "postgres",
 *     friendlyName: "postgres",
 *     description: "Database of postgres",
 *     location: "us-central1",
 * });
 * const destinationConnectionProfile2 = new gcp.datastream.ConnectionProfile("destination_connection_profile2", {
 *     displayName: "Connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "dest-profile",
 *     bigqueryProfile: {},
 * });
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "instance-name",
 *     databaseVersion: "MYSQL_8_0",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *         backupConfiguration: {
 *             enabled: true,
 *             binaryLogEnabled: true,
 *         },
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 *     deletionProtection: false,
 * });
 * const pwd = new random.RandomPassword("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "my-user",
 *     instance: instance.name,
 *     host: "%",
 *     password: pwd.result,
 * });
 * const sourceConnectionProfile = new gcp.datastream.ConnectionProfile("source_connection_profile", {
 *     displayName: "Source connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     mysqlProfile: {
 *         hostname: instance.publicIpAddress,
 *         username: user.name,
 *         password: user.password,
 *     },
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     displayName: "postgres to bigQuery",
 *     location: "us-central1",
 *     streamId: "postgres-bigquery",
 *     sourceConfig: {
 *         sourceConnectionProfile: sourceConnectionProfile.id,
 *         mysqlSourceConfig: {},
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destinationConnectionProfile2.id,
 *         bigqueryDestinationConfig: {
 *             dataFreshness: "900s",
 *             singleTargetDataset: {
 *                 datasetId: postgres.id,
 *             },
 *         },
 *     },
 *     backfillAll: {},
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * ```
 * ### Datastream Stream Bigquery
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const project = gcp.organizations.getProject({});
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-instance",
 *     databaseVersion: "MYSQL_8_0",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *         backupConfiguration: {
 *             enabled: true,
 *             binaryLogEnabled: true,
 *         },
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.RandomPassword("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     host: "%",
 *     password: pwd.result,
 * });
 * const sourceConnectionProfile = new gcp.datastream.ConnectionProfile("source_connection_profile", {
 *     displayName: "Source connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     mysqlProfile: {
 *         hostname: instance.publicIpAddress,
 *         username: user.name,
 *         password: user.password,
 *     },
 * });
 * const bqSa = gcp.bigquery.getDefaultServiceAccount({});
 * const bigqueryKeyUser = new gcp.kms.CryptoKeyIAMMember("bigquery_key_user", {
 *     cryptoKeyId: "bigquery-kms-name",
 *     role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
 *     member: bqSa.then(bqSa => `serviceAccount:${bqSa.email}`),
 * });
 * const destinationConnectionProfile = new gcp.datastream.ConnectionProfile("destination_connection_profile", {
 *     displayName: "Connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     streamId: "my-stream",
 *     location: "us-central1",
 *     displayName: "my stream",
 *     sourceConfig: {
 *         sourceConnectionProfile: sourceConnectionProfile.id,
 *         mysqlSourceConfig: {},
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destinationConnectionProfile.id,
 *         bigqueryDestinationConfig: {
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                     kmsKeyName: "bigquery-kms-name",
 *                 },
 *             },
 *         },
 *     },
 *     backfillNone: {},
 * }, {
 *     dependsOn: [bigqueryKeyUser],
 * });
 * ```
 * ### Datastream Stream Bigquery Cross Project Source Hierachy
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 * import * as time from "@pulumiverse/time";
 *
 * const project = gcp.organizations.getProject({});
 * const cross_project_dataset = new gcp.organizations.Project("cross-project-dataset", {
 *     projectId: "tf-test_76044",
 *     name: "tf-test_69391",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 * });
 * const wait60Seconds = new time.Sleep("wait_60_seconds", {createDuration: "60s"}, {
 *     dependsOn: [cross_project_dataset],
 * });
 * const bigquery = new gcp.projects.Service("bigquery", {
 *     project: cross_project_dataset.projectId,
 *     service: "bigquery.googleapis.com",
 *     disableOnDestroy: false,
 * }, {
 *     dependsOn: [wait60Seconds],
 * });
 * const datastreamBigqueryAdmin = new gcp.projects.IAMMember("datastream_bigquery_admin", {
 *     project: cross_project_dataset.projectId,
 *     role: "roles/bigquery.admin",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-datastream.iam.gserviceaccount.com`),
 * }, {
 *     dependsOn: [wait60Seconds],
 * });
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-instance",
 *     databaseVersion: "MYSQL_8_0",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *         backupConfiguration: {
 *             enabled: true,
 *             binaryLogEnabled: true,
 *         },
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.RandomPassword("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     host: "%",
 *     password: pwd.result,
 * });
 * const sourceConnectionProfile = new gcp.datastream.ConnectionProfile("source_connection_profile", {
 *     displayName: "Source connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     mysqlProfile: {
 *         hostname: instance.publicIpAddress,
 *         username: user.name,
 *         password: user.password,
 *     },
 * });
 * const destinationConnectionProfile = new gcp.datastream.ConnectionProfile("destination_connection_profile", {
 *     displayName: "Connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     streamId: "my-stream",
 *     location: "us-central1",
 *     displayName: "my stream",
 *     sourceConfig: {
 *         sourceConnectionProfile: sourceConnectionProfile.id,
 *         mysqlSourceConfig: {},
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destinationConnectionProfile.id,
 *         bigqueryDestinationConfig: {
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *                 projectId: cross_project_dataset.projectId,
 *             },
 *         },
 *     },
 *     backfillNone: {},
 * });
 * ```
 * ### Datastream Stream Bigquery Append Only
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const project = gcp.organizations.getProject({});
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "my-instance",
 *     databaseVersion: "MYSQL_8_0",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *         backupConfiguration: {
 *             enabled: true,
 *             binaryLogEnabled: true,
 *         },
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.RandomPassword("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     host: "%",
 *     password: pwd.result,
 * });
 * const sourceConnectionProfile = new gcp.datastream.ConnectionProfile("source_connection_profile", {
 *     displayName: "Source connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "source-profile",
 *     mysqlProfile: {
 *         hostname: instance.publicIpAddress,
 *         username: user.name,
 *         password: user.password,
 *     },
 * });
 * const destinationConnectionProfile = new gcp.datastream.ConnectionProfile("destination_connection_profile", {
 *     displayName: "Connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     streamId: "my-stream",
 *     location: "us-central1",
 *     displayName: "my stream",
 *     sourceConfig: {
 *         sourceConnectionProfile: sourceConnectionProfile.id,
 *         mysqlSourceConfig: {},
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destinationConnectionProfile.id,
 *         bigqueryDestinationConfig: {
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *             },
 *             appendOnly: {},
 *         },
 *     },
 *     backfillNone: {},
 * });
 * ```
 * ### Datastream Stream Bigquery Blmt
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as random from "@pulumi/random";
 *
 * const project = gcp.organizations.getProject({});
 * const instance = new gcp.sql.DatabaseInstance("instance", {
 *     name: "blmt-instance",
 *     databaseVersion: "MYSQL_8_0",
 *     region: "us-central1",
 *     settings: {
 *         tier: "db-f1-micro",
 *         ipConfiguration: {
 *             authorizedNetworks: [
 *                 {
 *                     value: "34.71.242.81",
 *                 },
 *                 {
 *                     value: "34.72.28.29",
 *                 },
 *                 {
 *                     value: "34.67.6.157",
 *                 },
 *                 {
 *                     value: "34.67.234.134",
 *                 },
 *                 {
 *                     value: "34.72.239.218",
 *                 },
 *             ],
 *         },
 *     },
 *     deletionProtection: true,
 * });
 * const db = new gcp.sql.Database("db", {
 *     instance: instance.name,
 *     name: "db",
 * });
 * const pwd = new random.RandomPassword("pwd", {
 *     length: 16,
 *     special: false,
 * });
 * const user = new gcp.sql.User("user", {
 *     name: "user",
 *     instance: instance.name,
 *     host: "%",
 *     password: pwd.result,
 * });
 * const blmtBucket = new gcp.storage.Bucket("blmt_bucket", {
 *     name: "blmt-bucket",
 *     location: "us-central1",
 *     forceDestroy: true,
 * });
 * const blmtConnection = new gcp.bigquery.Connection("blmt_connection", {
 *     project: project.then(project => project.projectId),
 *     location: "us-central1",
 *     connectionId: "blmt-connection",
 *     friendlyName: "Datastream BLMT Test Connection",
 *     description: "Connection for Datastream BLMT test",
 *     cloudResource: {},
 * });
 * const blmtConnectionBucketAdmin = new gcp.storage.BucketIAMMember("blmt_connection_bucket_admin", {
 *     bucket: blmtBucket.name,
 *     role: "roles/storage.admin",
 *     member: blmtConnection.cloudResource.apply(cloudResource => `serviceAccount:${cloudResource?.serviceAccountId}`),
 * });
 * const sourceConnectionProfile = new gcp.datastream.ConnectionProfile("source_connection_profile", {
 *     displayName: "Source connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "blmt-source-profile",
 *     mysqlProfile: {
 *         hostname: instance.publicIpAddress,
 *         username: user.name,
 *         password: user.password,
 *     },
 * });
 * const destinationConnectionProfile = new gcp.datastream.ConnectionProfile("destination_connection_profile", {
 *     displayName: "Connection profile",
 *     location: "us-central1",
 *     connectionProfileId: "blmt-destination-profile",
 *     bigqueryProfile: {},
 * });
 * const _default = new gcp.datastream.Stream("default", {
 *     streamId: "blmt-stream",
 *     location: "us-central1",
 *     displayName: "My BLMT stream",
 *     sourceConfig: {
 *         sourceConnectionProfile: sourceConnectionProfile.id,
 *         mysqlSourceConfig: {},
 *     },
 *     destinationConfig: {
 *         destinationConnectionProfile: destinationConnectionProfile.id,
 *         bigqueryDestinationConfig: {
 *             sourceHierarchyDatasets: {
 *                 datasetTemplate: {
 *                     location: "us-central1",
 *                 },
 *             },
 *             blmtConfig: {
 *                 bucket: blmtBucket.name,
 *                 connectionName: pulumi.all([blmtConnection.project, blmtConnection.location, blmtConnection.connectionId]).apply(([project, location, connectionId]) => `${project}.${location}.${connectionId}`),
 *                 fileFormat: "PARQUET",
 *                 tableFormat: "ICEBERG",
 *                 rootPath: "/",
 *             },
 *             appendOnly: {},
 *         },
 *     },
 *     backfillNone: {},
 * });
 * ```
 * ### Datastream Stream Mongodb
 *
 * ## Import
 *
 * Stream can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/streams/{{stream_id}}`
 *
 * * `{{project}}/{{location}}/{{stream_id}}`
 *
 * * `{{location}}/{{stream_id}}`
 *
 * When using the `pulumi import` command, Stream can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:datastream/stream:Stream default projects/{{project}}/locations/{{location}}/streams/{{stream_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:datastream/stream:Stream default {{project}}/{{location}}/{{stream_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:datastream/stream:Stream default {{location}}/{{stream_id}}
 * ```
 */
export declare class Stream extends pulumi.CustomResource {
    /**
     * Get an existing Stream 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?: StreamState, opts?: pulumi.CustomResourceOptions): Stream;
    /**
     * Returns true if the given object is an instance of Stream.  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 Stream;
    /**
     * Backfill strategy to automatically backfill the Stream's objects. Specific objects can be excluded.
     * Structure is documented below.
     */
    readonly backfillAll: pulumi.Output<outputs.datastream.StreamBackfillAll | undefined>;
    /**
     * Backfill strategy to disable automatic backfill for the Stream's objects.
     */
    readonly backfillNone: pulumi.Output<outputs.datastream.StreamBackfillNone | undefined>;
    /**
     * Create the stream without validating it.
     */
    readonly createWithoutValidation: pulumi.Output<boolean | undefined>;
    /**
     * A reference to a KMS encryption key. If provided, it will be used to encrypt the data. If left blank, data
     * will be encrypted using an internal Stream-specific encryption key provisioned through KMS.
     */
    readonly customerManagedEncryptionKey: pulumi.Output<string | undefined>;
    /**
     * Desired state of the Stream. Set this field to `RUNNING` to start the stream,
     * `NOT_STARTED` to create the stream without starting and `PAUSED` to pause
     * the stream from a `RUNNING` state.
     * Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED
     */
    readonly desiredState: pulumi.Output<string | undefined>;
    /**
     * Destination connection profile configuration.
     * Structure is documented below.
     */
    readonly destinationConfig: pulumi.Output<outputs.datastream.StreamDestinationConfig>;
    /**
     * Display name.
     */
    readonly displayName: pulumi.Output<string>;
    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    readonly effectiveLabels: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * Labels.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    readonly labels: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * The name of the location this stream is located in.
     */
    readonly location: pulumi.Output<string>;
    /**
     * The stream's name.
     */
    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>;
    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    readonly pulumiLabels: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * Source connection profile configuration.
     * Structure is documented below.
     */
    readonly sourceConfig: pulumi.Output<outputs.datastream.StreamSourceConfig>;
    /**
     * The state of the stream.
     */
    readonly state: pulumi.Output<string>;
    /**
     * The stream identifier.
     */
    readonly streamId: pulumi.Output<string>;
    /**
     * Create a Stream 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: StreamArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering Stream resources.
 */
export interface StreamState {
    /**
     * Backfill strategy to automatically backfill the Stream's objects. Specific objects can be excluded.
     * Structure is documented below.
     */
    backfillAll?: pulumi.Input<inputs.datastream.StreamBackfillAll>;
    /**
     * Backfill strategy to disable automatic backfill for the Stream's objects.
     */
    backfillNone?: pulumi.Input<inputs.datastream.StreamBackfillNone>;
    /**
     * Create the stream without validating it.
     */
    createWithoutValidation?: pulumi.Input<boolean>;
    /**
     * A reference to a KMS encryption key. If provided, it will be used to encrypt the data. If left blank, data
     * will be encrypted using an internal Stream-specific encryption key provisioned through KMS.
     */
    customerManagedEncryptionKey?: pulumi.Input<string>;
    /**
     * Desired state of the Stream. Set this field to `RUNNING` to start the stream,
     * `NOT_STARTED` to create the stream without starting and `PAUSED` to pause
     * the stream from a `RUNNING` state.
     * Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED
     */
    desiredState?: pulumi.Input<string>;
    /**
     * Destination connection profile configuration.
     * Structure is documented below.
     */
    destinationConfig?: pulumi.Input<inputs.datastream.StreamDestinationConfig>;
    /**
     * Display name.
     */
    displayName?: pulumi.Input<string>;
    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    effectiveLabels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * Labels.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    labels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The name of the location this stream is located in.
     */
    location?: pulumi.Input<string>;
    /**
     * The stream's name.
     */
    name?: pulumi.Input<string>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string>;
    /**
     * The combination of labels configured directly on the resource
     * and default labels configured on the provider.
     */
    pulumiLabels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * Source connection profile configuration.
     * Structure is documented below.
     */
    sourceConfig?: pulumi.Input<inputs.datastream.StreamSourceConfig>;
    /**
     * The state of the stream.
     */
    state?: pulumi.Input<string>;
    /**
     * The stream identifier.
     */
    streamId?: pulumi.Input<string>;
}
/**
 * The set of arguments for constructing a Stream resource.
 */
export interface StreamArgs {
    /**
     * Backfill strategy to automatically backfill the Stream's objects. Specific objects can be excluded.
     * Structure is documented below.
     */
    backfillAll?: pulumi.Input<inputs.datastream.StreamBackfillAll>;
    /**
     * Backfill strategy to disable automatic backfill for the Stream's objects.
     */
    backfillNone?: pulumi.Input<inputs.datastream.StreamBackfillNone>;
    /**
     * Create the stream without validating it.
     */
    createWithoutValidation?: pulumi.Input<boolean>;
    /**
     * A reference to a KMS encryption key. If provided, it will be used to encrypt the data. If left blank, data
     * will be encrypted using an internal Stream-specific encryption key provisioned through KMS.
     */
    customerManagedEncryptionKey?: pulumi.Input<string>;
    /**
     * Desired state of the Stream. Set this field to `RUNNING` to start the stream,
     * `NOT_STARTED` to create the stream without starting and `PAUSED` to pause
     * the stream from a `RUNNING` state.
     * Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED
     */
    desiredState?: pulumi.Input<string>;
    /**
     * Destination connection profile configuration.
     * Structure is documented below.
     */
    destinationConfig: pulumi.Input<inputs.datastream.StreamDestinationConfig>;
    /**
     * Display name.
     */
    displayName: pulumi.Input<string>;
    /**
     * Labels.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    labels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The name of the location this stream is located in.
     */
    location: pulumi.Input<string>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string>;
    /**
     * Source connection profile configuration.
     * Structure is documented below.
     */
    sourceConfig: pulumi.Input<inputs.datastream.StreamSourceConfig>;
    /**
     * The stream identifier.
     */
    streamId: pulumi.Input<string>;
}
