UNPKG

@pulumi/gcp

Version:

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

134 lines 5.68 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.BatchOperationsJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Storage Batch Operations (SBO) is a Cloud Storage management feature that offers a * seamless experience to perform single batch operations on millions of GCS objects in a * serverless manner. * * ## Example Usage * * ### Storage Batch Operations * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bucket = new gcp.storage.Bucket("bucket", { * name: "tf-sample-bucket", * location: "us-central1", * forceDestroy: true, * }); * const tf_job = new gcp.storage.BatchOperationsJob("tf-job", { * jobId: "tf-job", * bucketList: { * buckets: { * bucket: bucket.name, * prefixList: { * includedObjectPrefixes: ["bkt"], * }, * }, * }, * putMetadata: { * customMetadata: { * key: "value", * }, * }, * deleteProtection: false, * }); * ``` * * ## Import * * Job can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/global/jobs/{{job_id}}` * * * `{{project}}/{{job_id}}` * * * `{{job_id}}` * * When using the `pulumi import` command, Job can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:storage/batchOperationsJob:BatchOperationsJob default projects/{{project}}/locations/global/jobs/{{job_id}} * ``` * * ```sh * $ pulumi import gcp:storage/batchOperationsJob:BatchOperationsJob default {{project}}/{{job_id}} * ``` * * ```sh * $ pulumi import gcp:storage/batchOperationsJob:BatchOperationsJob default {{job_id}} * ``` */ class BatchOperationsJob extends pulumi.CustomResource { /** * Get an existing BatchOperationsJob 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 BatchOperationsJob(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BatchOperationsJob. 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'] === BatchOperationsJob.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["bucketList"] = state ? state.bucketList : undefined; resourceInputs["completeTime"] = state ? state.completeTime : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["deleteObject"] = state ? state.deleteObject : undefined; resourceInputs["deleteProtection"] = state ? state.deleteProtection : undefined; resourceInputs["jobId"] = state ? state.jobId : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["putMetadata"] = state ? state.putMetadata : undefined; resourceInputs["putObjectHold"] = state ? state.putObjectHold : undefined; resourceInputs["rewriteObject"] = state ? state.rewriteObject : undefined; resourceInputs["scheduleTime"] = state ? state.scheduleTime : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; resourceInputs["bucketList"] = args ? args.bucketList : undefined; resourceInputs["deleteObject"] = args ? args.deleteObject : undefined; resourceInputs["deleteProtection"] = args ? args.deleteProtection : undefined; resourceInputs["jobId"] = args ? args.jobId : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["putMetadata"] = args ? args.putMetadata : undefined; resourceInputs["putObjectHold"] = args ? args.putObjectHold : undefined; resourceInputs["rewriteObject"] = args ? args.rewriteObject : undefined; resourceInputs["completeTime"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["scheduleTime"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BatchOperationsJob.__pulumiType, name, resourceInputs, opts); } } exports.BatchOperationsJob = BatchOperationsJob; /** @internal */ BatchOperationsJob.__pulumiType = 'gcp:storage/batchOperationsJob:BatchOperationsJob'; //# sourceMappingURL=batchOperationsJob.js.map