Consulte les journaux de flux.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
vpc:DescribeFlowLogs |
get |
*FlowLog
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région du journal de flux. |
cn-hangzhou |
| FlowLogName |
string |
Non |
Le nom du journal de flux. |
myFlowlog |
| FlowLogId |
string |
Non |
L'identifiant du journal de flux. |
fl-bp1f6qqhsrc2c12ta**** |
| Description |
string |
Non |
La description du journal de flux. |
Ceci est mon journal de flux |
| ResourceType |
string |
Non |
Le type de ressource du trafic à capturer. Valeurs valides : |
NetworkInterface |
| ResourceId |
string |
Non |
L'identifiant de la ressource dont vous souhaitez capturer le trafic. |
eni-askldfas**** |
| TrafficType |
string |
Non |
Le type de trafic à collecter. Valeurs valides : |
All |
| ProjectName |
string |
Non |
Le nom du projet qui gère le trafic capturé. |
FlowLogProject |
| LogStoreName |
string |
Non |
Le nom du Logstore qui stocke le trafic capturé. |
FlowLogStore |
| Status |
string |
Non |
L'état du journal de flux. Valeurs valides : |
Active |
| PageNumber |
integer |
Non |
Le numéro de page. Valeur par défaut : 1. |
1 |
| PageSize |
integer |
Non |
Le nombre d'entrées par page dans la requête paginée. Valeur maximale : 50. Valeur par défaut : 20. |
20 |
| VpcId |
string |
Non |
L'identifiant du VPC dont vous souhaitez consulter les journaux de flux. |
vpc-bp1nwd16gvo1wgs**** |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources auquel le journal de flux appartient. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
Non |
La liste des balises. |
|
|
object |
Non |
La liste des balises. |
||
| Key |
string |
Non |
La clé de balise de la ressource. Vous pouvez spécifier jusqu'à 20 clés de balise. La clé de balise ne peut pas être une chaîne vide. |
DepartementFinance |
| Value |
string |
Non |
La valeur de balise de la ressource. Vous pouvez spécifier jusqu'à 20 valeurs de balise. La valeur de balise peut être une chaîne vide. |
FinanceJoshua |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les détails des journaux de flux. |
||
| PageSize |
string |
Le nombre d'entrées par page dans la requête paginée. |
20 |
| PageNumber |
string |
Le numéro de page. |
1 |
| RequestId |
string |
L'identifiant de la requête. |
F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 |
| TotalCount |
string |
Le nombre total d'entrées retournées. |
1 |
| Success |
string |
Indique si l'appel a réussi. Valeurs valides : |
true |
| FlowLogs |
object |
||
| FlowLog |
array<object> |
La liste des journaux de flux. |
|
|
array<object> |
La liste des journaux de flux. |
||
| Status |
string |
The status of the flow log. Valid values:
|
Active |
| CreationTime |
string |
The time when the flow log was created. |
2022-01-21T03:08:50Z |
| FlowLogName |
string |
The name of the flow log. |
myFlowlog |
| TrafficType |
string |
The traffic type captured by the flow log. Valid values:
|
All |
| ResourceType |
string |
The resource type of the traffic captured by the flow log. Valid values:
|
NetworkInterface |
| Description |
string |
The description of the flow log. |
Description |
| ProjectName |
string |
The name of the project that manages the captured traffic. |
FlowLogProject |
| LogStoreName |
string |
The name of the Logstore that stores the captured traffic. |
FlowLogStore |
| ResourceId |
string |
The ID of the resource whose traffic is captured by the flow log. |
eni-askldfas**** |
| RegionId |
string |
The region ID of the flow log. |
cn-hangzhou |
| FlowLogId |
string |
The ID of the flow log. |
fl-bp1f6qqhsrc2c12ta**** |
| BusinessStatus |
string |
The business status. Valid values:
|
Normal |
| AggregationInterval |
integer |
The sampling interval of the flow log. Unit: minutes. |
10 |
| TrafficPath |
object |
||
| TrafficPathList |
array |
The traffic path from which traffic is captured. Valid values:
|
|
|
string |
The traffic path from which traffic is captured. Valid values:
Remarque
The traffic path feature is not enabled by default. To use this feature, submit a ticket to apply for access. |
all |
|
| ServiceType |
string |
The managed type of the cloud service.
Remarque
Flow log instances created from the Simple Log Service console are displayed in the VPC list, but you cannot modify, start, stop, or delete them in VPC. To perform related operations, logon to the Simple Log Service console. |
sls |
| ResourceGroupId |
string |
The ID of the resource group to which the flow log belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
object |
||
| Tag |
array<object> |
The list of tags. |
|
|
object |
The list of tags. |
||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
| FlowLogDeliverStatus |
string |
The delivery status of the flow log. Valid values:
|
FAILED |
| FlowLogDeliverErrorMessage |
string |
The error message returned when the flow log delivery fails. You can troubleshoot issues based on the error message. Possible error messages:
|
UnavaliableTarget |
| IpVersion |
string |
The IP address version of the traffic captured by the flow log. |
IPv4 |
| LogFormat |
string |
Exemples
JSON format
{
"PageSize": "20",
"PageNumber": "1",
"RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
"TotalCount": "1",
"Success": "true",
"FlowLogs": {
"FlowLog": [
{
"Status": "Active",
"CreationTime": "2022-01-21T03:08:50Z",
"FlowLogName": "myFlowlog",
"TrafficType": "All",
"ResourceType": "NetworkInterface",
"Description": "Description",
"ProjectName": "FlowLogProject",
"LogStoreName": "FlowLogStore",
"ResourceId": "eni-askldfas****",
"RegionId": "cn-hangzhou",
"FlowLogId": "fl-bp1f6qqhsrc2c12ta****",
"BusinessStatus": "Normal",
"AggregationInterval": 10,
"TrafficPath": {
"TrafficPathList": [
"all"
]
},
"ServiceType": "sls",
"ResourceGroupId": "rg-bp67acfmxazb4ph****",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"FlowLogDeliverStatus": "FAILED",
"FlowLogDeliverErrorMessage": "UnavaliableTarget",
"IpVersion": "IPv4",
"LogFormat": ""
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidInstanceId | Instance does not exist. | |
| 400 | ProjectOrLogstoreNotExist | The specified project or logstore does not exist. | |
| 400 | SourceProjectNotExist | The Source Project or logstore does not exist. | |
| 400 | Unauthorized | This api does not support sub user or role. | |
| 400 | ParameterInvalid | Invalid parameter. | |
| 400 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.