Create an Oracle Cloud Infrastructure Object Storage Classic Container

post

/integrations/osscontainer/

Creates a container in Oracle Cloud Infrastructure Object Storage Classic.

After creating a container in Oracle Cloud Infrastructure Object Storage Classic, you can fetch its details. See Managing Containers in Oracle Cloud Infrastructure Object Storage Classic in Using Oracle Cloud Infrastructure Object Storage Classic.

Prerequisite: Ensure that you have selected a replication policy for your Oracle Cloud Infrastructure Object Storage Classic instance. See Selecting a Replication Policy for Your Service Instance in Using Oracle Cloud Infrastructure Object Storage Classic.

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Header Parameters
Body ()
The request body contains details of the Oracle Cloud Infrastructure Object Storage Classic container that you want to create.
Root Schema : OSSContainer-post-request
Type: object
The request body contains details of the Oracle Cloud Infrastructure Object Storage Classic container that you want to create.
Show Source
  • The two-part name of the account (/Compute-identity_domain/cloud_storage) that contains the credentials and access details of the associated Oracle Cloud Infrastructure Object Storage Classic instance.
  • The name of the container that you want to create.

    Container names must:

    * Contain only UTF-8 characters

    * Be a maximum of 256 bytes

    * Avoid using a slash (/) character because this character acts as a delimiter between the container name and the object name

    When you specify a container name, ensure that a container of the same name doesn't already exist.

  • Determines whether the contents of the Oracle Cloud Infrastructure Object Storage Classic container is also deleted when you delete the integrations/osscontainer object.

    When set to true, deletes the Oracle Cloud Infrastructure Object Storage Classic container along with all the objects in the container when you delete the integration/osscontainer object created by this orchestration.

    When set to false, only the integrations/osscontainer object created by this orchestration is deleted.

  • The three-part name of the integrations/osscontainer object created by this orchestration. This name is in the format /Compute-identity_domain/user/object.

    If you don't specify a name for this object, then the name is generated automatically.

    Object names can contain only alphanumeric characters, hyphens, underscores, and periods. Object names are case-sensitive.

    When you specify the object name, ensure that an object of the same type and with the same name doesn't already exist. If such an object already exists, another object of the same type and with the same name won't be created and the existing object won't be updated.

Response

Supported Media Types

201 Response

Created. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : OSSContainer-response
Type: object
Show Source
Nested Schema : georeplication_details
Type: object
Additional Properties Allowed
Show Source
Details applying to the georeplication policy
Nested Schema : additionalProperties
Type: object

Examples

cURL Command

The following example shows how to create a container in Oracle Cloud Infrastructure Object Storage Classic by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X POST
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@osscontainer.json"
        https://api-z999.compute.us0.oraclecloud.com/integrations/osscontainer/
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Request Body

The following shows an example of the request body content in the osscontainer.json file.

{
 "account": "/Compute-acme/cloud_storage",
 "container": "container-name",
 "delete_remote": true
}

Example of Response Body

The following example shows the response body in JSON format.

{
  "account": "/Compute-acme/cloud_storage",
  "delete_remote": true,
  "container": "container-name",
  "georeplication": "us2",
  "modification_time": "2016-12-23T08:03:43Z",
  "creation_time": "2016-12-23T08:03:43Z",
  "uri": "https://api-z999.compute.us0.oraclecloud.com/integrations/osscontainer/Compute-acme/jack.jones@example.com/2437242e-ee77-40d9-b45c-a608fc09c029",
  "deletion_progress": "",
  "state": "created",
  "error_reason": "",
  "name": "/Compute-acme/jack.jones@example.com/2437242e-ee77-40d9-b45c-a608fc09c029"
}

To fetch the details of the created container, see Managing Containers in Oracle Cloud Infrastructure Object Storage Classic in Using Oracle Cloud Infrastructure Object Storage Classic.