UNPKG

@pulumi/gcp

Version:

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

163 lines 6.45 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.AiTensorboard = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Tensorboard is a physical database that stores users' training metrics. A default Tensorboard is provided in each region of a GCP project. If needed users can also create extra Tensorboards in their projects. * * To get more information about Tensorboard, see: * * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.tensorboards) * * How-to Guides * * [Official Documentation](https://cloud.google.com/vertex-ai/docs) * * ## Example Usage * * ### Vertex Ai Tensorboard * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const tensorboard = new gcp.vertex.AiTensorboard("tensorboard", { * displayName: "terraform", * description: "sample description", * labels: { * key1: "value1", * key2: "value2", * }, * region: "us-central1", * }); * ``` * ### Vertex Ai Tensorboard Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const cryptoKey = new gcp.kms.CryptoKeyIAMMember("crypto_key", { * cryptoKeyId: "kms-name", * role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", * member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com`), * }); * const tensorboard = new gcp.vertex.AiTensorboard("tensorboard", { * displayName: "terraform", * description: "sample description", * labels: { * key1: "value1", * key2: "value2", * }, * region: "us-central1", * encryptionSpec: { * kmsKeyName: "kms-name", * }, * }, { * dependsOn: [cryptoKey], * }); * ``` * * ## Import * * Tensorboard can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/tensorboards/{{name}}` * * * `{{project}}/{{region}}/{{name}}` * * * `{{region}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, Tensorboard can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:vertex/aiTensorboard:AiTensorboard default projects/{{project}}/locations/{{region}}/tensorboards/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiTensorboard:AiTensorboard default {{project}}/{{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiTensorboard:AiTensorboard default {{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiTensorboard:AiTensorboard default {{name}} * ``` */ class AiTensorboard extends pulumi.CustomResource { /** * Get an existing AiTensorboard 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 AiTensorboard(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AiTensorboard. 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'] === AiTensorboard.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["blobStoragePathPrefix"] = state?.blobStoragePathPrefix; resourceInputs["createTime"] = state?.createTime; resourceInputs["description"] = state?.description; resourceInputs["displayName"] = state?.displayName; resourceInputs["effectiveLabels"] = state?.effectiveLabels; resourceInputs["encryptionSpec"] = state?.encryptionSpec; resourceInputs["labels"] = state?.labels; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["pulumiLabels"] = state?.pulumiLabels; resourceInputs["region"] = state?.region; resourceInputs["runCount"] = state?.runCount; resourceInputs["updateTime"] = state?.updateTime; } else { const args = argsOrState; if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } resourceInputs["description"] = args?.description; resourceInputs["displayName"] = args?.displayName; resourceInputs["encryptionSpec"] = args?.encryptionSpec; resourceInputs["labels"] = args?.labels; resourceInputs["project"] = args?.project; resourceInputs["region"] = args?.region; resourceInputs["blobStoragePathPrefix"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; resourceInputs["runCount"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(AiTensorboard.__pulumiType, name, resourceInputs, opts); } } exports.AiTensorboard = AiTensorboard; /** @internal */ AiTensorboard.__pulumiType = 'gcp:vertex/aiTensorboard:AiTensorboard'; //# sourceMappingURL=aiTensorboard.js.map