UNPKG

@pulumi/gcp

Version:

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

130 lines 6.9 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.GitRepositoryLink = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A git repository link to a parent connection. * * To get more information about GitRepositoryLink, see: * * * [API documentation](https://cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks) * * How-to Guides * * [Official Documentation](https://cloud.google.com/developer-connect/docs/overview) * * ## Example Usage * * ## Import * * GitRepositoryLink can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}}` * * * `{{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}}` * * * `{{location}}/{{parent_connection}}/{{git_repository_link_id}}` * * When using the `pulumi import` command, GitRepositoryLink can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default projects/{{project}}/locations/{{location}}/connections/{{parent_connection}}/gitRepositoryLinks/{{git_repository_link_id}} * ``` * * ```sh * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{project}}/{{location}}/{{parent_connection}}/{{git_repository_link_id}} * ``` * * ```sh * $ pulumi import gcp:developerconnect/gitRepositoryLink:GitRepositoryLink default {{location}}/{{parent_connection}}/{{git_repository_link_id}} * ``` */ class GitRepositoryLink extends pulumi.CustomResource { /** * Get an existing GitRepositoryLink 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 GitRepositoryLink(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GitRepositoryLink. 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'] === GitRepositoryLink.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["annotations"] = state ? state.annotations : undefined; resourceInputs["cloneUri"] = state ? state.cloneUri : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["deleteTime"] = state ? state.deleteTime : undefined; resourceInputs["effectiveAnnotations"] = state ? state.effectiveAnnotations : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["gitRepositoryLinkId"] = state ? state.gitRepositoryLinkId : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["parentConnection"] = state ? state.parentConnection : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["reconciling"] = state ? state.reconciling : undefined; resourceInputs["uid"] = state ? state.uid : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.cloneUri === undefined) && !opts.urn) { throw new Error("Missing required property 'cloneUri'"); } if ((!args || args.gitRepositoryLinkId === undefined) && !opts.urn) { throw new Error("Missing required property 'gitRepositoryLinkId'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } if ((!args || args.parentConnection === undefined) && !opts.urn) { throw new Error("Missing required property 'parentConnection'"); } resourceInputs["annotations"] = args ? args.annotations : undefined; resourceInputs["cloneUri"] = args ? args.cloneUri : undefined; resourceInputs["etag"] = args ? args.etag : undefined; resourceInputs["gitRepositoryLinkId"] = args ? args.gitRepositoryLinkId : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["parentConnection"] = args ? args.parentConnection : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["deleteTime"] = undefined /*out*/; resourceInputs["effectiveAnnotations"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; resourceInputs["reconciling"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(GitRepositoryLink.__pulumiType, name, resourceInputs, opts); } } exports.GitRepositoryLink = GitRepositoryLink; /** @internal */ GitRepositoryLink.__pulumiType = 'gcp:developerconnect/gitRepositoryLink:GitRepositoryLink'; //# sourceMappingURL=gitRepositoryLink.js.map