ALIYUN::VPC::FlowLog は、フローログを作成するために使用されます。
構文
{
"Type": "ALIYUN::VPC::FlowLog",
"Properties": {
"FlowLogName": String,
"Description": String,
"LogStoreName": String,
"ResourceId": String,
"ProjectName": String,
"ResourceType": String,
"TrafficType": String
}
}プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| FlowLogName | String | いいえ | はい | フローログの名前。 | 名前は 2 ~ 128 文字で、文字、数字、ピリオド(.)、アンダースコア(_)、ハイフン(-)を含めることができます。http:// または https:// で始まることはできません。 |
| Description | String | いいえ | はい | フローログの説明。 | 説明は 2 ~ 256 文字である必要があります。文字で始まり、http:// または https:// で始めることはできません。 |
| LogStoreName | String | はい | いいえ | キャプチャされたトラフィックデータを保存する Logstore の名前。 | なし |
| ResourceId | String | はい | いいえ | トラフィックをキャプチャするリソースの ID。 | 仮想プライベートクラウド(VPC)、vSwitch、および弾性ネットワークインターフェース(ENI)の ID がサポートされています。 次のインスタンスファミリのインスタンスを含む VPC のフローログは作成できません: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、および ecs.xn4。 フローログを作成するには、まずインスタンスタイプをアップグレードする必要があります。詳細については、「従量課金インスタンスのインスタンスタイプの変更」および「サブスクリプションインスタンスのインスタンスタイプのアップグレード」をご参照ください。説明 VPC に上記のインスタンスファミリのインスタンスが含まれていて、フローログを作成している場合は、フローログ機能が有効になるようにインスタンスタイプをアップグレードする必要があります。 |
| ProjectName | String | はい | いいえ | キャプチャされたトラフィックデータを保存するログサービスプロジェクトの名前。 | なし |
| ResourceType | String | はい | いいえ | トラフィックをキャプチャするリソースのタイプ。 | 有効な値:
|
| TrafficType | String | はい | いいえ | キャプチャするトラフィックのタイプ。 | 有効な値:
|
レスポンスパラメータ
Fn::GetAtt
- FlowLogName:フローログの名前。
- Description:フローログの説明。
- LogStoreName:Logstore の名前。
- ResourceId:リソース ID。
- ProjectName:ログサービスプロジェクトの名前。
- ResourceType:リソースタイプ。
- FlowLogId:フローログの ID。
- TrafficType:トラフィックのタイプ。
例
JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"FlowLogName": {
"Type": "String",
"Description": "フローログ名" // The flow log name.
},
"Description": {
"Type": "String",
"Description": "フローログの説明" // The Description of flow log.
},
"LogStoreName": {
"Type": "String",
"Description": "ログストア名" // The log store name.
},
"ResourceId": {
"Type": "String",
"Description": "リソースID" // The resource id.
},
"ProjectName": {
"Type": "String",
"Description": "プロジェクト名" // The project name.
},
"ResourceType": {
"Type": "String",
"Description": "リソースタイプ" // The resource type.
},
"TrafficType": {
"Type": "String",
"Description": "トラフィックタイプ" // The traffic type.
}
},
"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": "フローログ名", // The flow log name.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"FlowLogName"
]
}
},
"Description": {
"Description": "フローログの説明", // The Description of flow log.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"Description"
]
}
},
"LogStoreName": {
"Description": "ログストア名", // The log store name.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"LogStoreName"
]
}
},
"ResourceId": {
"Description": "リソースID", // The resource id.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"ResourceId"
]
}
},
"ProjectName": {
"Description": "プロジェクト名", // The project name.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"ProjectName"
]
}
},
"ResourceType": {
"Description": "リソースタイプ", // The resource type.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"ResourceType"
]
}
},
"FlowLogId": {
"Description": "フローログID", // The flow log ID.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"FlowLogId"
]
}
},
"TrafficType": {
"Description": "トラフィックタイプ", // The traffic type.
"Value": {
"Fn::GetAtt": [
"VPCFlowLog",
"TrafficType"
]
}
}
}
}YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Description:
Description: フローログの説明 # The Description of flow log.
Type: String
FlowLogName:
Description: フローログ名 # The flow log name.
Type: String
LogStoreName:
Description: ログストア名 # The log store name.
Type: String
ProjectName:
Description: プロジェクト名 # The project name.
Type: String
ResourceId:
Description: リソース ID # The resource id.
Type: String
ResourceType:
Description: リソースタイプ # The resource type.
Type: String
TrafficType:
Description: トラフィックタイプ # The traffic type.
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: フローログの説明 # The Description of flow log.
Value:
Fn::GetAtt:
- VPCFlowLog
- Description
FlowLogId:
Description: フローログ ID # The flow log ID.
Value:
Fn::GetAtt:
- VPCFlowLog
- FlowLogId
FlowLogName:
Description: フローログ名 # The flow log name.
Value:
Fn::GetAtt:
- VPCFlowLog
- FlowLogName
LogStoreName:
Description: ログストア名 # The log store name.
Value:
Fn::GetAtt:
- VPCFlowLog
- LogStoreName
ProjectName:
Description: プロジェクト名 # The project name.
Value:
Fn::GetAtt:
- VPCFlowLog
- ProjectName
ResourceId:
Description: リソース ID # The resource id.
Value:
Fn::GetAtt:
- VPCFlowLog
- ResourceId
ResourceType:
Description: リソースタイプ # The resource type.
Value:
Fn::GetAtt:
- VPCFlowLog
- ResourceType
TrafficType:
Description: トラフィックタイプ # The traffic type.
Value:
Fn::GetAtt:
- VPCFlowLog
- TrafficType