oci.ObjectStorage.Bucket
Explore with Pulumi AI
This resource provides the Bucket resource in Oracle Cloud Infrastructure Object Storage service.
Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering confidential information in bucket names.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBucket = new oci.objectstorage.Bucket("test_bucket", {
compartmentId: compartmentId,
name: bucketName,
namespace: bucketNamespace,
accessType: bucketAccessType,
autoTiering: bucketAutoTiering,
definedTags: {
"Operations.CostCenter": "42",
},
freeformTags: {
Department: "Finance",
},
kmsKeyId: testKey.id,
metadata: bucketMetadata,
objectEventsEnabled: bucketObjectEventsEnabled,
storageTier: bucketStorageTier,
retentionRules: [{
displayName: retentionRuleDisplayName,
duration: {
timeAmount: retentionRuleDurationTimeAmount,
timeUnit: retentionRuleDurationTimeUnit,
},
timeRuleLocked: retentionRuleTimeRuleLocked,
}],
versioning: bucketVersioning,
});
import pulumi
import pulumi_oci as oci
test_bucket = oci.object_storage.Bucket("test_bucket",
compartment_id=compartment_id,
name=bucket_name,
namespace=bucket_namespace,
access_type=bucket_access_type,
auto_tiering=bucket_auto_tiering,
defined_tags={
"Operations.CostCenter": "42",
},
freeform_tags={
"Department": "Finance",
},
kms_key_id=test_key["id"],
metadata=bucket_metadata,
object_events_enabled=bucket_object_events_enabled,
storage_tier=bucket_storage_tier,
retention_rules=[{
"display_name": retention_rule_display_name,
"duration": {
"time_amount": retention_rule_duration_time_amount,
"time_unit": retention_rule_duration_time_unit,
},
"time_rule_locked": retention_rule_time_rule_locked,
}],
versioning=bucket_versioning)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/ObjectStorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ObjectStorage.NewBucket(ctx, "test_bucket", &ObjectStorage.BucketArgs{
CompartmentId: pulumi.Any(compartmentId),
Name: pulumi.Any(bucketName),
Namespace: pulumi.Any(bucketNamespace),
AccessType: pulumi.Any(bucketAccessType),
AutoTiering: pulumi.Any(bucketAutoTiering),
DefinedTags: pulumi.StringMap{
"Operations.CostCenter": pulumi.String("42"),
},
FreeformTags: pulumi.StringMap{
"Department": pulumi.String("Finance"),
},
KmsKeyId: pulumi.Any(testKey.Id),
Metadata: pulumi.Any(bucketMetadata),
ObjectEventsEnabled: pulumi.Any(bucketObjectEventsEnabled),
StorageTier: pulumi.Any(bucketStorageTier),
RetentionRules: objectstorage.BucketRetentionRuleArray{
&objectstorage.BucketRetentionRuleArgs{
DisplayName: pulumi.Any(retentionRuleDisplayName),
Duration: &objectstorage.BucketRetentionRuleDurationArgs{
TimeAmount: pulumi.Any(retentionRuleDurationTimeAmount),
TimeUnit: pulumi.Any(retentionRuleDurationTimeUnit),
},
TimeRuleLocked: pulumi.Any(retentionRuleTimeRuleLocked),
},
},
Versioning: pulumi.Any(bucketVersioning),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testBucket = new Oci.ObjectStorage.Bucket("test_bucket", new()
{
CompartmentId = compartmentId,
Name = bucketName,
Namespace = bucketNamespace,
AccessType = bucketAccessType,
AutoTiering = bucketAutoTiering,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
FreeformTags =
{
{ "Department", "Finance" },
},
KmsKeyId = testKey.Id,
Metadata = bucketMetadata,
ObjectEventsEnabled = bucketObjectEventsEnabled,
StorageTier = bucketStorageTier,
RetentionRules = new[]
{
new Oci.ObjectStorage.Inputs.BucketRetentionRuleArgs
{
DisplayName = retentionRuleDisplayName,
Duration = new Oci.ObjectStorage.Inputs.BucketRetentionRuleDurationArgs
{
TimeAmount = retentionRuleDurationTimeAmount,
TimeUnit = retentionRuleDurationTimeUnit,
},
TimeRuleLocked = retentionRuleTimeRuleLocked,
},
},
Versioning = bucketVersioning,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ObjectStorage.Bucket;
import com.pulumi.oci.ObjectStorage.BucketArgs;
import com.pulumi.oci.ObjectStorage.inputs.BucketRetentionRuleArgs;
import com.pulumi.oci.ObjectStorage.inputs.BucketRetentionRuleDurationArgs;
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 testBucket = new Bucket("testBucket", BucketArgs.builder()
.compartmentId(compartmentId)
.name(bucketName)
.namespace(bucketNamespace)
.accessType(bucketAccessType)
.autoTiering(bucketAutoTiering)
.definedTags(Map.of("Operations.CostCenter", "42"))
.freeformTags(Map.of("Department", "Finance"))
.kmsKeyId(testKey.id())
.metadata(bucketMetadata)
.objectEventsEnabled(bucketObjectEventsEnabled)
.storageTier(bucketStorageTier)
.retentionRules(BucketRetentionRuleArgs.builder()
.displayName(retentionRuleDisplayName)
.duration(BucketRetentionRuleDurationArgs.builder()
.timeAmount(retentionRuleDurationTimeAmount)
.timeUnit(retentionRuleDurationTimeUnit)
.build())
.timeRuleLocked(retentionRuleTimeRuleLocked)
.build())
.versioning(bucketVersioning)
.build());
}
}
resources:
testBucket:
type: oci:ObjectStorage:Bucket
name: test_bucket
properties:
compartmentId: ${compartmentId}
name: ${bucketName}
namespace: ${bucketNamespace}
accessType: ${bucketAccessType}
autoTiering: ${bucketAutoTiering}
definedTags:
Operations.CostCenter: '42'
freeformTags:
Department: Finance
kmsKeyId: ${testKey.id}
metadata: ${bucketMetadata}
objectEventsEnabled: ${bucketObjectEventsEnabled}
storageTier: ${bucketStorageTier}
retentionRules:
- displayName: ${retentionRuleDisplayName}
duration:
timeAmount: ${retentionRuleDurationTimeAmount}
timeUnit: ${retentionRuleDurationTimeUnit}
timeRuleLocked: ${retentionRuleTimeRuleLocked}
versioning: ${bucketVersioning}
Create Bucket Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Bucket(name: string, args: BucketArgs, opts?: CustomResourceOptions);
@overload
def Bucket(resource_name: str,
args: BucketArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Bucket(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
namespace: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
defined_tags: Optional[Mapping[str, str]] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
kms_key_id: Optional[str] = None,
access_type: Optional[str] = None,
name: Optional[str] = None,
auto_tiering: Optional[str] = None,
object_events_enabled: Optional[bool] = None,
retention_rules: Optional[Sequence[_objectstorage.BucketRetentionRuleArgs]] = None,
storage_tier: Optional[str] = None,
versioning: Optional[str] = None)
func NewBucket(ctx *Context, name string, args BucketArgs, opts ...ResourceOption) (*Bucket, error)
public Bucket(string name, BucketArgs args, CustomResourceOptions? opts = null)
public Bucket(String name, BucketArgs args)
public Bucket(String name, BucketArgs args, CustomResourceOptions options)
type: oci:ObjectStorage:Bucket
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 BucketArgs
- 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 BucketArgs
- 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 BucketArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketArgs
- 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 bucketResource = new Oci.ObjectStorage.Bucket("bucketResource", new()
{
CompartmentId = "string",
Namespace = "string",
Metadata =
{
{ "string", "string" },
},
DefinedTags =
{
{ "string", "string" },
},
FreeformTags =
{
{ "string", "string" },
},
KmsKeyId = "string",
AccessType = "string",
Name = "string",
AutoTiering = "string",
ObjectEventsEnabled = false,
RetentionRules = new[]
{
new Oci.ObjectStorage.Inputs.BucketRetentionRuleArgs
{
DisplayName = "string",
Duration = new Oci.ObjectStorage.Inputs.BucketRetentionRuleDurationArgs
{
TimeAmount = "string",
TimeUnit = "string",
},
RetentionRuleId = "string",
TimeCreated = "string",
TimeModified = "string",
TimeRuleLocked = "string",
},
},
StorageTier = "string",
Versioning = "string",
});
example, err := ObjectStorage.NewBucket(ctx, "bucketResource", &ObjectStorage.BucketArgs{
CompartmentId: pulumi.String("string"),
Namespace: pulumi.String("string"),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
KmsKeyId: pulumi.String("string"),
AccessType: pulumi.String("string"),
Name: pulumi.String("string"),
AutoTiering: pulumi.String("string"),
ObjectEventsEnabled: pulumi.Bool(false),
RetentionRules: objectstorage.BucketRetentionRuleArray{
&objectstorage.BucketRetentionRuleArgs{
DisplayName: pulumi.String("string"),
Duration: &objectstorage.BucketRetentionRuleDurationArgs{
TimeAmount: pulumi.String("string"),
TimeUnit: pulumi.String("string"),
},
RetentionRuleId: pulumi.String("string"),
TimeCreated: pulumi.String("string"),
TimeModified: pulumi.String("string"),
TimeRuleLocked: pulumi.String("string"),
},
},
StorageTier: pulumi.String("string"),
Versioning: pulumi.String("string"),
})
var bucketResource = new Bucket("bucketResource", BucketArgs.builder()
.compartmentId("string")
.namespace("string")
.metadata(Map.of("string", "string"))
.definedTags(Map.of("string", "string"))
.freeformTags(Map.of("string", "string"))
.kmsKeyId("string")
.accessType("string")
.name("string")
.autoTiering("string")
.objectEventsEnabled(false)
.retentionRules(BucketRetentionRuleArgs.builder()
.displayName("string")
.duration(BucketRetentionRuleDurationArgs.builder()
.timeAmount("string")
.timeUnit("string")
.build())
.retentionRuleId("string")
.timeCreated("string")
.timeModified("string")
.timeRuleLocked("string")
.build())
.storageTier("string")
.versioning("string")
.build());
bucket_resource = oci.object_storage.Bucket("bucketResource",
compartment_id="string",
namespace="string",
metadata={
"string": "string",
},
defined_tags={
"string": "string",
},
freeform_tags={
"string": "string",
},
kms_key_id="string",
access_type="string",
name="string",
auto_tiering="string",
object_events_enabled=False,
retention_rules=[{
"display_name": "string",
"duration": {
"time_amount": "string",
"time_unit": "string",
},
"retention_rule_id": "string",
"time_created": "string",
"time_modified": "string",
"time_rule_locked": "string",
}],
storage_tier="string",
versioning="string")
const bucketResource = new oci.objectstorage.Bucket("bucketResource", {
compartmentId: "string",
namespace: "string",
metadata: {
string: "string",
},
definedTags: {
string: "string",
},
freeformTags: {
string: "string",
},
kmsKeyId: "string",
accessType: "string",
name: "string",
autoTiering: "string",
objectEventsEnabled: false,
retentionRules: [{
displayName: "string",
duration: {
timeAmount: "string",
timeUnit: "string",
},
retentionRuleId: "string",
timeCreated: "string",
timeModified: "string",
timeRuleLocked: "string",
}],
storageTier: "string",
versioning: "string",
});
type: oci:ObjectStorage:Bucket
properties:
accessType: string
autoTiering: string
compartmentId: string
definedTags:
string: string
freeformTags:
string: string
kmsKeyId: string
metadata:
string: string
name: string
namespace: string
objectEventsEnabled: false
retentionRules:
- displayName: string
duration:
timeAmount: string
timeUnit: string
retentionRuleId: string
timeCreated: string
timeModified: string
timeRuleLocked: string
storageTier: string
versioning: string
Bucket 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 Bucket resource accepts the following input properties:
- Compartment
Id string - (Updatable) The ID of the compartment in which to create the bucket.
- Namespace string
- The Object Storage namespace used for the request.
- Access
Type string - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - Auto
Tiering string - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Kms
Key stringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- Metadata Dictionary<string, string>
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- Name string
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- Object
Events boolEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - Retention
Rules List<BucketRetention Rule> - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- Storage
Tier string - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- Versioning string
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Id string - (Updatable) The ID of the compartment in which to create the bucket.
- Namespace string
- The Object Storage namespace used for the request.
- Access
Type string - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - Auto
Tiering string - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Kms
Key stringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- Metadata map[string]string
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- Name string
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- Object
Events boolEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - Retention
Rules []BucketRetention Rule Args - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- Storage
Tier string - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- Versioning string
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The ID of the compartment in which to create the bucket.
- namespace String
- The Object Storage namespace used for the request.
- access
Type String - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - auto
Tiering String - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- kms
Key StringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata Map<String,String>
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name String
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- object
Events BooleanEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - retention
Rules List<BucketRetention Rule> - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage
Tier String - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- versioning String
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id string - (Updatable) The ID of the compartment in which to create the bucket.
- namespace string
- The Object Storage namespace used for the request.
- access
Type string - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - auto
Tiering string - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- kms
Key stringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata {[key: string]: string}
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name string
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- object
Events booleanEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - retention
Rules BucketRetention Rule[] - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage
Tier string - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- versioning string
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
id str - (Updatable) The ID of the compartment in which to create the bucket.
- namespace str
- The Object Storage namespace used for the request.
- access_
type str - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - auto_
tiering str - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- kms_
key_ strid - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata Mapping[str, str]
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name str
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- object_
events_ boolenabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - retention_
rules Sequence[objectstorage.Bucket Retention Rule Args] - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage_
tier str - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- versioning str
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The ID of the compartment in which to create the bucket.
- namespace String
- The Object Storage namespace used for the request.
- access
Type String - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - auto
Tiering String - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- kms
Key StringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata Map<String>
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name String
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- object
Events BooleanEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - retention
Rules List<Property Map> - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage
Tier String - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- versioning String
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Outputs
All input properties are implicitly available as output properties. Additionally, the Bucket resource produces the following output properties:
- Approximate
Count string - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- Approximate
Size string - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- Bucket
Id string - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - Created
By string - The OCID of the user who created the bucket.
- Etag string
- The entity tag (ETag) for the bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Read boolOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - Object
Lifecycle stringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- Replication
Enabled bool - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - Time
Created string - The date and time the bucket was created, as described in RFC 2616.
- Approximate
Count string - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- Approximate
Size string - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- Bucket
Id string - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - Created
By string - The OCID of the user who created the bucket.
- Etag string
- The entity tag (ETag) for the bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Read boolOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - Object
Lifecycle stringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- Replication
Enabled bool - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - Time
Created string - The date and time the bucket was created, as described in RFC 2616.
- approximate
Count String - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate
Size String - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- bucket
Id String - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - created
By String - The OCID of the user who created the bucket.
- etag String
- The entity tag (ETag) for the bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Read BooleanOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - object
Lifecycle StringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication
Enabled Boolean - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - time
Created String - The date and time the bucket was created, as described in RFC 2616.
- approximate
Count string - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate
Size string - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- bucket
Id string - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - created
By string - The OCID of the user who created the bucket.
- etag string
- The entity tag (ETag) for the bucket.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Read booleanOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - object
Lifecycle stringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication
Enabled boolean - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - time
Created string - The date and time the bucket was created, as described in RFC 2616.
- approximate_
count str - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate_
size str - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- bucket_
id str - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - created_
by str - The OCID of the user who created the bucket.
- etag str
- The entity tag (ETag) for the bucket.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
read_ boolonly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - object_
lifecycle_ strpolicy_ etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication_
enabled bool - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - time_
created str - The date and time the bucket was created, as described in RFC 2616.
- approximate
Count String - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate
Size String - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- bucket
Id String - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - created
By String - The OCID of the user who created the bucket.
- etag String
- The entity tag (ETag) for the bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Read BooleanOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - object
Lifecycle StringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication
Enabled Boolean - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - time
Created String - The date and time the bucket was created, as described in RFC 2616.
Look up Existing Bucket Resource
Get an existing Bucket 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?: BucketState, opts?: CustomResourceOptions): Bucket
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_type: Optional[str] = None,
approximate_count: Optional[str] = None,
approximate_size: Optional[str] = None,
auto_tiering: Optional[str] = None,
bucket_id: Optional[str] = None,
compartment_id: Optional[str] = None,
created_by: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
etag: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
is_read_only: Optional[bool] = None,
kms_key_id: Optional[str] = None,
metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
object_events_enabled: Optional[bool] = None,
object_lifecycle_policy_etag: Optional[str] = None,
replication_enabled: Optional[bool] = None,
retention_rules: Optional[Sequence[_objectstorage.BucketRetentionRuleArgs]] = None,
storage_tier: Optional[str] = None,
time_created: Optional[str] = None,
versioning: Optional[str] = None) -> Bucket
func GetBucket(ctx *Context, name string, id IDInput, state *BucketState, opts ...ResourceOption) (*Bucket, error)
public static Bucket Get(string name, Input<string> id, BucketState? state, CustomResourceOptions? opts = null)
public static Bucket get(String name, Output<String> id, BucketState 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.
- Access
Type string - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - Approximate
Count string - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- Approximate
Size string - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- Auto
Tiering string - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - Bucket
Id string - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - Compartment
Id string - (Updatable) The ID of the compartment in which to create the bucket.
- Created
By string - The OCID of the user who created the bucket.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Etag string
- The entity tag (ETag) for the bucket.
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Is
Read boolOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - Kms
Key stringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- Metadata Dictionary<string, string>
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- Name string
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- Namespace string
- The Object Storage namespace used for the request.
- Object
Events boolEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - Object
Lifecycle stringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- Replication
Enabled bool - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - Retention
Rules List<BucketRetention Rule> - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- Storage
Tier string - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- Time
Created string - The date and time the bucket was created, as described in RFC 2616.
- Versioning string
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Access
Type string - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - Approximate
Count string - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- Approximate
Size string - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- Auto
Tiering string - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - Bucket
Id string - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - Compartment
Id string - (Updatable) The ID of the compartment in which to create the bucket.
- Created
By string - The OCID of the user who created the bucket.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Etag string
- The entity tag (ETag) for the bucket.
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Is
Read boolOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - Kms
Key stringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- Metadata map[string]string
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- Name string
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- Namespace string
- The Object Storage namespace used for the request.
- Object
Events boolEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - Object
Lifecycle stringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- Replication
Enabled bool - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - Retention
Rules []BucketRetention Rule Args - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- Storage
Tier string - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- Time
Created string - The date and time the bucket was created, as described in RFC 2616.
- Versioning string
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- access
Type String - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - approximate
Count String - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate
Size String - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- auto
Tiering String - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - bucket
Id String - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - compartment
Id String - (Updatable) The ID of the compartment in which to create the bucket.
- created
By String - The OCID of the user who created the bucket.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- etag String
- The entity tag (ETag) for the bucket.
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Read BooleanOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - kms
Key StringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata Map<String,String>
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name String
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- namespace String
- The Object Storage namespace used for the request.
- object
Events BooleanEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - object
Lifecycle StringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication
Enabled Boolean - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - retention
Rules List<BucketRetention Rule> - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage
Tier String - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- time
Created String - The date and time the bucket was created, as described in RFC 2616.
- versioning String
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- access
Type string - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - approximate
Count string - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate
Size string - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- auto
Tiering string - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - bucket
Id string - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - compartment
Id string - (Updatable) The ID of the compartment in which to create the bucket.
- created
By string - The OCID of the user who created the bucket.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- etag string
- The entity tag (ETag) for the bucket.
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Read booleanOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - kms
Key stringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata {[key: string]: string}
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name string
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- namespace string
- The Object Storage namespace used for the request.
- object
Events booleanEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - object
Lifecycle stringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication
Enabled boolean - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - retention
Rules BucketRetention Rule[] - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage
Tier string - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- time
Created string - The date and time the bucket was created, as described in RFC 2616.
- versioning string
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- access_
type str - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - approximate_
count str - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate_
size str - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- auto_
tiering str - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - bucket_
id str - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - compartment_
id str - (Updatable) The ID of the compartment in which to create the bucket.
- created_
by str - The OCID of the user who created the bucket.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- etag str
- The entity tag (ETag) for the bucket.
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is_
read_ boolonly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - kms_
key_ strid - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata Mapping[str, str]
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name str
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- namespace str
- The Object Storage namespace used for the request.
- object_
events_ boolenabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - object_
lifecycle_ strpolicy_ etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication_
enabled bool - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - retention_
rules Sequence[objectstorage.Bucket Retention Rule Args] - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage_
tier str - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- time_
created str - The date and time the bucket was created, as described in RFC 2616.
- versioning str
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- access
Type String - (Updatable) The type of public access enabled on this bucket. A bucket is set to
NoPublicAccess
by default, which only allows an authenticated caller to access the bucket and its contents. WhenObjectRead
is enabled on the bucket, public access is allowed for theGetObject
,HeadObject
, andListObjects
operations. WhenObjectReadWithoutList
is enabled on the bucket, public access is allowed for theGetObject
andHeadObject
operations. - approximate
Count String - The approximate number of objects in the bucket. Count statistics are reported periodically. You will see a lag between what is displayed and the actual object count.
- approximate
Size String - The approximate total size in bytes of all objects in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the bucket.
- auto
Tiering String - (Updatable) Set the auto tiering status on the bucket. By default, a bucket is created with auto tiering
Disabled
. Use this option to enable auto tiering during bucket creation. Objects in a bucket with auto tiering set toInfrequentAccess
are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects. - bucket
Id String - The OCID of the bucket which is a Oracle assigned unique identifier for this resource type (bucket).
bucket_id
cannot be used for bucket lookup. - compartment
Id String - (Updatable) The ID of the compartment in which to create the bucket.
- created
By String - The OCID of the user who created the bucket.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- etag String
- The entity tag (ETag) for the bucket.
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Read BooleanOnly - Whether or not this bucket is read only. By default,
isReadOnly
is set tofalse
. This will be set to 'true' when this bucket is configured as a destination in a replication policy. - kms
Key StringId - (Updatable) The OCID of a master encryption key used to call the Key Management service to generate a data encryption key or to encrypt or decrypt a data encryption key.
- metadata Map<String>
- (Updatable) Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
- name String
- The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1
- namespace String
- The Object Storage namespace used for the request.
- object
Events BooleanEnabled - (Updatable) Whether or not events are emitted for object state changes in this bucket. By default,
objectEventsEnabled
is set tofalse
. SetobjectEventsEnabled
totrue
to emit events for object state changes. For more information about events, see Overview of Events. - object
Lifecycle StringPolicy Etag - The entity tag (ETag) for the live object lifecycle policy on the bucket.
- replication
Enabled Boolean - Whether or not this bucket is a replication source. By default,
replicationEnabled
is set tofalse
. This will be set to 'true' when you create a replication policy for the bucket. - retention
Rules List<Property Map> - (Updatable) Creates a new retention rule in the specified bucket. The new rule will take effect typically within 30 seconds. Note that a maximum of 100 rules are supported on a bucket.
- storage
Tier String - The type of storage tier of this bucket. A bucket is set to 'Standard' tier by default, which means the bucket will be put in the standard storage tier. When 'Archive' tier type is set explicitly, the bucket is put in the Archive Storage tier. The 'storageTier' property is immutable after bucket is created.
- time
Created String - The date and time the bucket was created, as described in RFC 2616.
- versioning String
(Updatable) Set the versioning status on the bucket. By default, a bucket is created with versioning
Disabled
. Use this option to enable versioning during bucket creation. Objects in a version enabled bucket are protected from overwrites and deletions. Previous versions of the same object will be available in the bucket. Allowed Create values: Enabled, Disabled. Allowed Update values: Enabled, Suspended.** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Supporting Types
BucketRetentionRule, BucketRetentionRuleArgs
- Display
Name string - A user-specified name for the retention rule. Names can be helpful in identifying retention rules. The name should be unique. This attribute is a forcenew attribute
- Duration
Bucket
Retention Rule Duration - (Updatable)
- Retention
Rule stringId - Unique identifier for the retention rule.
- Time
Created string - The date and time the bucket was created, as described in RFC 2616.
- Time
Modified string - The date and time that the retention rule was modified as per RFC3339.
- Time
Rule stringLocked - (Updatable) The date and time as per RFC 3339 after which this rule is locked and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are allowed and no other properties can be changed. This property cannot be updated for rules that are in a locked state. Specifying it when a duration is not specified is considered an error.
- Display
Name string - A user-specified name for the retention rule. Names can be helpful in identifying retention rules. The name should be unique. This attribute is a forcenew attribute
- Duration
Bucket
Retention Rule Duration - (Updatable)
- Retention
Rule stringId - Unique identifier for the retention rule.
- Time
Created string - The date and time the bucket was created, as described in RFC 2616.
- Time
Modified string - The date and time that the retention rule was modified as per RFC3339.
- Time
Rule stringLocked - (Updatable) The date and time as per RFC 3339 after which this rule is locked and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are allowed and no other properties can be changed. This property cannot be updated for rules that are in a locked state. Specifying it when a duration is not specified is considered an error.
- display
Name String - A user-specified name for the retention rule. Names can be helpful in identifying retention rules. The name should be unique. This attribute is a forcenew attribute
- duration
Bucket
Retention Rule Duration - (Updatable)
- retention
Rule StringId - Unique identifier for the retention rule.
- time
Created String - The date and time the bucket was created, as described in RFC 2616.
- time
Modified String - The date and time that the retention rule was modified as per RFC3339.
- time
Rule StringLocked - (Updatable) The date and time as per RFC 3339 after which this rule is locked and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are allowed and no other properties can be changed. This property cannot be updated for rules that are in a locked state. Specifying it when a duration is not specified is considered an error.
- display
Name string - A user-specified name for the retention rule. Names can be helpful in identifying retention rules. The name should be unique. This attribute is a forcenew attribute
- duration
Bucket
Retention Rule Duration - (Updatable)
- retention
Rule stringId - Unique identifier for the retention rule.
- time
Created string - The date and time the bucket was created, as described in RFC 2616.
- time
Modified string - The date and time that the retention rule was modified as per RFC3339.
- time
Rule stringLocked - (Updatable) The date and time as per RFC 3339 after which this rule is locked and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are allowed and no other properties can be changed. This property cannot be updated for rules that are in a locked state. Specifying it when a duration is not specified is considered an error.
- display_
name str - A user-specified name for the retention rule. Names can be helpful in identifying retention rules. The name should be unique. This attribute is a forcenew attribute
- duration
objectstorage.
Bucket Retention Rule Duration - (Updatable)
- retention_
rule_ strid - Unique identifier for the retention rule.
- time_
created str - The date and time the bucket was created, as described in RFC 2616.
- time_
modified str - The date and time that the retention rule was modified as per RFC3339.
- time_
rule_ strlocked - (Updatable) The date and time as per RFC 3339 after which this rule is locked and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are allowed and no other properties can be changed. This property cannot be updated for rules that are in a locked state. Specifying it when a duration is not specified is considered an error.
- display
Name String - A user-specified name for the retention rule. Names can be helpful in identifying retention rules. The name should be unique. This attribute is a forcenew attribute
- duration Property Map
- (Updatable)
- retention
Rule StringId - Unique identifier for the retention rule.
- time
Created String - The date and time the bucket was created, as described in RFC 2616.
- time
Modified String - The date and time that the retention rule was modified as per RFC3339.
- time
Rule StringLocked - (Updatable) The date and time as per RFC 3339 after which this rule is locked and can only be deleted by deleting the bucket. Once a rule is locked, only increases in the duration are allowed and no other properties can be changed. This property cannot be updated for rules that are in a locked state. Specifying it when a duration is not specified is considered an error.
BucketRetentionRuleDuration, BucketRetentionRuleDurationArgs
- Time
Amount string - (Updatable) The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified timestamp.
- Time
Unit string - (Updatable) The unit that should be used to interpret timeAmount.
- Time
Amount string - (Updatable) The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified timestamp.
- Time
Unit string - (Updatable) The unit that should be used to interpret timeAmount.
- time
Amount String - (Updatable) The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified timestamp.
- time
Unit String - (Updatable) The unit that should be used to interpret timeAmount.
- time
Amount string - (Updatable) The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified timestamp.
- time
Unit string - (Updatable) The unit that should be used to interpret timeAmount.
- time_
amount str - (Updatable) The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified timestamp.
- time_
unit str - (Updatable) The unit that should be used to interpret timeAmount.
- time
Amount String - (Updatable) The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified timestamp.
- time
Unit String - (Updatable) The unit that should be used to interpret timeAmount.
Import
Buckets can be imported using the id
, e.g.
$ pulumi import oci:ObjectStorage/bucket:Bucket test_bucket "n/{namespaceName}/b/{bucketName}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.