Class Bucket
A bucket is a container for storing objects in a compartment within a namespace. A bucket is associated with a single compartment.
The compartment has policies that indicate what actions a user can perform on a bucket and all the objects in the bucket. For more
information, see Managing Buckets.
To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized,
talk to an administrator. If you are an administrator who needs to write policies to give users access, see
Getting Started with Policies.
Inherited Members
Namespace: Oci.ObjectstorageService.Models
Assembly: OCI.DotNetSDK.Objectstorage.dll
Syntax
public class Bucket
Properties
ApproximateCount
Declaration
[JsonProperty(PropertyName = "approximateCount")]
public long? ApproximateCount { get; set; }
Property Value
Type | Description |
---|---|
long? | 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
Declaration
[JsonProperty(PropertyName = "approximateSize")]
public long? ApproximateSize { get; set; }
Property Value
Type | Description |
---|---|
long? | 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
Declaration
[JsonProperty(PropertyName = "autoTiering")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Bucket.AutoTieringEnum? AutoTiering { get; set; }
Property Value
Type | Description |
---|---|
Bucket.AutoTieringEnum? | The auto tiering status on the bucket. A bucket is created with auto tiering |
CompartmentId
Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The compartment ID in which the bucket is authorized. |
Remarks
Required
CreatedBy
Declaration
[Required(ErrorMessage = "CreatedBy is required.")]
[JsonProperty(PropertyName = "createdBy")]
public string CreatedBy { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the user who created the bucket. |
Remarks
Required
DefinedTags
Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | 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
Declaration
[Required(ErrorMessage = "Etag is required.")]
[JsonProperty(PropertyName = "etag")]
public string Etag { get; set; }
Property Value
Type | Description |
---|---|
string | The entity tag (ETag) for the bucket. |
Remarks
Required
FreeformTags
Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | 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"} |
Id
Declaration
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the bucket. |
IsReadOnly
Declaration
[JsonProperty(PropertyName = "isReadOnly")]
public bool? IsReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether or not this bucket is read only. By default, |
KmsKeyId
Declaration
[JsonProperty(PropertyName = "kmsKeyId")]
public string KmsKeyId { get; set; }
Property Value
Type | Description |
---|---|
string | 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
Declaration
[Required(ErrorMessage = "Metadata is required.")]
[JsonProperty(PropertyName = "metadata")]
public Dictionary<string, string> Metadata { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | Arbitrary string keys and values for user-defined metadata. |
Remarks
Required
Name
Declaration
[Required(ErrorMessage = "Name is required.")]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1 |
Remarks
Required
Namespace
Declaration
[Required(ErrorMessage = "Namespace is required.")]
[JsonProperty(PropertyName = "namespace")]
public string Namespace { get; set; }
Property Value
Type | Description |
---|---|
string | The Object Storage namespace in which the bucket resides. |
Remarks
Required
ObjectEventsEnabled
Declaration
[JsonProperty(PropertyName = "objectEventsEnabled")]
public bool? ObjectEventsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether or not events are emitted for object state changes in this bucket. By default, |
ObjectLifecyclePolicyEtag
Declaration
[JsonProperty(PropertyName = "objectLifecyclePolicyEtag")]
public string ObjectLifecyclePolicyEtag { get; set; }
Property Value
Type | Description |
---|---|
string | The entity tag (ETag) for the live object lifecycle policy on the bucket. |
PublicAccessType
Declaration
[JsonProperty(PropertyName = "publicAccessType")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Bucket.PublicAccessTypeEnum? PublicAccessType { get; set; }
Property Value
Type | Description |
---|---|
Bucket.PublicAccessTypeEnum? | The type of public access enabled on this bucket.
A bucket is set to |
ReplicationEnabled
Declaration
[JsonProperty(PropertyName = "replicationEnabled")]
public bool? ReplicationEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether or not this bucket is a replication source. By default, |
StorageTier
Declaration
[JsonProperty(PropertyName = "storageTier")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Bucket.StorageTierEnum? StorageTier { get; set; }
Property Value
Type | Description |
---|---|
Bucket.StorageTierEnum? | The storage tier type assigned to the bucket. A bucket is set to |
TimeCreated
Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The date and time the bucket was created, as described in RFC 2616. |
Remarks
Required
Versioning
Declaration
[JsonProperty(PropertyName = "versioning")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Bucket.VersioningEnum? Versioning { get; set; }
Property Value
Type | Description |
---|---|
Bucket.VersioningEnum? | The versioning status on the bucket. A bucket is created with versioning |