ALIYUN::VPC::FlowLog digunakan untuk membuat log aliran.
Sintaksis
{
"Type": "ALIYUN::VPC::FlowLog",
"Properties": {
"FlowLogName": String,
"Description": String,
"LogStoreName": String,
"ResourceId": String,
"ProjectName": String,
"ResourceType": String,
"TrafficType": String
}
}Properti
| Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Kendala |
| FlowLogName | String | Tidak | Ya | Nama log aliran. | Nama harus memiliki panjang 2 hingga 128 karakter dan dapat berisi huruf, angka, titik (.), garis bawah (_), dan tanda hubung (-). Harus dimulai dengan huruf dan tidak boleh dimulai dengan http:// atau https://. |
| Description | String | Tidak | Ya | Deskripsi log aliran. | Deskripsi harus memiliki panjang 2 hingga 256 karakter. Harus dimulai dengan huruf dan tidak boleh dimulai dengan http:// atau https://. |
| LogStoreName | String | Ya | Tidak | Nama Logstore yang menyimpan data lalu lintas yang ditangkap. | Tidak ada |
| ResourceId | String | Ya | Tidak | ID sumber daya yang lalu lintasnya ingin Anda tangkap. | ID dari virtual private clouds (VPC), vSwitches, dan elastic network interfaces (ENIs) didukung. Anda tidak dapat membuat log aliran untuk VPC yang berisi instance dari keluarga instance berikut: ecs.c1, ecs.c2, ecs.c4, ecs.c5, ecs.ce4, ecs.cm4, ecs.d1, ecs.e3, ecs.e4, ecs.ga1, ecs.gn4, ecs.gn5, ecs.i1, ecs.m1, ecs.m2, ecs.mn4, ecs.n1, ecs.n2, ecs.n4, ecs.s1, ecs.s2, ecs.s3, ecs.se1, ecs.sn1, ecs.sn2, ecs.t1, dan ecs.xn4. Untuk membuat log aliran, Anda harus meningkatkan jenis instance terlebih dahulu. Untuk informasi lebih lanjut, lihat Ubah jenis instance dari instance pay-as-you-go dan Tingkatkan jenis instance dari instance langganan.Catatan Jika VPC Anda berisi instance dari keluarga instance di atas dan Anda telah membuat log aliran, Anda harus meningkatkan jenis instance untuk memastikan bahwa fitur log aliran dapat berlaku. |
| ProjectName | String | Ya | Tidak | Nama proyek Layanan Log yang menyimpan data lalu lintas yang ditangkap. | Tidak ada |
| ResourceType | String | Ya | Tidak | Jenis sumber daya yang lalu lintasnya ingin Anda tangkap. | Nilai valid:
|
| TrafficType | String | Ya | Tidak | Jenis lalu lintas yang ingin Anda tangkap. | Nilai valid:
|
Parameter respons
Fn::GetAtt
- FlowLogName: Nama log aliran.
- Description: Deskripsi log aliran.
- LogStoreName: Nama Logstore.
- ResourceId: ID sumber daya.
- ProjectName: Nama proyek Layanan Log.
- ResourceType: Jenis sumber daya.
- FlowLogId: ID log aliran.
- TrafficType: Jenis lalu lintas.
Contoh
JSON Format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"FlowLogName": {
"Type": "String",
"Description": "Nama log aliran."
},
"Description": {
"Type": "String",
"Description": "Deskripsi log aliran."
},
"LogStoreName": {
"Type": "String",
"Description": "Nama penyimpanan log."
},
"ResourceId": {
"Type": "String",
"Description": "ID sumber daya."
},
"ProjectName": {
"Type": "String",
"Description": "Nama proyek."
},
"ResourceType": {
"Type": "String",
"Description": "Jenis sumber daya."
},
"TrafficType": {
"Type": "String",
"Description": "Jenis lalu lintas."
}
},
"Resources": {
"VPCFlowLog": {
"Type": "ALIYUN::VPC::FlowLog",
"Properties": {
"FlowLogName": {
"Ref": "FlowLogName"
},
"Description": {
"Ref": "Description"
},
"LogStoreName": {
"Ref": "LogStoreName"
},
"ResourceId": {
"Ref": "ResourceId"
},
"ProjectName": {
"Ref": "ProjectName"
},
"ResourceType": {
"Ref": "ResourceType"
},
"TrafficType": {
"Ref": "TrafficType"
}
}
}
},
"Outputs": {
"FlowLogName": {
"Description": "Nama log aliran.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"FlowLogName"
]
}
},
"Description": {
"Description": "Deskripsi log aliran.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"Description"
]
}
},
"LogStoreName": {
"Description": "Nama penyimpanan log.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"LogStoreName"
]
}
},
"ResourceId": {
"Description": "ID sumber daya.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"ResourceId"
]
}
},
"ProjectName": {
"Description": "Nama proyek.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"ProjectName"
]
}
},
"ResourceType": {
"Description": "Jenis sumber daya.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"ResourceType"
]
}
},
"FlowLogId": {
"Description": "ID log aliran.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"FlowLogId"
]
}
},
"TrafficType": {
"Description": "Jenis lalu lintas.",
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"TrafficType"
]
}
}
}
}YAML Format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Description:
Description: Deskripsi log aliran.
Type: String
FlowLogName:
Description: Nama log aliran.
Type: String
LogStoreName:
Description: Nama penyimpanan log.
Type: String
ProjectName:
Description: Nama proyek.
Type: String
ResourceId:
Description: ID sumber daya.
Type: String
ResourceType:
Description: Jenis sumber daya.
Type: String
TrafficType:
Description: Jenis lalu lintas.
Type: String
Resources:
VPCFlowLog:
Properties:
Description:
Ref: Description
FlowLogName:
Ref: FlowLogName
LogStoreName:
Ref: LogStoreName
ProjectName:
Ref: ProjectName
ResourceId:
Ref: ResourceId
ResourceType:
Ref: ResourceType
TrafficType:
Ref: TrafficType
Type: ALIYUN::VPC::FlowLog
Outputs:
Description:
Description: Deskripsi log aliran.
Value:
Fn::GetAtt:
- VPCFlowLog
- Description
FlowLogId:
Description: ID log aliran.
Value:
Fn::GetAtt:
- VPCFlowLog
- FlowLogId
FlowLogName:
Description: Nama log aliran.
Value:
Fn::GetAtt:
- VPCFlowLog
- FlowLogName
LogStoreName:
Description: Nama penyimpanan log.
Value:
Fn::GetAtt:
- VPCFlowLog
- LogStoreName
ProjectName:
Description: Nama proyek.
Value:
Fn::GetAtt:
- VPCFlowLog
- ProjectName
ResourceId:
Description: ID sumber daya.
Value:
Fn::GetAtt:
- VPCFlowLog
- ResourceId
ResourceType:
Description: Jenis sumber daya.
Value:
Fn::GetAtt:
- VPCFlowLog
- ResourceType
TrafficType:
Description: Jenis lalu lintas.
Value:
Fn::GetAtt:
- VPCFlowLog
- TrafficType