Membuat templat operasi API yang telah ditentukan sebelumnya. Templat ini berisi informasi tentang operasi API, termasuk struktur dasar, metode permintaan, jalur URL, parameter permintaan, dan format respons.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
emr:CreateApiTemplate |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID region. |
cn-hangzhou |
| TemplateName |
string |
Yes |
Nama templat klaster. |
DATALAKE模板 |
| ApiName |
string |
Yes |
Nama operasi API. Anda hanya dapat membuat templat operasi API klaster. Atur nilainya menjadi CreateCluster. |
CreateCluster |
| Content |
string |
Yes |
Konten templat operasi API klaster. Atur nilainya ke string JSON dari parameter permintaan operasi API CreateCluster untuk membuat klaster. |
content |
| ResourceGroupId |
string |
No |
ID grup sumber daya. |
rg-acfmzabjyop**** |
Contoh nilai parameter Content (bahasa Java): `
CreateClusterRequest request = new CreateClusterRequest();
request.setRegionId("cn-beijing");
request.setClusterType("DATALAKE");
// Parameter lain untuk membuat klaster.
String content = new Gson().toJson(request); `
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| TemplateId |
string |
ID templat (disarankan untuk menggunakan parameter TemplateId). |
at-41b4c6a0fc63**** |
| RequestId |
string |
ID permintaan. |
DD6B1B2A-5837-5237-ABE4-FF0C8944**** |
| Success |
string |
ID templat (akan ditinggalkan). |
at-41b4c6a0fc63**** |
Contoh
Respons sukses
JSONformat
{
"TemplateId": "at-41b4c6a0fc63****",
"RequestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****",
"Success": "at-41b4c6a0fc63****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ConflictParameters | Parameters that must not be used together. %s | |
| 400 | IncompleteSignature | The request signature is invalid. | |
| 400 | InvalidAction | The action %s requested is invalid. | |
| 400 | InvalidParameter | The specified parameter %s is not valid. | |
| 400 | InvalidParameterValue | The input parameter %s is invalid or out of range. | |
| 400 | MissingAction | The action %s requested is missing. | |
| 400 | MissingParameter | The input parameter %s that is mandatory for processing this request is not supplied. | |
| 400 | NotAuthorized | You do not have permission to perform this action. %s | |
| 400 | ThrottlingException | The request was denied due to request throttling. %s | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 404 | ResourceNotFound | The resource not found by %s. | |
| 503 | ServiceFailure | The request has failed due to a temporary failure of %s service. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.