UNPKG

@pulumi/gcp

Version:

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

135 lines 6.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! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Curation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Description * * ## Example Usage * * ### Apihub Curation Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const apihubCurationBasic = new gcp.apihub.Curation("apihub_curation_basic", { * location: "us-central1", * curationId: "test", * project: "apihub-terraform", * displayName: "Test Curation", * description: "This is a sample curation resource managed by Terraform.", * endpoint: { * applicationIntegrationEndpointDetails: { * triggerId: "api_trigger/curation_API_1", * uri: "https://integrations.googleapis.com/v1/projects/1082615593856/locations/us-central1/integrations/curation:execute", * }, * }, * }); * ``` * * ## Import * * Curation can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/curations/{{curation_id}}` * * * `{{project}}/{{location}}/{{curation_id}}` * * * `{{location}}/{{curation_id}}` * * When using the `pulumi import` command, Curation can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apihub/curation:Curation default projects/{{project}}/locations/{{location}}/curations/{{curation_id}} * ``` * * ```sh * $ pulumi import gcp:apihub/curation:Curation default {{project}}/{{location}}/{{curation_id}} * ``` * * ```sh * $ pulumi import gcp:apihub/curation:Curation default {{location}}/{{curation_id}} * ``` */ class Curation extends pulumi.CustomResource { /** * Get an existing Curation 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 Curation(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Curation. 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'] === Curation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["curationId"] = state ? state.curationId : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["endpoint"] = state ? state.endpoint : undefined; resourceInputs["lastExecutionErrorCode"] = state ? state.lastExecutionErrorCode : undefined; resourceInputs["lastExecutionErrorMessage"] = state ? state.lastExecutionErrorMessage : undefined; resourceInputs["lastExecutionState"] = state ? state.lastExecutionState : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["pluginInstanceActions"] = state ? state.pluginInstanceActions : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.curationId === undefined) && !opts.urn) { throw new Error("Missing required property 'curationId'"); } if ((!args || args.displayName === undefined) && !opts.urn) { throw new Error("Missing required property 'displayName'"); } if ((!args || args.endpoint === undefined) && !opts.urn) { throw new Error("Missing required property 'endpoint'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["curationId"] = args ? args.curationId : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["displayName"] = args ? args.displayName : undefined; resourceInputs["endpoint"] = args ? args.endpoint : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["lastExecutionErrorCode"] = undefined /*out*/; resourceInputs["lastExecutionErrorMessage"] = undefined /*out*/; resourceInputs["lastExecutionState"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["pluginInstanceActions"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Curation.__pulumiType, name, resourceInputs, opts); } } exports.Curation = Curation; /** @internal */ Curation.__pulumiType = 'gcp:apihub/curation:Curation'; //# sourceMappingURL=curation.js.map