@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
149 lines • 7.44 kB
JavaScript
;
// *** 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.GdcServiceInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* A service instance is an instance of the Dataproc operator running on a GDC cluster.
*
* To get more information about ServiceInstance, see:
*
* * [API documentation](https://cloud.google.com/dataproc-gdc/docs/reference/rest/v1/projects.locations.serviceInstances)
* * How-to Guides
* * [Dataproc Intro](https://cloud.google.com/dataproc/)
*
* ## Example Usage
*
* ### Dataprocgdc Serviceinstance
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const service_instance = new gcp.dataproc.GdcServiceInstance("service-instance", {
* serviceInstanceId: "tf-e2e-service-instance",
* project: "my-project",
* location: "us-west2",
* gdceCluster: {
* gdceCluster: "projects/gdce-cluster-monitoring/locations/us-west2/clusters/gdce-prism-prober-ord106",
* },
* displayName: "A service instance",
* labels: {
* "test-label": "label-value",
* },
* serviceAccount: "dataprocgdc-cep-workflows@gdce-cluster-monitoring.iam.gserviceaccount.com",
* });
* ```
*
* ## Import
*
* ServiceInstance can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}}`
*
* * `{{project}}/{{location}}/{{service_instance_id}}`
*
* * `{{location}}/{{service_instance_id}}`
*
* When using the `pulumi import` command, ServiceInstance can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:dataproc/gdcServiceInstance:GdcServiceInstance default projects/{{project}}/locations/{{location}}/serviceInstances/{{service_instance_id}}
* ```
*
* ```sh
* $ pulumi import gcp:dataproc/gdcServiceInstance:GdcServiceInstance default {{project}}/{{location}}/{{service_instance_id}}
* ```
*
* ```sh
* $ pulumi import gcp:dataproc/gdcServiceInstance:GdcServiceInstance default {{location}}/{{service_instance_id}}
* ```
*/
class GdcServiceInstance extends pulumi.CustomResource {
/**
* Get an existing GdcServiceInstance 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 GdcServiceInstance(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of GdcServiceInstance. 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'] === GdcServiceInstance.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["effectiveServiceAccount"] = state ? state.effectiveServiceAccount : undefined;
resourceInputs["gdceCluster"] = state ? state.gdceCluster : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["reconciling"] = state ? state.reconciling : undefined;
resourceInputs["requestedState"] = state ? state.requestedState : undefined;
resourceInputs["serviceAccount"] = state ? state.serviceAccount : undefined;
resourceInputs["serviceInstanceId"] = state ? state.serviceInstanceId : undefined;
resourceInputs["sparkServiceInstanceConfig"] = state ? state.sparkServiceInstanceConfig : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["stateMessage"] = state ? state.stateMessage : undefined;
resourceInputs["uid"] = state ? state.uid : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.serviceInstanceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'serviceInstanceId'");
}
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["gdceCluster"] = args ? args.gdceCluster : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["serviceAccount"] = args ? args.serviceAccount : undefined;
resourceInputs["serviceInstanceId"] = args ? args.serviceInstanceId : undefined;
resourceInputs["sparkServiceInstanceConfig"] = args ? args.sparkServiceInstanceConfig : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["effectiveServiceAccount"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["reconciling"] = undefined /*out*/;
resourceInputs["requestedState"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["stateMessage"] = 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(GdcServiceInstance.__pulumiType, name, resourceInputs, opts);
}
}
exports.GdcServiceInstance = GdcServiceInstance;
/** @internal */
GdcServiceInstance.__pulumiType = 'gcp:dataproc/gdcServiceInstance:GdcServiceInstance';
//# sourceMappingURL=gdcServiceInstance.js.map