ibm.CosBucketObject
Explore with Pulumi AI
Create, update, or delete an object in an IBM Cloud Object Storage bucket. For more information, about an IBM Cloud Object Storage bucket, see Create some buckets to store your data.
Additional Examples
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const cosObjectObjectlock = new ibm.CosBucketObject("cosObjectObjectlock", {
bucketCrn: "bucket-crn",
bucketLocation: "us-south",
key: "page1.html",
websiteRedirect: "/page2.html",
});
import pulumi
import pulumi_ibm as ibm
cos_object_objectlock = ibm.CosBucketObject("cosObjectObjectlock",
bucket_crn="bucket-crn",
bucket_location="us-south",
key="page1.html",
website_redirect="/page2.html")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewCosBucketObject(ctx, "cosObjectObjectlock", &ibm.CosBucketObjectArgs{
BucketCrn: pulumi.String("bucket-crn"),
BucketLocation: pulumi.String("us-south"),
Key: pulumi.String("page1.html"),
WebsiteRedirect: pulumi.String("/page2.html"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var cosObjectObjectlock = new Ibm.CosBucketObject("cosObjectObjectlock", new()
{
BucketCrn = "bucket-crn",
BucketLocation = "us-south",
Key = "page1.html",
WebsiteRedirect = "/page2.html",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.CosBucketObject;
import com.pulumi.ibm.CosBucketObjectArgs;
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 cosObjectObjectlock = new CosBucketObject("cosObjectObjectlock", CosBucketObjectArgs.builder()
.bucketCrn("bucket-crn")
.bucketLocation("us-south")
.key("page1.html")
.websiteRedirect("/page2.html")
.build());
}
}
resources:
cosObjectObjectlock:
type: ibm:CosBucketObject
properties:
bucketCrn: bucket-crn
bucketLocation: us-south
key: page1.html
websiteRedirect: /page2.html
Create CosBucketObject Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CosBucketObject(name: string, args: CosBucketObjectArgs, opts?: CustomResourceOptions);
@overload
def CosBucketObject(resource_name: str,
args: CosBucketObjectArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CosBucketObject(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_crn: Optional[str] = None,
bucket_location: Optional[str] = None,
key: Optional[str] = None,
content_base64: Optional[str] = None,
content_file: Optional[str] = None,
cos_bucket_object_id: Optional[str] = None,
endpoint_type: Optional[str] = None,
etag: Optional[str] = None,
force_delete: Optional[bool] = None,
content: Optional[str] = None,
object_lock_legal_hold_status: Optional[str] = None,
object_lock_mode: Optional[str] = None,
object_lock_retain_until_date: Optional[str] = None,
timeouts: Optional[CosBucketObjectTimeoutsArgs] = None,
website_redirect: Optional[str] = None)
func NewCosBucketObject(ctx *Context, name string, args CosBucketObjectArgs, opts ...ResourceOption) (*CosBucketObject, error)
public CosBucketObject(string name, CosBucketObjectArgs args, CustomResourceOptions? opts = null)
public CosBucketObject(String name, CosBucketObjectArgs args)
public CosBucketObject(String name, CosBucketObjectArgs args, CustomResourceOptions options)
type: ibm:CosBucketObject
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CosBucketObjectArgs
- 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 CosBucketObjectArgs
- 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 CosBucketObjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CosBucketObjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CosBucketObjectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cosBucketObjectResource = new Ibm.CosBucketObject("cosBucketObjectResource", new()
{
BucketCrn = "string",
BucketLocation = "string",
Key = "string",
ContentBase64 = "string",
ContentFile = "string",
CosBucketObjectId = "string",
EndpointType = "string",
Etag = "string",
ForceDelete = false,
Content = "string",
ObjectLockLegalHoldStatus = "string",
ObjectLockMode = "string",
ObjectLockRetainUntilDate = "string",
Timeouts = new Ibm.Inputs.CosBucketObjectTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
WebsiteRedirect = "string",
});
example, err := ibm.NewCosBucketObject(ctx, "cosBucketObjectResource", &ibm.CosBucketObjectArgs{
BucketCrn: pulumi.String("string"),
BucketLocation: pulumi.String("string"),
Key: pulumi.String("string"),
ContentBase64: pulumi.String("string"),
ContentFile: pulumi.String("string"),
CosBucketObjectId: pulumi.String("string"),
EndpointType: pulumi.String("string"),
Etag: pulumi.String("string"),
ForceDelete: pulumi.Bool(false),
Content: pulumi.String("string"),
ObjectLockLegalHoldStatus: pulumi.String("string"),
ObjectLockMode: pulumi.String("string"),
ObjectLockRetainUntilDate: pulumi.String("string"),
Timeouts: &ibm.CosBucketObjectTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
WebsiteRedirect: pulumi.String("string"),
})
var cosBucketObjectResource = new CosBucketObject("cosBucketObjectResource", CosBucketObjectArgs.builder()
.bucketCrn("string")
.bucketLocation("string")
.key("string")
.contentBase64("string")
.contentFile("string")
.cosBucketObjectId("string")
.endpointType("string")
.etag("string")
.forceDelete(false)
.content("string")
.objectLockLegalHoldStatus("string")
.objectLockMode("string")
.objectLockRetainUntilDate("string")
.timeouts(CosBucketObjectTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.websiteRedirect("string")
.build());
cos_bucket_object_resource = ibm.CosBucketObject("cosBucketObjectResource",
bucket_crn="string",
bucket_location="string",
key="string",
content_base64="string",
content_file="string",
cos_bucket_object_id="string",
endpoint_type="string",
etag="string",
force_delete=False,
content="string",
object_lock_legal_hold_status="string",
object_lock_mode="string",
object_lock_retain_until_date="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
website_redirect="string")
const cosBucketObjectResource = new ibm.CosBucketObject("cosBucketObjectResource", {
bucketCrn: "string",
bucketLocation: "string",
key: "string",
contentBase64: "string",
contentFile: "string",
cosBucketObjectId: "string",
endpointType: "string",
etag: "string",
forceDelete: false,
content: "string",
objectLockLegalHoldStatus: "string",
objectLockMode: "string",
objectLockRetainUntilDate: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
websiteRedirect: "string",
});
type: ibm:CosBucketObject
properties:
bucketCrn: string
bucketLocation: string
content: string
contentBase64: string
contentFile: string
cosBucketObjectId: string
endpointType: string
etag: string
forceDelete: false
key: string
objectLockLegalHoldStatus: string
objectLockMode: string
objectLockRetainUntilDate: string
timeouts:
create: string
delete: string
update: string
websiteRedirect: string
CosBucketObject Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CosBucketObject resource accepts the following input properties:
- Bucket
Crn string - The CRN of the COS bucket.
- Bucket
Location string - The location of the COS bucket.
- Key string
- The name of an object in the COS bucket.
- Content string
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - Content
File string - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - Cos
Bucket stringObject Id - (String) The ID of an object.
- Endpoint
Type string - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - Etag string
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - Force
Delete bool - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- Object
Lock stringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- Object
Lock stringMode - Retention modes apply different levels of protection to the objects.
- Object
Lock stringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- Timeouts
Cos
Bucket Object Timeouts - Website
Redirect string - Target URL for website redirect.
- Bucket
Crn string - The CRN of the COS bucket.
- Bucket
Location string - The location of the COS bucket.
- Key string
- The name of an object in the COS bucket.
- Content string
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - Content
File string - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - Cos
Bucket stringObject Id - (String) The ID of an object.
- Endpoint
Type string - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - Etag string
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - Force
Delete bool - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- Object
Lock stringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- Object
Lock stringMode - Retention modes apply different levels of protection to the objects.
- Object
Lock stringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- Timeouts
Cos
Bucket Object Timeouts Args - Website
Redirect string - Target URL for website redirect.
- bucket
Crn String - The CRN of the COS bucket.
- bucket
Location String - The location of the COS bucket.
- key String
- The name of an object in the COS bucket.
- content String
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content
File String - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - cos
Bucket StringObject Id - (String) The ID of an object.
- endpoint
Type String - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag String
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force
Delete Boolean - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- object
Lock StringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object
Lock StringMode - Retention modes apply different levels of protection to the objects.
- object
Lock StringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- timeouts
Cos
Bucket Object Timeouts - website
Redirect String - Target URL for website redirect.
- bucket
Crn string - The CRN of the COS bucket.
- bucket
Location string - The location of the COS bucket.
- key string
- The name of an object in the COS bucket.
- content string
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content
File string - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - cos
Bucket stringObject Id - (String) The ID of an object.
- endpoint
Type string - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag string
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force
Delete boolean - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- object
Lock stringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object
Lock stringMode - Retention modes apply different levels of protection to the objects.
- object
Lock stringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- timeouts
Cos
Bucket Object Timeouts - website
Redirect string - Target URL for website redirect.
- bucket_
crn str - The CRN of the COS bucket.
- bucket_
location str - The location of the COS bucket.
- key str
- The name of an object in the COS bucket.
- content str
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content_
base64 str - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content_
file str - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - cos_
bucket_ strobject_ id - (String) The ID of an object.
- endpoint_
type str - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag str
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force_
delete bool - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- object_
lock_ strlegal_ hold_ status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object_
lock_ strmode - Retention modes apply different levels of protection to the objects.
- object_
lock_ strretain_ until_ date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- timeouts
Cos
Bucket Object Timeouts Args - website_
redirect str - Target URL for website redirect.
- bucket
Crn String - The CRN of the COS bucket.
- bucket
Location String - The location of the COS bucket.
- key String
- The name of an object in the COS bucket.
- content String
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content
File String - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - cos
Bucket StringObject Id - (String) The ID of an object.
- endpoint
Type String - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag String
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force
Delete Boolean - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- object
Lock StringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object
Lock StringMode - Retention modes apply different levels of protection to the objects.
- object
Lock StringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- timeouts Property Map
- website
Redirect String - Target URL for website redirect.
Outputs
All input properties are implicitly available as output properties. Additionally, the CosBucketObject resource produces the following output properties:
- Body string
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - Content
Length double - (String) A standard MIME type describing the format of an object data.
- Content
Type string - (String) A standard MIME type describing the format of an object data.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - (Timestamp) Last modified date of an object. A GMT formatted date.
- Object
Sql stringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- Version
Id string
- Body string
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - Content
Length float64 - (String) A standard MIME type describing the format of an object data.
- Content
Type string - (String) A standard MIME type describing the format of an object data.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - (Timestamp) Last modified date of an object. A GMT formatted date.
- Object
Sql stringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- Version
Id string
- body String
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - content
Length Double - (String) A standard MIME type describing the format of an object data.
- content
Type String - (String) A standard MIME type describing the format of an object data.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - (Timestamp) Last modified date of an object. A GMT formatted date.
- object
Sql StringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- version
Id String
- body string
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - content
Length number - (String) A standard MIME type describing the format of an object data.
- content
Type string - (String) A standard MIME type describing the format of an object data.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string - (Timestamp) Last modified date of an object. A GMT formatted date.
- object
Sql stringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- version
Id string
- body str
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - content_
length float - (String) A standard MIME type describing the format of an object data.
- content_
type str - (String) A standard MIME type describing the format of an object data.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str - (Timestamp) Last modified date of an object. A GMT formatted date.
- object_
sql_ strurl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- version_
id str
- body String
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - content
Length Number - (String) A standard MIME type describing the format of an object data.
- content
Type String - (String) A standard MIME type describing the format of an object data.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - (Timestamp) Last modified date of an object. A GMT formatted date.
- object
Sql StringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- version
Id String
Look up Existing CosBucketObject Resource
Get an existing CosBucketObject 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?: CosBucketObjectState, opts?: CustomResourceOptions): CosBucketObject
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
bucket_crn: Optional[str] = None,
bucket_location: Optional[str] = None,
content: Optional[str] = None,
content_base64: Optional[str] = None,
content_file: Optional[str] = None,
content_length: Optional[float] = None,
content_type: Optional[str] = None,
cos_bucket_object_id: Optional[str] = None,
endpoint_type: Optional[str] = None,
etag: Optional[str] = None,
force_delete: Optional[bool] = None,
key: Optional[str] = None,
last_modified: Optional[str] = None,
object_lock_legal_hold_status: Optional[str] = None,
object_lock_mode: Optional[str] = None,
object_lock_retain_until_date: Optional[str] = None,
object_sql_url: Optional[str] = None,
timeouts: Optional[CosBucketObjectTimeoutsArgs] = None,
version_id: Optional[str] = None,
website_redirect: Optional[str] = None) -> CosBucketObject
func GetCosBucketObject(ctx *Context, name string, id IDInput, state *CosBucketObjectState, opts ...ResourceOption) (*CosBucketObject, error)
public static CosBucketObject Get(string name, Input<string> id, CosBucketObjectState? state, CustomResourceOptions? opts = null)
public static CosBucketObject get(String name, Output<String> id, CosBucketObjectState state, CustomResourceOptions options)
resources: _: type: ibm:CosBucketObject get: id: ${id}
- 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.
- Body string
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - Bucket
Crn string - The CRN of the COS bucket.
- Bucket
Location string - The location of the COS bucket.
- Content string
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - Content
File string - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - Content
Length double - (String) A standard MIME type describing the format of an object data.
- Content
Type string - (String) A standard MIME type describing the format of an object data.
- Cos
Bucket stringObject Id - (String) The ID of an object.
- Endpoint
Type string - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - Etag string
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - Force
Delete bool - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- Key string
- The name of an object in the COS bucket.
- Last
Modified string - (Timestamp) Last modified date of an object. A GMT formatted date.
- Object
Lock stringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- Object
Lock stringMode - Retention modes apply different levels of protection to the objects.
- Object
Lock stringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- Object
Sql stringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- Timeouts
Cos
Bucket Object Timeouts - Version
Id string - Website
Redirect string - Target URL for website redirect.
- Body string
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - Bucket
Crn string - The CRN of the COS bucket.
- Bucket
Location string - The location of the COS bucket.
- Content string
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - Content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - Content
File string - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - Content
Length float64 - (String) A standard MIME type describing the format of an object data.
- Content
Type string - (String) A standard MIME type describing the format of an object data.
- Cos
Bucket stringObject Id - (String) The ID of an object.
- Endpoint
Type string - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - Etag string
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - Force
Delete bool - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- Key string
- The name of an object in the COS bucket.
- Last
Modified string - (Timestamp) Last modified date of an object. A GMT formatted date.
- Object
Lock stringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- Object
Lock stringMode - Retention modes apply different levels of protection to the objects.
- Object
Lock stringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- Object
Sql stringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- Timeouts
Cos
Bucket Object Timeouts Args - Version
Id string - Website
Redirect string - Target URL for website redirect.
- body String
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - bucket
Crn String - The CRN of the COS bucket.
- bucket
Location String - The location of the COS bucket.
- content String
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content
File String - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - content
Length Double - (String) A standard MIME type describing the format of an object data.
- content
Type String - (String) A standard MIME type describing the format of an object data.
- cos
Bucket StringObject Id - (String) The ID of an object.
- endpoint
Type String - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag String
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force
Delete Boolean - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- key String
- The name of an object in the COS bucket.
- last
Modified String - (Timestamp) Last modified date of an object. A GMT formatted date.
- object
Lock StringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object
Lock StringMode - Retention modes apply different levels of protection to the objects.
- object
Lock StringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- object
Sql StringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- timeouts
Cos
Bucket Object Timeouts - version
Id String - website
Redirect String - Target URL for website redirect.
- body string
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - bucket
Crn string - The CRN of the COS bucket.
- bucket
Location string - The location of the COS bucket.
- content string
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content
Base64 string - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content
File string - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - content
Length number - (String) A standard MIME type describing the format of an object data.
- content
Type string - (String) A standard MIME type describing the format of an object data.
- cos
Bucket stringObject Id - (String) The ID of an object.
- endpoint
Type string - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag string
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force
Delete boolean - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- key string
- The name of an object in the COS bucket.
- last
Modified string - (Timestamp) Last modified date of an object. A GMT formatted date.
- object
Lock stringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object
Lock stringMode - Retention modes apply different levels of protection to the objects.
- object
Lock stringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- object
Sql stringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- timeouts
Cos
Bucket Object Timeouts - version
Id string - website
Redirect string - Target URL for website redirect.
- body str
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - bucket_
crn str - The CRN of the COS bucket.
- bucket_
location str - The location of the COS bucket.
- content str
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content_
base64 str - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content_
file str - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - content_
length float - (String) A standard MIME type describing the format of an object data.
- content_
type str - (String) A standard MIME type describing the format of an object data.
- cos_
bucket_ strobject_ id - (String) The ID of an object.
- endpoint_
type str - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag str
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force_
delete bool - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- key str
- The name of an object in the COS bucket.
- last_
modified str - (Timestamp) Last modified date of an object. A GMT formatted date.
- object_
lock_ strlegal_ hold_ status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object_
lock_ strmode - Retention modes apply different levels of protection to the objects.
- object_
lock_ strretain_ until_ date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- object_
sql_ strurl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- timeouts
Cos
Bucket Object Timeouts Args - version_
id str - website_
redirect str - Target URL for website redirect.
- body String
- (String) Literal string value of an object content. Only supported for
text/*
andapplication/json
content types. - bucket
Crn String - The CRN of the COS bucket.
- bucket
Location String - The location of the COS bucket.
- content String
- Literal string value to use as an object content, which will be uploaded as UTF-8 encoded text. Conflicts with
content_base64
andcontent_file
. - content
Base64 String - Base64-encoded data that will be decoded and uploaded as raw bytes for an object content. This safely uploads
non-UTF8
binary data, but is recommended only for small content. Conflicts withcontent
andcontent_file
. - content
File String - The path to a file that will be read and uploaded as raw bytes for an object content. Conflicts with
content
andcontent_base64
. - content
Length Number - (String) A standard MIME type describing the format of an object data.
- content
Type String - (String) A standard MIME type describing the format of an object data.
- cos
Bucket StringObject Id - (String) The ID of an object.
- endpoint
Type String - The type of endpoint used to access COS. Supported values are
public
,private
, ordirect
. Default value ispublic
. - etag String
- MD5 hexdigest used to trigger updates. The only meaningful value is
filemd5("path/to/file")
. - force
Delete Boolean - COS buckets need to be empty before they can be deleted. force_delete option empty the bucket and delete it.
- key String
- The name of an object in the COS bucket.
- last
Modified String - (Timestamp) Last modified date of an object. A GMT formatted date.
- object
Lock StringLegal Hold Status - An object lock configuration on the object, the valid states are ON/OFF. When ON prevents deletion of the object version.
- object
Lock StringMode - Retention modes apply different levels of protection to the objects.
- object
Lock StringRetain Until Date - An object cannot be deleted when the current time is earlier than the retainUntilDate. After this date, the object can be deleted.
- object
Sql StringUrl - (String) Access the object using an SQL Query instance. The SQL URL is a reference url used inside of an SQL statement. The reference url is used to perform queries against objects storing structured data.
- timeouts Property Map
- version
Id String - website
Redirect String - Target URL for website redirect.
Supporting Types
CosBucketObjectTimeouts, CosBucketObjectTimeoutsArgs
Import
The ibm_cos_bucket_object
resource can be imported by using the id
. The ID is formed from the COS bucket CRN, an object key name, and the bucket location.
id = ${bucketCRN}:object:${objectKey}:location:${bucketLocation}
Syntax
$ pulumi import ibm:index/cosBucketObject:CosBucketObject my_object <id>
Example
$ pulumi import ibm:index/cosBucketObject:CosBucketObject my_object crn:v1:bluemix:public:cloud-object-storage:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3:bucket:myBucketName:object:myObject.key:location:us-east
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.