When using Object Storage Service (OSS), features such as creating and setting bucket properties are commonly needed. Additionally, configuring the bucket transfer acceleration is necessary for long-distance data transfers. This topic describes how to quickly and easily use CloudOps Orchestration Service (OOS) custom templates to call ROA-style API for configuring OSS bucket and its transfer acceleration feature.
Background information
Calling ROA-style API for certain Alibaba Cloud services often requires configuring complex parameters like Body, Headers, Method, and URI. OOS simplifies this process through the console, automatically filling in complex parameter values. The console prompts guide you in configuring various invocation parameters for the ROA-style API.
This tutorial focuses on configuring OSS buckets and its transfer acceleration feature by calling ROA-style API with OOS custom templates. For configurations of other cloud services, refer to the procedures in this topic.
The types of cloud services that OOS supports for configuring ROA-style API include the following:
|
|
For details on cloud products that OOS supports for API CALLING, refer to the supported cloud product list. If the cloud product whose API you want to call is not included in the list, join the DingTalk group (group number: 23330931
).
Procedure
If you are using a RAM user, make sure that the Alibaba Cloud account has granted the RAM user the AliyunOOSFullAccess
and AliyunOSSFullAccess
policies.
Navigate to the OOS console > Custom Task Template page, and click Create Template.
Select Create Template Based on Samples, select ACS-OOS-ExampleExecuteECSDescribeRegions for Select Template , and click Next Step.
Configure the OSS bucket and its transfer acceleration feature by invoking ROA-style API through OOS.
This example shows how to use the flow configuration editor to quickly call ROA-style API and configure the OSS bucket and its transfer acceleration feature. If you have a YAML command ready, you can also configure these features directly using the YAML method.
On the Process Configuration tab, click Add Template Parameters on the right.
In the pop-up Parameter panel, you can set the Parameter Name (for example,
Bucket-example
), set Parameter Type to String, and clickto close the panel.
On the Process Configuration tab, in the ExecuteApi section, you can configure task-related parameters.
In the Task Input section, select both the service name and the API name.
Set the corresponding parameters for the ROA-style API.
Required Parameters: For the bucket parameter, select Reference Parameter/Task Output and then choose the pre-configured template parameter (
Bucket-example
).Other Parameters: For Headers or Body parameters, select as needed. If there are no special requirements, no configuration is needed.
NoteTo gain a detailed understanding of specific parameters, you can hover over the
to view the associated prompts.
At the bottom of the page, you can click Add New Task, and on the pop-up Quick Selection page, select ACS::ExecuteApi.
In the ExecuteApi1 section, configure the relevant task parameters.
In the Task Input section, select the service name and API name.
Set the corresponding parameters for the ROA-style API.
Required Parameters: For the bucket parameter, select Reference Parameter/Task Output and then choose the pre-configured template parameter (
Bucket-example
).Body: Selecting
true
indicates that the bucket enables the transfer acceleration feature.NoteTo gain a detailed understanding of the parameters, hover over the adjacent prompts next to the parameter, as shown by
.
Click Create Template, input the template name in the pop-up dialog box, and then click OK.
Locate the custom task template you created, click Create Execution in the corresponding Actions column, and then click Next Step: Parameter Settings .
Enter the custom bucket name, such as
test-by-oos
, for theBucket-example
parameter, click Next Step: Confirm, and then click Create.
Verification results
Visit the OOS console > Buckets page, and click on the newly created bucket name (e.g.,
test-by-oos
).In the left-side navigation pane, select
, and ensure the transfer acceleration feature is enabled by default.This demonstrates that by using the OOS custom template to invoke the ROA-style API, you can efficiently create a bucket and enable the transfer acceleration feature.