@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
216 lines • 8.67 kB
JavaScript
;
// *** 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.AccountConnector = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Description
*
* ## Example Usage
*
* ### Developer Connect Account Connector Github
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "GITHUB",
* scopes: ["repo"],
* },
* });
* ```
* ### Developer Connect Account Connector Gitlab
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "GITLAB",
* scopes: ["api"],
* },
* });
* ```
* ### Developer Connect Account Connector Google
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "GOOGLE",
* scopes: ["https://www.googleapis.com/auth/drive.readonly"],
* },
* });
* ```
* ### Developer Connect Account Connector Sentry
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "SENTRY",
* scopes: ["org:read"],
* },
* });
* ```
* ### Developer Connect Account Connector Rovo
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "ROVO",
* scopes: ["rovo"],
* },
* });
* ```
* ### Developer Connect Account Connector New Relic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "NEW_RELIC",
* scopes: [],
* },
* });
* ```
* ### Developer Connect Account Connector Datastax
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_account_connector = new gcp.developerconnect.AccountConnector("my-account-connector", {
* location: "us-central1",
* accountConnectorId: "tf-test-ac",
* providerOauthConfig: {
* systemProviderId: "DATASTAX",
* scopes: [],
* },
* });
* ```
*
* ## Import
*
* AccountConnector can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/accountConnectors/{{account_connector_id}}`
*
* * `{{project}}/{{location}}/{{account_connector_id}}`
*
* * `{{location}}/{{account_connector_id}}`
*
* When using the `pulumi import` command, AccountConnector can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:developerconnect/accountConnector:AccountConnector default projects/{{project}}/locations/{{location}}/accountConnectors/{{account_connector_id}}
* ```
*
* ```sh
* $ pulumi import gcp:developerconnect/accountConnector:AccountConnector default {{project}}/{{location}}/{{account_connector_id}}
* ```
*
* ```sh
* $ pulumi import gcp:developerconnect/accountConnector:AccountConnector default {{location}}/{{account_connector_id}}
* ```
*/
class AccountConnector extends pulumi.CustomResource {
/**
* Get an existing AccountConnector 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 AccountConnector(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AccountConnector. 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'] === AccountConnector.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountConnectorId"] = state ? state.accountConnectorId : undefined;
resourceInputs["annotations"] = state ? state.annotations : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["effectiveAnnotations"] = state ? state.effectiveAnnotations : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["oauthStartUri"] = state ? state.oauthStartUri : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["providerOauthConfig"] = state ? state.providerOauthConfig : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.accountConnectorId === undefined) && !opts.urn) {
throw new Error("Missing required property 'accountConnectorId'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["accountConnectorId"] = args ? args.accountConnectorId : undefined;
resourceInputs["annotations"] = args ? args.annotations : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["providerOauthConfig"] = args ? args.providerOauthConfig : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveAnnotations"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["oauthStartUri"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(AccountConnector.__pulumiType, name, resourceInputs, opts);
}
}
exports.AccountConnector = AccountConnector;
/** @internal */
AccountConnector.__pulumiType = 'gcp:developerconnect/accountConnector:AccountConnector';
//# sourceMappingURL=accountConnector.js.map