Manage Oracle Cloud Infrastructure Buckets and Objects from an Integration

You can manage Oracle Cloud Infrastructure Object Storage buckets and objects directly from the integration canvas through use of the OCI Object storage action. This section provides high-level use cases on how to create a bucket and upload objects directly from an integration.

Create an Object Storage Bucket

  1. Add a REST Adapter trigger connection to the integration.
    1. On the Basic Info page, enter a name, and click Next.
    2. On the Resource Configuration page, enter the following information.
      Field Description
      What is the endpoint's relative resource URI Enter the following:
      /trigger
      What action do you want to perform on the endpoint Select POST.
      Select any options that you want to configure Scroll to the bottom of the page and select the following options:
      • Add and review parameters for this endpoint
      • Configure a request payload for this endpoint
    3. On the Request Parameters page, create the following query parameters.
      Name Data Type
      bucketName string
      objectName string
    4. On the Request page, create the following query parameters.
      Field Description
      Select the request payload format Binary
      What is the media-type of Request Body? application/octet-stream
    5. On the Summary page, click Finish.
  2. Add an OCI Object storage action to the integration.
  3. Enter a name.
  4. Select Manage buckets.
  5. From the Select operation list, select Create bucket.
  6. Select the compartment in which to create the bucket.

    For this example, an object storage bucket is selected for creation in the oic compartment in Oracle Cloud Infrastructure.


    The Configure object storage panel shows fields for the name, resource type to manage, selected operation, and selected compartment.

  7. Click Continue.
  8. Review your selections on the Summary page. The provided name, selected compartment, and the OCID for that compartment are displayed.

    The integration looks as follows.


    The integration shows a trigger, map action , and OCI object storage action.

  9. Double-click the mapper.
  10. In the Target section, right-click the Compartment ID element and select Create target node.
  11. In the Expression Builder, specify an OCID value. The value you map to the Compartment ID takes precedence over the design-time selection, even if it's a different OCID or a blank value (empty string).


    The Sources, Mapping canvas, and Targets sections are shown. The target Compartment id element is selected. In the Expression Builder at the bottom, the OCID value for the compartment is entered.

  12. In the Target section, right-click the Name element and select Create target node.
  13. In the Expression Builder, enter the name to use for the new bucket (for this example, l2_demo_bucket is entered).


    The Sources, Mapping canvas, and Targets sections are shown. The target Name element is selected. In the Expression Builder at the bottom, a value of l2_demo_bucket is entered.

    Configuration of the mapper is now complete.


    The Target column shows the Compartment ID and Name elements. Both elements have a "T" icon that indicates they have been defined in the Expression Builder.

  14. Save your changes, and exit the integration.
  15. Hover your cursor over the integration, and select Actions Actions icon, then Run.
  16. On the Configure and run page, click Run.
  17. Review the activity stream.


    The Activity Stream panel instance ID and tracing level are shown at the top. The activity stream shows the movement of messages through the integration. All milestones are shown as green.

  18. Go to the Oracle Cloud Infrastructure Console.
  19. In the navigation pane, select Storage, then Buckets.


    The navigation pane shows that the Storage option is selected. To the right are sections for Block Storage, File Storage, and Object Storage & Archive Storage. The Bucket option within Object Storage & Archive Storage is being selected.

    The new bucket (for this example, l2_demo_bucket) is visible in the table.


    The Create Bucket button appears at the top. Below is a table with columns for Name, Default Storage Tier, Visibility, and Created. The bucket named l2_demo_bucket appears in the table.

Upload an Object

  1. Add a REST Adapter trigger connection to an integration.
    1. On the Basic Info page, enter a name, and click Next.
    2. On the Resource Configuration page, enter the following information.
      Field Description
      What is the endpoint's relative resource URI Enter the following:
      /trigger
      What action do you want to perform on the endpoint Select POST.
      Select any options that you want to configure Scroll to the bottom of the page and select the following options:
      • Add and review parameters for this endpoint
      • Configure a request payload for this endpoint
    3. On the Request Parameters page, create the following query parameters.
      Name Data Type
      bucketName string
      objectName string
    4. On the Request page, create the following query parameters.
      Field Description
      Select the request payload format Binary
      What is the media-type of Request Body? application/octet-stream
    5. On the Summary page, click Finish.
  2. Add an OCI Object storage action to an integration.
    1. Enter a name.
    2. Select Manage objects.
    3. From the Select operation list, select Upload Object, then click Continue.


      The Configure object storage panel shows fields for the name, resource type to manage, and selected operation.

    4. Review your selections on the Summary page, then click Finish.
  3. Click the mapper.
  4. Perform the following source-to-target mappings.
    • Map the source Bucket Name to the target Bucket Name.
    • Map the source Object Name to the target Object Name.
    • Map the source Stream Reference to the target Stream Reference.


    The Sources, Mapping canvas, and Targets sections are shown. Bucket Name is mapped to Bucket Name. Object Name is mapped to Object Name. Stream Reference is mapped to Stream Reference.

  5. Save the integration.

    The integration looks as follows.


    The integration shows the trigger, map, and OCI Object Storage action.

  6. Exit the integration canvas.
  7. Hover your cursor over the integration, and select Actions Actions icon, then Run.
  8. In the Request section, click File and upload the object to add to Oracle Cloud Infrastructure (for this example, a jpg file), then click Run.


    The Configure and run page shows the POST URL and the Request section, which includes tabs for URI parameters, Headers, Body, cURL, and Integration properties.

  9. Go to the Oracle Cloud Infrastructure Console.
  10. In the navigation pane, select Storage, then Buckets.
  11. Click the bucket in which you uploaded the object (for this example, l2_demo_bucket).

    The object is displayed in the Objects section. Note that the object is renamed from what you uploaded on the Configure and run page.


    The details page for the bucket is shown. Tabs are shown for Edit Visibility, Move Resource, Re-encrypt, Add tags, and Delete. The Bucket Information subtag is selected. The General section includes the Namespace, Compartment, Created, ETag, and OCID fields. The Usage section shows fields for Approximate Object Count, Approximate Size, Uncommitted Multipart Uploads Approximate Count, and Uncommitted Multipart Uploads Approximate Size. The Features section shows fields for Default Storage Tier, Visibility, Encryption Key, Auto Tiering, Emit Object Events, and Object Versioning. At the bottom is the Objects section. The Upload tab is selected. A table with columns for Name, Last Modified, Size, and Storage Tier is shown.