CreateBucket

post

/n/{namespace_name}/b

Create a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering confidential information in bucket name.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Request object for creating a bucket.
Root Schema : CreateBucketDetails
Type: object
To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator.
Show Source
  • 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.
  • The ID of the compartment in which to create the bucket.
  • definedTags
    Additional Properties Allowed: additionalProperties
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
  • freeformTags
    Additional Properties Allowed: additionalProperties
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
  • 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
    Additional Properties Allowed: additionalProperties
    Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
  • Minimum Length: 1
    Maximum Length: 256
    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: my-new-bucket1
  • 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.
  • Allowed Values: [ "Disabled", "Write", "ReadWrite" ]
    The type of requests for which object-level audit logging is enabled on this bucket. This property is set to Disabled by default, where no audit logs will be produced at the object level for this bucket. If the property is set to Write, audit logs will be produced for operations such as Put Object. If the property is set to ReadWrite, audit logs will be produced for operations such as Put Object and Get Object.
  • Allowed Values: [ "NoPublicAccess", "ObjectRead", "ObjectReadWithoutList" ]
    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.
  • Allowed Values: [ "Standard", "Archive", "Query" ]
    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.
  • Allowed Values: [ "Enabled", "Disabled" ]
    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.
Nested Schema : definedTags
Type: object
Additional Properties Allowed
Show Source
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
Nested Schema : freeformTags
Type: object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
Nested Schema : additionalProperties
Type: object
Additional Properties Allowed
Show Source
Key-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Nested Schema : additionalProperties
Type: object
The value of the tag. Only the String type is supported.
Back to Top

Response

Supported Media Types

200 Response

The complete bucket representation, including fields set by the server.
Headers
Body ()
Root Schema : Bucket
Type: object
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.
Show Source
  • 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.
  • 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.
  • The approximate total size in bytes of all uncommitted parts in the bucket. Size statistics are reported periodically. You will see a lag between what is displayed and the actual size of the uncommitted parts in the bucket.
  • Allowed Values: [ "Disabled", "InfrequentAccess" ]
    The auto tiering status on the bucket. A bucket is created with auto tiering Disabled by default. For auto tiering InfrequentAccess, objects are transitioned automatically between the 'Standard' and 'InfrequentAccess' tiers based on the access pattern of the objects.
  • The compartment ID in which the bucket is authorized.
  • The OCID of the user who created the bucket.
  • definedTags
    Additional Properties Allowed: additionalProperties
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
  • The entity tag (ETag) for the bucket.
  • freeformTags
    Additional Properties Allowed: additionalProperties
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
  • The OCID of the bucket.
  • 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.
  • 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
    Additional Properties Allowed: additionalProperties
    Arbitrary string keys and values for user-defined metadata.
  • The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
  • The Object Storage namespace in which the bucket resides.
  • 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.
  • Allowed Values: [ "Disabled", "Write", "ReadWrite" ]
    The type of requests for which object-level audit logging is enabled on this bucket. This property is set to Disabled by default, where no audit logs will be produced at the object level for this bucket. If the property is set to Write, audit logs will be produced for operations such as Put Object. If the property is set to ReadWrite, audit logs will be produced for operations such as Put Object and Get Object.
  • The entity tag (ETag) for the live object lifecycle policy on the bucket.
  • Allowed Values: [ "NoPublicAccess", "ObjectRead", "ObjectReadWithoutList" ]
    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.
  • 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.
  • Allowed Values: [ "Standard", "Archive" ]
    The storage tier type assigned to the bucket. A bucket is set to Standard tier by default, which means objects uploaded or copied to the bucket will be in the standard storage tier. When the Archive tier type is set explicitly for a bucket, objects uploaded or copied to the bucket will be stored in archive storage. The storageTier property is immutable after bucket is created.
  • The date and time the bucket was created, as described in [RFC 2616](https://tools.ietf.org/html/rfc2616#section-14.29).
  • Allowed Values: [ "Enabled", "Suspended", "Disabled" ]
    The versioning status on the bucket. A bucket is created with versioning Disabled by default. For versioning Enabled, objects are protected from overwrites and deletes, by maintaining their version history. When versioning is Suspended, the previous versions will still remain but new versions will no longer be created when overwitten or deleted.
Nested Schema : definedTags
Type: object
Additional Properties Allowed
Show Source
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
Nested Schema : freeformTags
Type: object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : metadata
Type: object
Additional Properties Allowed
Show Source
Arbitrary string keys and values for user-defined metadata.
Nested Schema : additionalProperties
Type: object
Additional Properties Allowed
Show Source
Key-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Nested Schema : additionalProperties
Type: object
The value of the tag. Only the String type is supported.
Example Response (application-json)
{   "namespace": "ansh8lvru1zp",   "name": "MyBucket6",   "compartmentId": "ocid1.compartment.unique_ID",   "id": "ocid1.bucket.unique_ID",   "createdBy": "ocid1.user.unique_ID",   "timeCreated": "2016-08-09T01:11:38.639Z",   "metadata": {},   "etag": "21edf865-d3d9-424f-8218-37188e803db8",   "freeformTags": {"Department": "Finance"},   "definedTags":   {     "MyTags":     {       "CostCenter": "42",       "Project": "Stealth",       "CreatedBy": "BillSmith",       "CreatedDate": "9/21/2017T14:00"     },     "Audit":     {       "DataSensitivity": "PII",       "CageSecurity": "High",       "Simplicity": "complex"     }   } } 

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

408 Response

Request Timeout
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

409 Response

Conflict
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

411 Response

Content-Length Required
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

429 Response

Too Many Requests
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

Default Response

An error has occurred.
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
Back to Top