Membuat log aliran.
Deskripsi operasi
CreateFlowLog adalah operasi asinkron. Setelah Anda memanggil operasi ini, sistem akan mengembalikan ID Instans, tetapi log aliran belum dibuat. node pembuatan masih Berjalan di latar belakang. Anda dapat memanggil DescribeFlowLogs untuk mengkueri status pembuatan log aliran:
Jika log aliran berada dalam status Activating, log aliran sedang dibuat.
Jika log aliran berada dalam status Active, log aliran telah dibuat dan diaktifkan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateFlowLog |
create |
VSwitch
*FlowLog
VPC
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID Wilayah log aliran. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-qingdao |
| FlowLogName |
string |
No |
Nama log aliran. Panjang nama harus 1 hingga 128 karakter dan tidak boleh diawali dengan |
myFlowlog |
| Description |
string |
No |
Deskripsi log aliran. Panjang deskripsi harus 1 hingga 256 karakter dan tidak boleh diawali dengan |
This is my Flowlog. |
| ResourceType |
string |
Yes |
Tipe Sumber daya tempat menangkap Trafik. Nilai valid:
|
NetworkInterface |
| ResourceId |
string |
Yes |
ID Sumber daya tempat menangkap Trafik. |
eni-askldfas**** |
| TrafficType |
string |
Yes |
Tipe trafik yang akan dikumpulkan. Nilai valid:
|
All |
| ProjectName |
string |
No |
Nama proyek yang mengelola trafik yang ditangkap.
|
FlowLogProject |
| LogStoreName |
string |
No |
Nama penyimpanan log yang menyimpan Trafik yang ditangkap.
|
FlowLogStore |
| AggregationInterval |
integer |
No |
Interval Pengambilan sampel log aliran. Unit: menit. Nilai valid: 1, 5, dan 10 (default). |
10 |
| TrafficPath |
array |
No |
Jalur trafik yang akan ditangkap. Nilai valid:
|
|
|
string |
No |
Jalur Trafik yang akan ditangkap. Nilai valid:
Catatan
Fitur jalur trafik tidak diaktifkan secara default. Untuk menggunakan fitur ini, ajukan Tiket. . |
all |
|
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. |
rg-acfmxazdjdhd**** |
| Tag |
array<object> |
No |
Tag Sumber daya. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag Sumber daya. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter dan tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag Sumber daya. Anda dapat menentukan hingga 20 nilai tag. Nilai tag dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter dan tidak boleh diawali dengan |
FinanceJoshua |
| IpVersion |
string |
No |
Versi IP Trafik yang ditangkap oleh log aliran. |
IPv4 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
ID permintaan. |
||
| RequestId |
string |
ID permintaan. |
54B48E3D-DF70-471B-AA93-08E683A1B457 |
| Success |
string |
Apakah panggilan berhasil. Nilai valid:
|
true |
| FlowLogId |
string |
ID log aliran. |
fl-m5e8vhz2t21sel1nq**** |
| ResourceGroupId |
string |
ID kelompok sumber daya. |
rg-acfmxazdjdhd**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B457",
"Success": "true",
"FlowLogId": "fl-m5e8vhz2t21sel1nq****",
"ResourceGroupId": "rg-acfmxazdjdhd****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectBusinessStatus.FlowLog | The business status of flowLog is incorrect. | The current business status does not support creating a flow log instance. |
| 400 | OptInRequired.FlowLog | You are not authorized to use the requested service of flowLog. Ensure that you have subscribed to the service you are trying to use. | You are not authorized to use the requested flowLog service. Ensure that you have subscribed to the service you are trying to use. |
| 400 | OperationUnsupported.AdvancedFeature | Advanced features of the vpc is unsupported. | The advanced feature is not supported. |
| 400 | InvalidInstanceId | vswitch does not exist. | The vSwitch instance does not exist. |
| 400 | ProjectOrLogstoreNotExist | The specified project or logstore does not exist. | The specified project or Logstore does not exist. |
| 400 | SourceProjectNotExist | The Source Project or logstore does not exist. | The source SLS project or Logstore does not exist. |
| 400 | Unauthorized | This api does not support sub user or role. | This API does not support RAM users or RAM roles. |
| 400 | OperationUnsupported.action | This action is not support. | This action is not supported. |
| 400 | ParameterInvalid | Invalid parameter. | Invalid input parameter. |
| 400 | RuleExist | The rule has already existed. | |
| 400 | InvalidHdMonitorStatus | Current instance status is not valid for this action. | |
| 400 | QuotaExceeded.FlowlogCount | This user has reached the maximum instance number of flowlog. | The maximum number of flow log instances for this user has been reached. |
| 400 | InvalidResourceId.NotFound | This resourceId already has flowlog instance existed. | A flow log instance already exists for the specified resource. |
| 400 | INVALID_PARAMETER | The parameter invalid. | |
| 400 | MissingParameter | Missing mandatory parameter | |
| 400 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | |
| 400 | InvalidResourceType.NotFound | Resource type no the same. | |
| 400 | OperationUnsupported.ResourceType | This resource type is not supported. | |
| 400 | IllegalParam.AggregationInterval | The param of aggregationInterval is illegal. | The sampling interval parameter is invalid. |
| 400 | UnsupportedFeature.UserDefinedTrafficPath | The feature of UserDefinedTrafficPath is not supported. | The user does not support the custom flow log trafficPath feature. |
| 400 | IllegalParam.TrafficPath | The param of trafficPath is illegal. | The specified trafficPath parameter is invalid. |
| 400 | DuplicatedParam.TrafficPath | The param of trafficPath is duplicated. | The specified trafficPath parameter contains duplicate values. |
| 400 | IllegalParam.ResourceGroupId | Invalid ResourceGroupld value. | The specified resource group is invalid or does not exist. |
| 400 | OperationDenied.OperateShareResource | The operation is not allowed because of OperateShareResource. | The operation failed because a shared resource was operated. |
| 400 | UnsupportedFeature.IpVersion | The ipversion type is not supported. | The specified ipVersion is not supported. |
| 400 | UnsupportedFeature.VpcAdvancedFeature | The VPC does not support some advanced features. | The VPC does not support some advanced features. Submit a ticket to handle this issue. |
| 400 | OperationFailed.EniTypeNotSupport | Operation failed because the ENI type is not supported. | The current operation is not supported by the type of secondary ENI. |
| 400 | IllegalParam.IpVersion | The parameter of IpVersion is illegal. | The IpVersion parameter is invalid. |
| 400 | OperationDenied.NisTrafficAnalyzerAggregationIntervalMismatch | The sampling interval of the FlowLog is greater than the sampling interval of the NIS Traffic Analyzer. | The sampling interval of the FlowLog is greater than the sampling interval of the NIS Traffic Analyzer. |
| 400 | OperationDenied.NisTrafficAnalyzerNotFound | The specified NIS Traffic Analyzer does not exist. | The specified NIS Traffic Analyzer does not exist. |
| 400 | OperationDenied.NisTrafficAnalyzerNotActive | The specified NIS Traffic Analyzer is not enabled. | The specified NIS Traffic Analyzer is not enabled. |
| 400 | OperationFailed.InternalError | The request processing has failed due to some unknown error. | An unknown error occurred. Try the operation again. If the error persists, submit a ticket. |
| 400 | MissingParam.TrafficAnalyzerIdOrLogProjectOrLogStore | TrafficAnalyzerId and ProjectName and LogStoreName parameters are not passed in. | The TrafficAnalyzerId, ProjectName, and LogStoreName parameters are not specified. |
| 400 | OperationDenied.AllTrafficPathOfManagedExist | The resource you specified has created a flow log instance that collects the traffic of all scenarios. You cannot create a flow log instance that collects only some scenarios. | The specified resource already has a flow log instance that collects the traffic of all scenarios. You cannot create a flow log instance that collects only some scenarios. |
| 400 | UnsupportedFeature.UserDefinedTrafficPathIpv6 | Dual-stack flow log instances do not support custom trafficPath. | Dual-stack flow log instances do not support the custom trafficPath feature. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.