UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

408 lines • 17.1 kB
"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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.GoldengateConnection = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * GoldengateConnection is a resource that represents metadata to establish a connection to a source or target data. * * ## Example Usage * * ### Oracledatabase Goldengate Connection Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "asia-south1", * project: "my-project", * gcpOracleZone: "asia-south1-b-r1", * properties: { * displayName: "my-connection display name", * connectionType: "ORACLE", * oracleConnectionProperties: { * technologyType: "ORACLE_AUTONOMOUS_DATABASE_AT_GOOGLE_CLOUD", * connectionString: "jdbc:oracle:thin:@//10.0.0.5:1521/ORCL", * username: "admin", * password: "GenerateWallet@123", * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "us-east4", * project: "my-project", * odbNetwork: "projects/my-project/locations/us-east4/odbNetworks/my-network", * odbSubnet: "projects/my-project/locations/us-east4/odbNetworks/my-network/odbSubnets/my-subnet", * gcpOracleZone: "us-east4-b-r1", * labels: { * "label-one": "value-one", * }, * properties: { * displayName: "my-connection display name", * connectionType: "ORACLE", * routingMethod: "DEDICATED_ENDPOINT", * oracleConnectionProperties: { * technologyType: "ORACLE_AUTONOMOUS_DATABASE_AT_GOOGLE_CLOUD", * username: "admin", * password: "GenerateWallet@123", * sessionMode: "DIRECT", * gcpOracleDatabaseId: "projects/my-project/locations/us-east4/autonomousDatabases/my-autonomous-database", * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Mysql * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "northamerica-northeast1", * project: "my-project", * gcpOracleZone: "northamerica-northeast1-a-r1", * properties: { * displayName: "my-connection display name", * connectionType: "MYSQL", * mysqlConnectionProperties: { * technologyType: "MYSQL_SERVER", * username: "mysql_user", * password: "mysql_password", * host: "mysql.example.com", * port: 3306, * database: "mydb", * securityProtocol: "MTLS", * sslMode: "PREFERRED", * sslCertFile: "YmFzZTY0LWNsaWVudC1jZXJ0LWZpbGUtY29udGVudC1kZW1vLWdnb25u", * sslKeyFile: "YmFzZTY0LWNsaWVudC1rZXktZmlsZS1jb250ZW50LWRlbW8tZ2dvbm4=", * additionalAttributes: [{ * key: "attr1", * value: "value1", * }], * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Postgresql * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "southamerica-east1", * project: "my-project", * gcpOracleZone: "southamerica-east1-a-r1", * properties: { * displayName: "my-connection display name", * connectionType: "POSTGRESQL", * postgresqlConnectionProperties: { * technologyType: "POSTGRESQL_SERVER", * database: "postgres_app_db", * host: "postgres.corp.example.com", * port: 5432, * username: "pg_replicator", * password: "PostgresReplicationP@ssw0rd!", * securityProtocol: "PLAIN", * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Redis * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "asia-northeast2", * project: "my-project", * gcpOracleZone: "asia-northeast2-a-r1", * properties: { * displayName: "my-connection display name", * connectionType: "REDIS", * redisConnectionProperties: { * technologyType: "REDIS", * servers: "redis-shard1.example.com:6379,redis-shard2.example.com:6379", * securityProtocol: "PLAIN", * authenticationType: "BASIC", * username: "redis_agent", * password: "RedisSecureCacheP@ssword123!", * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Kafka * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "europe-west8", * project: "my-project", * gcpOracleZone: "europe-west8-a-r1", * properties: { * displayName: "my-connection display name", * connectionType: "KAFKA", * kafkaConnectionProperties: { * technologyType: "APACHE_KAFKA", * streamPoolId: "ocid1.streampool.oc1..example", * clusterId: "ocid1.kafkacluster.oc1..example", * bootstrapServers: [{ * host: "kafka.example.com", * port: 9092, * privateIpAddress: "10.0.0.1", * }], * securityProtocol: "SSL", * consumerPropertiesFile: "Y29uc3VtZXIucHJvcGVydGllcz1kZW1v", * producerPropertiesFile: "cHJvZHVjZXIucHJvcGVydGllcz1kZW1v", * useResourcePrincipal: false, * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Iceberg * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "australia-southeast1", * project: "my-project", * gcpOracleZone: "australia-southeast1-b-r1", * properties: { * displayName: "my-connection display name", * connectionType: "ICEBERG", * icebergConnectionProperties: { * technologyType: "APACHE_ICEBERG", * catalog: { * catalogType: "GLUE", * glueIcebergCatalog: { * glueId: "glue_catalog_id", * }, * }, * storage: { * storageType: "AMAZON_S3", * amazonS3IcebergStorage: { * schemeType: "S3", * accessKeyId: "AKIAIOSFODNN7EXAMPLE", * secretAccessKeySecret: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", * region: "us-east-1", * bucket: "iceberg-bucket", * endpoint: "https://s3.amazonaws.com", * }, * }, * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Snowflake * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "europe-west3", * project: "my-project", * gcpOracleZone: "europe-west3-b-r1", * properties: { * displayName: "my-connection display name", * connectionType: "SNOWFLAKE", * snowflakeConnectionProperties: { * technologyType: "SNOWFLAKE", * connectionUrl: "jdbc:snowflake://xy12345.snowflakecomputing.com/?warehouse=COMPUTE_WH&db=ANALYTICS_DB", * authenticationType: "BASIC", * username: "snowflake_sync_user", * password: "SnowflakeBasicP@ssword123!", * }, * }, * deletionProtection: true, * }); * ``` * ### Oracledatabase Goldengate Connection Jms * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const connection = new gcp.oracledatabase.GoldengateConnection("connection", { * goldengateConnectionId: "my-connection", * location: "asia-northeast1", * project: "my-project", * gcpOracleZone: "asia-northeast1-a-r1", * properties: { * displayName: "my-connection display name", * connectionType: "JAVA_MESSAGE_SERVICE", * javaMessageServiceConnectionProperties: { * technologyType: "ORACLE_WEBLOGIC_JMS", * useJndi: true, * jndiConnectionFactory: "ConnectionFactory", * jndiProviderUrl: "tcp://jms.example.com:61616?jms.prefetchPolicy.all=1000", * jndiInitialContextFactory: "org.apache.activemq.jndi.ActiveMQInitialContextFactory", * jndiSecurityPrincipal: "jms_user", * jndiSecurityCredentialsSecret: "jms_credentials", * username: "jms_user", * password: "jms_password", * securityProtocol: "MTLS", * authenticationType: "BASIC", * trustStoreFile: "YmFzZTY0LXRydXN0c3RvcmUtZmlsZS1jb250ZW50LWRlbW8tZ2dvbm4=", * trustStorePassword: "truststore_pass", * keyStoreFile: "YmFzZTY0LWtleXN0b3JlLWZpbGUtY29udGVudC1kZW1vLWdnb25u", * keyStorePassword: "keystore_pass", * sslKeyPassword: "ssl_key_pass", * }, * }, * deletionProtection: true, * }); * ``` * * ## Import * * GoldengateConnection can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/goldengateConnections/{{goldengate_connection_id}}` * * `{{project}}/{{location}}/{{goldengate_connection_id}}` * * `{{location}}/{{goldengate_connection_id}}` * * When using the `pulumi import` command, GoldengateConnection can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:oracledatabase/goldengateConnection:GoldengateConnection default projects/{{project}}/locations/{{location}}/goldengateConnections/{{goldengate_connection_id}} * $ pulumi import gcp:oracledatabase/goldengateConnection:GoldengateConnection default {{project}}/{{location}}/{{goldengate_connection_id}} * $ pulumi import gcp:oracledatabase/goldengateConnection:GoldengateConnection default {{location}}/{{goldengate_connection_id}} * ``` */ class GoldengateConnection extends pulumi.CustomResource { /** * Get an existing GoldengateConnection 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 GoldengateConnection(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:oracledatabase/goldengateConnection:GoldengateConnection'; /** * Returns true if the given object is an instance of GoldengateConnection. 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'] === GoldengateConnection.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["deletionProtection"] = state?.deletionProtection; resourceInputs["effectiveLabels"] = state?.effectiveLabels; resourceInputs["entitlementId"] = state?.entitlementId; resourceInputs["gcpOracleZone"] = state?.gcpOracleZone; resourceInputs["goldengateConnectionId"] = state?.goldengateConnectionId; resourceInputs["labels"] = state?.labels; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["ociUrl"] = state?.ociUrl; resourceInputs["odbNetwork"] = state?.odbNetwork; resourceInputs["odbSubnet"] = state?.odbSubnet; resourceInputs["project"] = state?.project; resourceInputs["properties"] = state?.properties; resourceInputs["pulumiLabels"] = state?.pulumiLabels; } else { const args = argsOrState; if (args?.goldengateConnectionId === undefined && !opts.urn) { throw new Error("Missing required property 'goldengateConnectionId'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.properties === undefined && !opts.urn) { throw new Error("Missing required property 'properties'"); } resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["deletionProtection"] = args?.deletionProtection; resourceInputs["gcpOracleZone"] = args?.gcpOracleZone; resourceInputs["goldengateConnectionId"] = args?.goldengateConnectionId; resourceInputs["labels"] = args?.labels; resourceInputs["location"] = args?.location; resourceInputs["odbNetwork"] = args?.odbNetwork; resourceInputs["odbSubnet"] = args?.odbSubnet; resourceInputs["project"] = args?.project; resourceInputs["properties"] = args?.properties; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["entitlementId"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["ociUrl"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(GoldengateConnection.__pulumiType, name, resourceInputs, opts); } } exports.GoldengateConnection = GoldengateConnection; //# sourceMappingURL=goldengateConnection.js.map