@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
254 lines (253 loc) • 9.31 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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}}
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: BatchOperationsJobState, opts?: pulumi.CustomResourceOptions): BatchOperationsJob;
/**
* 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: any): obj is BatchOperationsJob;
/**
* List of buckets and their objects to be transformed. Currently, only one bucket configuration is supported. If multiple buckets are specified, an error will be returned
* Structure is documented below.
*/
readonly bucketList: pulumi.Output<outputs.storage.BatchOperationsJobBucketList | undefined>;
/**
* The time that the job was completed.
*/
readonly completeTime: pulumi.Output<string>;
/**
* The timestamp at which this storage batch operation was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* allows batch operations to delete objects in bucket
* Structure is documented below.
*/
readonly deleteObject: pulumi.Output<outputs.storage.BatchOperationsJobDeleteObject | undefined>;
/**
* If set to `true`, the storage batch operation job will not be deleted and new job will be created.
*/
readonly deleteProtection: pulumi.Output<boolean | undefined>;
/**
* The ID of the job.
*/
readonly jobId: pulumi.Output<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* allows batch operations to update metadata for objects in bucket
* Structure is documented below.
*/
readonly putMetadata: pulumi.Output<outputs.storage.BatchOperationsJobPutMetadata | undefined>;
/**
* allows to update temporary hold or eventBased hold for objects in bucket.
* Structure is documented below.
*/
readonly putObjectHold: pulumi.Output<outputs.storage.BatchOperationsJobPutObjectHold | undefined>;
/**
* allows to update encryption key for objects in bucket.
* Structure is documented below.
*/
readonly rewriteObject: pulumi.Output<outputs.storage.BatchOperationsJobRewriteObject | undefined>;
/**
* The time that the job was scheduled.
*/
readonly scheduleTime: pulumi.Output<string>;
/**
* State of the job.
*/
readonly state: pulumi.Output<string>;
/**
* The timestamp at which this storage batch operation was most recently updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a BatchOperationsJob resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: BatchOperationsJobArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering BatchOperationsJob resources.
*/
export interface BatchOperationsJobState {
/**
* List of buckets and their objects to be transformed. Currently, only one bucket configuration is supported. If multiple buckets are specified, an error will be returned
* Structure is documented below.
*/
bucketList?: pulumi.Input<inputs.storage.BatchOperationsJobBucketList>;
/**
* The time that the job was completed.
*/
completeTime?: pulumi.Input<string>;
/**
* The timestamp at which this storage batch operation was created.
*/
createTime?: pulumi.Input<string>;
/**
* allows batch operations to delete objects in bucket
* Structure is documented below.
*/
deleteObject?: pulumi.Input<inputs.storage.BatchOperationsJobDeleteObject>;
/**
* If set to `true`, the storage batch operation job will not be deleted and new job will be created.
*/
deleteProtection?: pulumi.Input<boolean>;
/**
* The ID of the job.
*/
jobId?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* allows batch operations to update metadata for objects in bucket
* Structure is documented below.
*/
putMetadata?: pulumi.Input<inputs.storage.BatchOperationsJobPutMetadata>;
/**
* allows to update temporary hold or eventBased hold for objects in bucket.
* Structure is documented below.
*/
putObjectHold?: pulumi.Input<inputs.storage.BatchOperationsJobPutObjectHold>;
/**
* allows to update encryption key for objects in bucket.
* Structure is documented below.
*/
rewriteObject?: pulumi.Input<inputs.storage.BatchOperationsJobRewriteObject>;
/**
* The time that the job was scheduled.
*/
scheduleTime?: pulumi.Input<string>;
/**
* State of the job.
*/
state?: pulumi.Input<string>;
/**
* The timestamp at which this storage batch operation was most recently updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a BatchOperationsJob resource.
*/
export interface BatchOperationsJobArgs {
/**
* List of buckets and their objects to be transformed. Currently, only one bucket configuration is supported. If multiple buckets are specified, an error will be returned
* Structure is documented below.
*/
bucketList?: pulumi.Input<inputs.storage.BatchOperationsJobBucketList>;
/**
* allows batch operations to delete objects in bucket
* Structure is documented below.
*/
deleteObject?: pulumi.Input<inputs.storage.BatchOperationsJobDeleteObject>;
/**
* If set to `true`, the storage batch operation job will not be deleted and new job will be created.
*/
deleteProtection?: pulumi.Input<boolean>;
/**
* The ID of the job.
*/
jobId?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* allows batch operations to update metadata for objects in bucket
* Structure is documented below.
*/
putMetadata?: pulumi.Input<inputs.storage.BatchOperationsJobPutMetadata>;
/**
* allows to update temporary hold or eventBased hold for objects in bucket.
* Structure is documented below.
*/
putObjectHold?: pulumi.Input<inputs.storage.BatchOperationsJobPutObjectHold>;
/**
* allows to update encryption key for objects in bucket.
* Structure is documented below.
*/
rewriteObject?: pulumi.Input<inputs.storage.BatchOperationsJobRewriteObject>;
}