1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. Bucket
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.ObjectStorage.Bucket

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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=[oci.object_storage.BucketRetentionRuleArgs(
            display_name="string",
            duration=oci.object_storage.BucketRetentionRuleDurationArgs(
                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

    The Bucket resource accepts the following input properties:

    CompartmentId string
    (Updatable) The ID of the compartment in which to create the bucket.
    Namespace string
    The Object Storage namespace used for the request.
    AccessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    AutoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    DefinedTags 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"}
    FreeformTags 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"}
    KmsKeyId string
    (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
    ObjectEventsEnabled bool
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    RetentionRules List<BucketRetentionRule>
    (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.
    StorageTier 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

    CompartmentId string
    (Updatable) The ID of the compartment in which to create the bucket.
    Namespace string
    The Object Storage namespace used for the request.
    AccessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    AutoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    DefinedTags 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"}
    FreeformTags 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"}
    KmsKeyId string
    (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
    ObjectEventsEnabled bool
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    RetentionRules []BucketRetentionRuleArgs
    (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.
    StorageTier 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

    compartmentId String
    (Updatable) The ID of the compartment in which to create the bucket.
    namespace String
    The Object Storage namespace used for the request.
    accessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    autoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    definedTags 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"}
    freeformTags 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"}
    kmsKeyId String
    (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
    objectEventsEnabled Boolean
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    retentionRules List<BucketRetentionRule>
    (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.
    storageTier 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

    compartmentId string
    (Updatable) The ID of the compartment in which to create the bucket.
    namespace string
    The Object Storage namespace used for the request.
    accessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    autoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    definedTags {[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"}
    freeformTags {[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"}
    kmsKeyId string
    (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
    objectEventsEnabled boolean
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    retentionRules BucketRetentionRule[]
    (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.
    storageTier 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    defined_tags 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"}
    freeform_tags 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_id str
    (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_enabled bool
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    retention_rules Sequence[objectstorage.BucketRetentionRuleArgs]
    (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

    compartmentId String
    (Updatable) The ID of the compartment in which to create the bucket.
    namespace String
    The Object Storage namespace used for the request.
    accessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    autoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    definedTags 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"}
    freeformTags 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"}
    kmsKeyId String
    (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
    objectEventsEnabled Boolean
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    retentionRules 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.
    storageTier 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:

    ApproximateCount 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.
    ApproximateSize 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.
    BucketId 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.
    CreatedBy 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.
    IsReadOnly bool
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    ObjectLifecyclePolicyEtag string
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    ReplicationEnabled bool
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    TimeCreated string
    The date and time the bucket was created, as described in RFC 2616.
    ApproximateCount 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.
    ApproximateSize 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.
    BucketId 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.
    CreatedBy 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.
    IsReadOnly bool
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    ObjectLifecyclePolicyEtag string
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    ReplicationEnabled bool
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    TimeCreated string
    The date and time the bucket was created, as described in RFC 2616.
    approximateCount 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.
    approximateSize 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.
    bucketId 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.
    createdBy 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.
    isReadOnly Boolean
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    objectLifecyclePolicyEtag String
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    replicationEnabled Boolean
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    timeCreated String
    The date and time the bucket was created, as described in RFC 2616.
    approximateCount 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.
    approximateSize 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.
    bucketId 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.
    createdBy 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.
    isReadOnly boolean
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    objectLifecyclePolicyEtag string
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    replicationEnabled boolean
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    timeCreated 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_only bool
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    object_lifecycle_policy_etag str
    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 to false. 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.
    approximateCount 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.
    approximateSize 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.
    bucketId 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.
    createdBy 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.
    isReadOnly Boolean
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    objectLifecyclePolicyEtag String
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    replicationEnabled Boolean
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    timeCreated 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.
    The following state arguments are supported:
    AccessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    ApproximateCount 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.
    ApproximateSize 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.
    AutoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    BucketId 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.
    CompartmentId string
    (Updatable) The ID of the compartment in which to create the bucket.
    CreatedBy string
    The OCID of the user who created the bucket.
    DefinedTags 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.
    FreeformTags 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"}
    IsReadOnly bool
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    KmsKeyId string
    (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.
    ObjectEventsEnabled bool
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    ObjectLifecyclePolicyEtag string
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    ReplicationEnabled bool
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    RetentionRules List<BucketRetentionRule>
    (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.
    StorageTier 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.
    TimeCreated 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

    AccessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    ApproximateCount 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.
    ApproximateSize 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.
    AutoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    BucketId 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.
    CompartmentId string
    (Updatable) The ID of the compartment in which to create the bucket.
    CreatedBy string
    The OCID of the user who created the bucket.
    DefinedTags 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.
    FreeformTags 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"}
    IsReadOnly bool
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    KmsKeyId string
    (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.
    ObjectEventsEnabled bool
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    ObjectLifecyclePolicyEtag string
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    ReplicationEnabled bool
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    RetentionRules []BucketRetentionRuleArgs
    (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.
    StorageTier 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.
    TimeCreated 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

    accessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    approximateCount 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.
    approximateSize 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.
    autoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    bucketId 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.
    compartmentId String
    (Updatable) The ID of the compartment in which to create the bucket.
    createdBy String
    The OCID of the user who created the bucket.
    definedTags 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.
    freeformTags 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"}
    isReadOnly Boolean
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    kmsKeyId String
    (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.
    objectEventsEnabled Boolean
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    objectLifecyclePolicyEtag String
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    replicationEnabled Boolean
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    retentionRules List<BucketRetentionRule>
    (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.
    storageTier 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.
    timeCreated 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

    accessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    approximateCount 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.
    approximateSize 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.
    autoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    bucketId 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.
    compartmentId string
    (Updatable) The ID of the compartment in which to create the bucket.
    createdBy string
    The OCID of the user who created the bucket.
    definedTags {[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.
    freeformTags {[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"}
    isReadOnly boolean
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    kmsKeyId string
    (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.
    objectEventsEnabled boolean
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    objectLifecyclePolicyEtag string
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    replicationEnabled boolean
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    retentionRules BucketRetentionRule[]
    (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.
    storageTier 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.
    timeCreated 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject 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 to InfrequentAccess 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.
    defined_tags 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.
    freeform_tags 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_only bool
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    kms_key_id str
    (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_enabled bool
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    object_lifecycle_policy_etag str
    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 to false. This will be set to 'true' when you create a replication policy for the bucket.
    retention_rules Sequence[objectstorage.BucketRetentionRuleArgs]
    (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

    accessType 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. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations.
    approximateCount 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.
    approximateSize 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.
    autoTiering 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 to InfrequentAccess are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
    bucketId 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.
    compartmentId String
    (Updatable) The ID of the compartment in which to create the bucket.
    createdBy String
    The OCID of the user who created the bucket.
    definedTags 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.
    freeformTags 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"}
    isReadOnly Boolean
    Whether or not this bucket is read only. By default, isReadOnly is set to false. This will be set to 'true' when this bucket is configured as a destination in a replication policy.
    kmsKeyId String
    (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.
    objectEventsEnabled Boolean
    (Updatable) Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events.
    objectLifecyclePolicyEtag String
    The entity tag (ETag) for the live object lifecycle policy on the bucket.
    replicationEnabled Boolean
    Whether or not this bucket is a replication source. By default, replicationEnabled is set to false. This will be set to 'true' when you create a replication policy for the bucket.
    retentionRules 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.
    storageTier 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.
    timeCreated 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

    DisplayName 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 BucketRetentionRuleDuration
    (Updatable)
    RetentionRuleId string
    Unique identifier for the retention rule.
    TimeCreated string
    The date and time the bucket was created, as described in RFC 2616.
    TimeModified string
    The date and time that the retention rule was modified as per RFC3339.
    TimeRuleLocked string
    (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.
    DisplayName 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 BucketRetentionRuleDuration
    (Updatable)
    RetentionRuleId string
    Unique identifier for the retention rule.
    TimeCreated string
    The date and time the bucket was created, as described in RFC 2616.
    TimeModified string
    The date and time that the retention rule was modified as per RFC3339.
    TimeRuleLocked string
    (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.
    displayName 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 BucketRetentionRuleDuration
    (Updatable)
    retentionRuleId String
    Unique identifier for the retention rule.
    timeCreated String
    The date and time the bucket was created, as described in RFC 2616.
    timeModified String
    The date and time that the retention rule was modified as per RFC3339.
    timeRuleLocked String
    (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.
    displayName 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 BucketRetentionRuleDuration
    (Updatable)
    retentionRuleId string
    Unique identifier for the retention rule.
    timeCreated string
    The date and time the bucket was created, as described in RFC 2616.
    timeModified string
    The date and time that the retention rule was modified as per RFC3339.
    timeRuleLocked string
    (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.BucketRetentionRuleDuration
    (Updatable)
    retention_rule_id str
    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_locked str
    (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.
    displayName 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)
    retentionRuleId String
    Unique identifier for the retention rule.
    timeCreated String
    The date and time the bucket was created, as described in RFC 2616.
    timeModified String
    The date and time that the retention rule was modified as per RFC3339.
    timeRuleLocked String
    (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

    TimeAmount 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.
    TimeUnit string
    (Updatable) The unit that should be used to interpret timeAmount.
    TimeAmount 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.
    TimeUnit string
    (Updatable) The unit that should be used to interpret timeAmount.
    timeAmount 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.
    timeUnit String
    (Updatable) The unit that should be used to interpret timeAmount.
    timeAmount 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.
    timeUnit 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.
    timeAmount 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.
    timeUnit 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.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi