InitializeOperationRole
Creates a service-linked role.
Operation description
To collect logs from different data sources by using a collector, or to perform cluster elastic scaling tasks (applicable to the China site), you must first authorize the creation of a service-linked role.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:InitializeOperationRole |
none |
*All Resource
|
None | None |
Request syntax
POST /openapi/user/slr HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. The client generates the value. The value must be unique among different requests and can be up to 64 ASCII characters long. |
5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
| body |
string |
No |
The name of the Elasticsearch service-linked role to be created. |
{"rolename":"AliyunServiceRoleForElasticsearchCollector"} |
RequestBody
You must also include the following parameter in RequestBody to specify the name of the service-linked role to be created.
| Name | Type | Required | Example | Description |
| rolename | String | Yes | AliyunServiceRoleForElasticsearchCollector | The name of the service-linked role. Valid values: AliyunServiceRoleForElasticsearchOps (the role for performing cluster elastic scaling tasks, applicable only to the China site) and AliyunServiceRoleForElasticsearchCollector (the role for creating and managing Beats collectors). |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Result |
boolean |
The result. Valid values:
|
true |
| RequestId |
string |
The request ID. |
29101430-4797-4D1D-96C3-9FCBCCA8F845 |
Examples
Success response
JSON format
{
"Result": true,
"RequestId": "29101430-4797-4D1D-96C3-9FCBCCA8F845"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.