gcp.storage.BucketObject
Explore with Pulumi AI
Creates a new object inside an existing bucket in Google cloud storage service (GCS).
ACLs can be applied using the gcp.storage.ObjectACL
resource.
For more information see
the official documentation
and
API.
Example Usage
Example creating a public object in an existing
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var picture = new Gcp.Storage.BucketObject("picture", new()
{
Bucket = "image-store",
Source = new FileAsset("/images/nature/garden-tiger-moth.jpg"),
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewBucketObject(ctx, "picture", &storage.BucketObjectArgs{
Bucket: pulumi.String("image-store"),
Source: pulumi.NewFileAsset("/images/nature/garden-tiger-moth.jpg"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.asset.FileAsset;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var picture = new BucketObject("picture", BucketObjectArgs.builder()
.bucket("image-store")
.source(new FileAsset("/images/nature/garden-tiger-moth.jpg"))
.build());
}
}
import pulumi
import pulumi_gcp as gcp
picture = gcp.storage.BucketObject("picture",
bucket="image-store",
source=pulumi.FileAsset("/images/nature/garden-tiger-moth.jpg"))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const picture = new gcp.storage.BucketObject("picture", {
bucket: "image-store",
source: new pulumi.asset.FileAsset("/images/nature/garden-tiger-moth.jpg"),
});
resources:
picture:
type: gcp:storage:BucketObject
properties:
bucket: image-store
source:
fn::FileAsset: /images/nature/garden-tiger-moth.jpg
bucket.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var emptyFolder = new Gcp.Storage.BucketObject("emptyFolder", new()
{
Bucket = "image-store",
Content = " ",
});
// folder name should end with '/'
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewBucketObject(ctx, "emptyFolder", &storage.BucketObjectArgs{
Bucket: pulumi.String("image-store"),
Content: pulumi.String(" "),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var emptyFolder = new BucketObject("emptyFolder", BucketObjectArgs.builder()
.bucket("image-store")
.content(" ")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
empty_folder = gcp.storage.BucketObject("emptyFolder",
bucket="image-store",
content=" ")
# folder name should end with '/'
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const emptyFolder = new gcp.storage.BucketObject("emptyFolder", {
bucket: "image-store",
content: " ",
});
// folder name should end with '/'
resources:
emptyFolder:
type: gcp:storage:BucketObject
properties:
bucket: image-store
content: ' '
Create BucketObject Resource
new BucketObject(name: string, args: BucketObjectArgs, opts?: CustomResourceOptions);
@overload
def BucketObject(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
cache_control: Optional[str] = None,
content: Optional[str] = None,
content_disposition: Optional[str] = None,
content_encoding: Optional[str] = None,
content_language: Optional[str] = None,
content_type: Optional[str] = None,
customer_encryption: Optional[BucketObjectCustomerEncryptionArgs] = None,
detect_md5hash: Optional[str] = None,
event_based_hold: Optional[bool] = None,
kms_key_name: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
storage_class: Optional[str] = None,
temporary_hold: Optional[bool] = None)
@overload
def BucketObject(resource_name: str,
args: BucketObjectArgs,
opts: Optional[ResourceOptions] = None)
func NewBucketObject(ctx *Context, name string, args BucketObjectArgs, opts ...ResourceOption) (*BucketObject, error)
public BucketObject(string name, BucketObjectArgs args, CustomResourceOptions? opts = null)
public BucketObject(String name, BucketObjectArgs args)
public BucketObject(String name, BucketObjectArgs args, CustomResourceOptions options)
type: gcp:storage:BucketObject
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BucketObject Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The BucketObject resource accepts the following input properties:
- Bucket string
The name of the containing bucket.
- Cache
Control string Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- Content string
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- Content
Disposition string Content-Disposition of the object data.
- Content
Encoding string Content-Encoding of the object data.
- Content
Language string Content-Language of the object data.
- Content
Type string Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- Customer
Encryption BucketObject Customer Encryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- Detect
Md5hash string - Event
Based boolHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- Kms
Key stringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- Metadata Dictionary<string, string>
User-provided metadata, in key/value pairs.
One of the following is required:
- Name string
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- Source
Asset
Or Archive A path to the data you want to upload. Must be defined if
content
is not.- Storage
Class string The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- Temporary
Hold bool Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- Bucket string
The name of the containing bucket.
- Cache
Control string Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- Content string
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- Content
Disposition string Content-Disposition of the object data.
- Content
Encoding string Content-Encoding of the object data.
- Content
Language string Content-Language of the object data.
- Content
Type string Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- Customer
Encryption BucketObject Customer Encryption Args Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- Detect
Md5hash string - Event
Based boolHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- Kms
Key stringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- Metadata map[string]string
User-provided metadata, in key/value pairs.
One of the following is required:
- Name string
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- Source
pulumi.
Asset Or Archive A path to the data you want to upload. Must be defined if
content
is not.- Storage
Class string The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- Temporary
Hold bool Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
The name of the containing bucket.
- cache
Control String Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content String
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content
Disposition String Content-Disposition of the object data.
- content
Encoding String Content-Encoding of the object data.
- content
Language String Content-Language of the object data.
- content
Type String Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customer
Encryption BucketObject Customer Encryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect
Md5hash String - event
Based BooleanHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms
Key StringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata Map<String,String>
User-provided metadata, in key/value pairs.
One of the following is required:
- name String
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- source
Asset
Or Archive A path to the data you want to upload. Must be defined if
content
is not.- storage
Class String The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary
Hold Boolean Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket string
The name of the containing bucket.
- cache
Control string Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content string
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content
Disposition string Content-Disposition of the object data.
- content
Encoding string Content-Encoding of the object data.
- content
Language string Content-Language of the object data.
- content
Type string Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customer
Encryption BucketObject Customer Encryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect
Md5hash string - event
Based booleanHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms
Key stringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata {[key: string]: string}
User-provided metadata, in key/value pairs.
One of the following is required:
- name string
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- source
pulumi.asset.
Asset | pulumi.asset. Archive A path to the data you want to upload. Must be defined if
content
is not.- storage
Class string The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary
Hold boolean Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket str
The name of the containing bucket.
- cache_
control str Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content str
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content_
disposition str Content-Disposition of the object data.
- content_
encoding str Content-Encoding of the object data.
- content_
language str Content-Language of the object data.
- content_
type str Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customer_
encryption BucketObject Customer Encryption Args Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect_
md5hash str - event_
based_ boolhold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms_
key_ strname The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata Mapping[str, str]
User-provided metadata, in key/value pairs.
One of the following is required:
- name str
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- source
Union[pulumi.
Asset, pulumi. Archive] A path to the data you want to upload. Must be defined if
content
is not.- storage_
class str The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary_
hold bool Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
The name of the containing bucket.
- cache
Control String Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content String
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content
Disposition String Content-Disposition of the object data.
- content
Encoding String Content-Encoding of the object data.
- content
Language String Content-Language of the object data.
- content
Type String Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- customer
Encryption Property Map Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect
Md5hash String - event
Based BooleanHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms
Key StringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- metadata Map<String>
User-provided metadata, in key/value pairs.
One of the following is required:
- name String
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- source Asset
A path to the data you want to upload. Must be defined if
content
is not.- storage
Class String The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary
Hold Boolean Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketObject resource produces the following output properties:
- Crc32c string
(Computed) Base 64 CRC32 hash of the uploaded data.
- Id string
The provider-assigned unique ID for this managed resource.
- Md5hash string
(Computed) Base 64 MD5 hash of the uploaded data.
- Media
Link string (Computed) A url reference to download this object.
- Output
Name string (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- Self
Link string (Computed) A url reference to this object.
- Crc32c string
(Computed) Base 64 CRC32 hash of the uploaded data.
- Id string
The provider-assigned unique ID for this managed resource.
- Md5hash string
(Computed) Base 64 MD5 hash of the uploaded data.
- Media
Link string (Computed) A url reference to download this object.
- Output
Name string (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- Self
Link string (Computed) A url reference to this object.
- crc32c String
(Computed) Base 64 CRC32 hash of the uploaded data.
- id String
The provider-assigned unique ID for this managed resource.
- md5hash String
(Computed) Base 64 MD5 hash of the uploaded data.
- media
Link String (Computed) A url reference to download this object.
- output
Name String (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self
Link String (Computed) A url reference to this object.
- crc32c string
(Computed) Base 64 CRC32 hash of the uploaded data.
- id string
The provider-assigned unique ID for this managed resource.
- md5hash string
(Computed) Base 64 MD5 hash of the uploaded data.
- media
Link string (Computed) A url reference to download this object.
- output
Name string (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self
Link string (Computed) A url reference to this object.
- crc32c str
(Computed) Base 64 CRC32 hash of the uploaded data.
- id str
The provider-assigned unique ID for this managed resource.
- md5hash str
(Computed) Base 64 MD5 hash of the uploaded data.
- media_
link str (Computed) A url reference to download this object.
- output_
name str (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self_
link str (Computed) A url reference to this object.
- crc32c String
(Computed) Base 64 CRC32 hash of the uploaded data.
- id String
The provider-assigned unique ID for this managed resource.
- md5hash String
(Computed) Base 64 MD5 hash of the uploaded data.
- media
Link String (Computed) A url reference to download this object.
- output
Name String (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self
Link String (Computed) A url reference to this object.
Look up Existing BucketObject Resource
Get an existing BucketObject resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BucketObjectState, opts?: CustomResourceOptions): BucketObject
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
cache_control: Optional[str] = None,
content: Optional[str] = None,
content_disposition: Optional[str] = None,
content_encoding: Optional[str] = None,
content_language: Optional[str] = None,
content_type: Optional[str] = None,
crc32c: Optional[str] = None,
customer_encryption: Optional[BucketObjectCustomerEncryptionArgs] = None,
detect_md5hash: Optional[str] = None,
event_based_hold: Optional[bool] = None,
kms_key_name: Optional[str] = None,
md5hash: Optional[str] = None,
media_link: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
output_name: Optional[str] = None,
self_link: Optional[str] = None,
source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
storage_class: Optional[str] = None,
temporary_hold: Optional[bool] = None) -> BucketObject
func GetBucketObject(ctx *Context, name string, id IDInput, state *BucketObjectState, opts ...ResourceOption) (*BucketObject, error)
public static BucketObject Get(string name, Input<string> id, BucketObjectState? state, CustomResourceOptions? opts = null)
public static BucketObject get(String name, Output<String> id, BucketObjectState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket string
The name of the containing bucket.
- Cache
Control string Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- Content string
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- Content
Disposition string Content-Disposition of the object data.
- Content
Encoding string Content-Encoding of the object data.
- Content
Language string Content-Language of the object data.
- Content
Type string Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- Crc32c string
(Computed) Base 64 CRC32 hash of the uploaded data.
- Customer
Encryption BucketObject Customer Encryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- Detect
Md5hash string - Event
Based boolHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- Kms
Key stringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- Md5hash string
(Computed) Base 64 MD5 hash of the uploaded data.
- Media
Link string (Computed) A url reference to download this object.
- Metadata Dictionary<string, string>
User-provided metadata, in key/value pairs.
One of the following is required:
- Name string
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- Output
Name string (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- Self
Link string (Computed) A url reference to this object.
- Source
Asset
Or Archive A path to the data you want to upload. Must be defined if
content
is not.- Storage
Class string The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- Temporary
Hold bool Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- Bucket string
The name of the containing bucket.
- Cache
Control string Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- Content string
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- Content
Disposition string Content-Disposition of the object data.
- Content
Encoding string Content-Encoding of the object data.
- Content
Language string Content-Language of the object data.
- Content
Type string Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- Crc32c string
(Computed) Base 64 CRC32 hash of the uploaded data.
- Customer
Encryption BucketObject Customer Encryption Args Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- Detect
Md5hash string - Event
Based boolHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- Kms
Key stringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- Md5hash string
(Computed) Base 64 MD5 hash of the uploaded data.
- Media
Link string (Computed) A url reference to download this object.
- Metadata map[string]string
User-provided metadata, in key/value pairs.
One of the following is required:
- Name string
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- Output
Name string (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- Self
Link string (Computed) A url reference to this object.
- Source
pulumi.
Asset Or Archive A path to the data you want to upload. Must be defined if
content
is not.- Storage
Class string The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- Temporary
Hold bool Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
The name of the containing bucket.
- cache
Control String Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content String
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content
Disposition String Content-Disposition of the object data.
- content
Encoding String Content-Encoding of the object data.
- content
Language String Content-Language of the object data.
- content
Type String Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c String
(Computed) Base 64 CRC32 hash of the uploaded data.
- customer
Encryption BucketObject Customer Encryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect
Md5hash String - event
Based BooleanHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms
Key StringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash String
(Computed) Base 64 MD5 hash of the uploaded data.
- media
Link String (Computed) A url reference to download this object.
- metadata Map<String,String>
User-provided metadata, in key/value pairs.
One of the following is required:
- name String
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- output
Name String (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self
Link String (Computed) A url reference to this object.
- source
Asset
Or Archive A path to the data you want to upload. Must be defined if
content
is not.- storage
Class String The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary
Hold Boolean Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket string
The name of the containing bucket.
- cache
Control string Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content string
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content
Disposition string Content-Disposition of the object data.
- content
Encoding string Content-Encoding of the object data.
- content
Language string Content-Language of the object data.
- content
Type string Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c string
(Computed) Base 64 CRC32 hash of the uploaded data.
- customer
Encryption BucketObject Customer Encryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect
Md5hash string - event
Based booleanHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms
Key stringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash string
(Computed) Base 64 MD5 hash of the uploaded data.
- media
Link string (Computed) A url reference to download this object.
- metadata {[key: string]: string}
User-provided metadata, in key/value pairs.
One of the following is required:
- name string
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- output
Name string (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self
Link string (Computed) A url reference to this object.
- source
pulumi.asset.
Asset | pulumi.asset. Archive A path to the data you want to upload. Must be defined if
content
is not.- storage
Class string The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary
Hold boolean Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket str
The name of the containing bucket.
- cache_
control str Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content str
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content_
disposition str Content-Disposition of the object data.
- content_
encoding str Content-Encoding of the object data.
- content_
language str Content-Language of the object data.
- content_
type str Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c str
(Computed) Base 64 CRC32 hash of the uploaded data.
- customer_
encryption BucketObject Customer Encryption Args Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect_
md5hash str - event_
based_ boolhold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms_
key_ strname The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash str
(Computed) Base 64 MD5 hash of the uploaded data.
- media_
link str (Computed) A url reference to download this object.
- metadata Mapping[str, str]
User-provided metadata, in key/value pairs.
One of the following is required:
- name str
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- output_
name str (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self_
link str (Computed) A url reference to this object.
- source
Union[pulumi.
Asset, pulumi. Archive] A path to the data you want to upload. Must be defined if
content
is not.- storage_
class str The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary_
hold bool Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
- bucket String
The name of the containing bucket.
- cache
Control String Cache-Control directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
- content String
Data as
string
to be uploaded. Must be defined ifsource
is not. Note: Thecontent
field is marked as sensitive.- content
Disposition String Content-Disposition of the object data.
- content
Encoding String Content-Encoding of the object data.
- content
Language String Content-Language of the object data.
- content
Type String Content-Type of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
- crc32c String
(Computed) Base 64 CRC32 hash of the uploaded data.
- customer
Encryption Property Map Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google documentation about CSEK. Structure is documented below.
- detect
Md5hash String - event
Based BooleanHold Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
- kms
Key StringName The resource name of the Cloud KMS key that will be used to encrypt the object.
- md5hash String
(Computed) Base 64 MD5 hash of the uploaded data.
- media
Link String (Computed) A url reference to download this object.
- metadata Map<String>
User-provided metadata, in key/value pairs.
One of the following is required:
- name String
The name of the object. If you're interpolating the name of this object, see
output_name
instead.- output
Name String (Computed) The name of the object. Use this field in interpolations with
gcp.storage.ObjectACL
to recreategcp.storage.ObjectACL
resources when yourgcp.storage.BucketObject
is recreated.- self
Link String (Computed) A url reference to this object.
- source Asset
A path to the data you want to upload. Must be defined if
content
is not.- storage
Class String The StorageClass of the new bucket object. Supported values include:
MULTI_REGIONAL
,REGIONAL
,NEARLINE
,COLDLINE
,ARCHIVE
. If not provided, this defaults to the bucket's default storage class or to a standard class.- temporary
Hold Boolean Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites.
Supporting Types
BucketObjectCustomerEncryption, BucketObjectCustomerEncryptionArgs
- Encryption
Key string Base64 encoded Customer-Supplied Encryption Key.
- Encryption
Algorithm string Encryption algorithm. Default: AES256
- Encryption
Key string Base64 encoded Customer-Supplied Encryption Key.
- Encryption
Algorithm string Encryption algorithm. Default: AES256
- encryption
Key String Base64 encoded Customer-Supplied Encryption Key.
- encryption
Algorithm String Encryption algorithm. Default: AES256
- encryption
Key string Base64 encoded Customer-Supplied Encryption Key.
- encryption
Algorithm string Encryption algorithm. Default: AES256
- encryption_
key str Base64 encoded Customer-Supplied Encryption Key.
- encryption_
algorithm str Encryption algorithm. Default: AES256
- encryption
Key String Base64 encoded Customer-Supplied Encryption Key.
- encryption
Algorithm String Encryption algorithm. Default: AES256
Import
This resource does not support import.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.