Secara default, ActionTrail mencatat event untuk setiap Akun Alibaba Cloud selama 90 hari terakhir. Untuk melacak event yang terjadi lebih dari 90 hari lalu, Anda dapat membuat jejak (trail) guna mengirimkan event operasi ke Object Storage Service (OSS), Simple Log Service, atau MaxCompute untuk analisis lebih lanjut.
Deskripsi operasi
Jejak yang dibuat melalui API berada dalam status shutdown secara default. Anda perlu memanggil operasi StartLogging untuk mengaktifkan jejak sebelum ActionTrail dapat mengirimkan event operasi ke produk cloud target.
Prasyarat
Sebelum membuat jejak, pastikan Anda telah menyelesaikan setidaknya salah satu konfigurasi penyimpanan berikut:
-
Kirim ke Object Storage Service (OSS)
Pastikan Anda telah mengaktifkan Object Storage Service dan membuat bucket.
-
Kirim ke Simple Log Service
Pastikan Anda telah mengaktifkan Simple Log Service dan membuat proyek log.
CatatanSaat Anda membuat jejak, ActionTrail secara otomatis membuat Logstore bernama
actiontrail_<nama jejak>di proyek log target. Logstore ini melarang penulisan data lain untuk memastikan akurasi data audit. -
Kirim ke MaxCompute
Pastikan Anda telah mengaktifkan MaxCompute.
CatatanSaat Anda membuat jejak, ActionTrail secara otomatis membuat proyek bernama
actiontrail_<ID akun>di manajemen proyek. Proyek ini melarang penulisan data lain untuk memastikan akurasi data audit.
Catatan Penggunaan
Topik ini memberikan contoh pembuatan jejak akun tunggal bernama trail-test yang mengirimkan event operasi ke bucket OSS bernama audit-log.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
actiontrail:CreateTrail |
create |
*Trail
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
Nama jejak yang akan dibuat. Catatan
Nama jejak harus unik dalam akun yang sama. |
trail-test |
| OssBucketName |
string |
No |
Bucket OSS tempat jejak mengirimkan log. Catatan
Anda harus menentukan setidaknya salah satu parameter berikut: OssBucketName, SlsProjectArn, atau MaxComputeProjectArn. |
audit-log |
| OssKeyPrefix |
string |
No |
Awalan nama file di bucket OSS tempat jejak mengirimkan log. Parameter ini boleh dikosongkan. |
at-product-account-audit-B |
| OssWriteRoleArn |
string |
No |
Nama Sumber Daya Alibaba Cloud (ARN) dari role yang diasumsikan ActionTrail untuk mengirimkan event operasi ke bucket OSS.
|
acs:ram::15127787691****:role/aliyunserviceroleforactiontrail |
| SlsProjectArn |
string |
No |
ARN proyek Simple Log Service tempat jejak mengirimkan log. Catatan
Anda harus menentukan setidaknya salah satu parameter berikut: OssBucketName, SlsProjectArn, atau MaxComputeProjectArn. |
acs:log:cn-shanghai:151266687691****:project/test-project |
| SlsWriteRoleArn |
string |
No |
ARN role yang diasumsikan ActionTrail untuk mengirimkan event operasi ke proyek Simple Log Service.
|
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| EventRW |
string |
No |
Jenis read/write dari event yang akan dikirimkan. Nilai yang valid:
|
Write |
| TrailRegion |
string |
No |
Wilayah jejak. |
All |
| IsOrganizationTrail |
boolean |
No |
Menentukan apakah akan membuat jejak multi-akun. Nilai yang valid:
|
false |
| MaxComputeProjectArn |
string |
No |
ARN proyek MaxCompute tempat jejak mengirimkan log. Catatan
Anda harus menentukan setidaknya salah satu parameter berikut: OssBucketName, SlsProjectArn, atau MaxComputeProjectArn. Catatan
Nama proyek MaxCompute yang ditentukan dalam MaxComputeProjectArn harus diawali dengan awalan actiontrail_. |
acs:odps:cn-hangzhou:15127787691****:project/actiontrail_**** |
| MaxComputeWriteRoleArn |
string |
No |
ARN role yang diasumsikan ActionTrail untuk mengirimkan event operasi ke proyek MaxCompute.
|
acs:ram::15127787691****:role/aliyunserviceroleforactiontrail |
Untuk informasi selengkapnya, lihat Common parameters.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| EventRW |
string |
Jenis read/write dari event yang akan dikirimkan. |
Write |
| HomeRegion |
string |
Wilayah utama jejak. |
cn-hangzhou |
| MaxComputeProjectArn |
string |
ARN proyek MaxCompute tempat jejak mengirimkan log. |
acs:odps:cn-hangzhou:151266687691****:project/actiontrail_**** |
| MaxComputeWriteRoleArn |
string |
ARN role yang diasumsikan ActionTrail untuk mengirimkan event operasi ke proyek MaxCompute. |
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| Name |
string |
Nama jejak. |
trail-test |
| OssBucketName |
string |
Bucket OSS. |
audit-log |
| OssKeyPrefix |
string |
Awalan nama file di bucket OSS. |
at-product-account-audit-B |
| OssWriteRoleArn |
string |
ARN role yang diasumsikan ActionTrail untuk mengirimkan event operasi ke bucket OSS. |
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| RequestId |
string |
ID permintaan. |
442DDADF-DA58-4029-8E8B-82C73E9A7A70 |
| SlsProjectArn |
string |
ARN proyek Simple Log Service tempat jejak mengirimkan log. |
acs:log:cn-hangzhou:151266687691****:project/test-project |
| SlsWriteRoleArn |
string |
ARN role yang diasumsikan ActionTrail untuk mengirimkan event operasi ke proyek Simple Log Service. |
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| TrailRegion |
string |
Wilayah jejak. |
All |
Contoh
Respons sukses
JSONformat
{
"EventRW": "Write",
"HomeRegion": "cn-hangzhou",
"MaxComputeProjectArn": "acs:odps:cn-hangzhou:151266687691****:project/actiontrail_****",
"MaxComputeWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
"Name": "trail-test",
"OssBucketName": "audit-log",
"OssKeyPrefix": "at-product-account-audit-B",
"OssWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
"RequestId": "442DDADF-DA58-4029-8E8B-82C73E9A7A70",
"SlsProjectArn": "acs:log:cn-hangzhou:151266687691****:project/test-project",
"SlsWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
"TrailRegion": "All"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDeliveryConfigurationException | You must specify at least one Log Service project or OSS bucket for a Trail. | |
| 400 | InvalidPrefixException | The specified OSS bucket prefix is invalid. | The specified OSS bucket prefix is not valid. |
| 400 | InvalidQueryParameter | The specified query parameter is invalid. | The specified query parameter is not valid. |
| 400 | InvalidTrailNameException | The specified Trail name is invalid. | The specified Trail name is not valid. |
| 400 | RepeatOssBucket | The specified OSS bucket is already in use. We recommend that you modify the existing Trail or specify another bucket. | |
| 400 | SlsProjectDoesNotExistException | The specified Log Service project does not exist. | |
| 400 | TrailAlreadyExistsException | The specified Trail name already exists. | The specified Trail name already exists,if you want to create a new Trail,please use another Trail name. |
| 400 | MaximumNumberOfOrganizationTrailExceeded | Your account can create only one organization trail. | |
| 400 | NotAllowCreateOrganizationTrail | Your account does not allow you to create organization trail. Submit a ticket to get customer support. | |
| 403 | InsufficientBucketPolicyException | Access to the specified OSS bucket was denied. | |
| 403 | InsufficientSlsPolicyException | Access to the specified Log Service project was denied. | Access SLS Project denied. |
| 403 | MaximumNumberOfTrailsExceededException | The number of Trails in the same region exceeds the upper limit (5). | The number of Trail in same region has exceeded the limit 5 |
| 404 | BucketDoesNotExistException | The specified OSS bucket does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.