O tipo ALIYUN::CEN::Flowlog cria um flow log.
Sintaxe
{
"Type": "ALIYUN::CEN::Flowlog",
"Properties": {
"CenId": String,
"Description": String,
"FlowLogName": String,
"Interval": Integer,
"LogStoreName": String,
"LogFormatString": String,
"ProjectName": String,
"TransitRouterAttachmentId": String,
"Tags": List,
"TransitRouterId": String
}
}
Propriedades
Propriedade | Tipo | Obrigatório | Atualização permitida | Descrição | Restrições |
CenId | String | Sim | Não | ID da instância CEN. | Nenhuma |
Description | String | Não | Sim | Descrição do flow log. | A descrição pode estar vazia ou ter de 1 a 256 caracteres. Não pode começar com http:// ou https://. |
FlowLogName | String | Não | Sim | Nome do flow log. | O nome pode estar vazio ou ter de 1 a 128 caracteres. Não pode começar com http:// ou https://. |
Interval | Integer | Não | Sim | Intervalo de agregação para captura de tráfego pelo flow log. | Unidade: segundos. Valores válidos: 60 e 600. Valor padrão: 600. |
LogStoreName | String | Não | Não | Logstore que armazena o tráfego capturado. |
|
LogFormatString | String | Não | Não | String que define os campos de log personalizados para o registro do flow log. | O formato é definido como:
|
ProjectName | String | Não | Não | Projeto que armazena o tráfego capturado. |
|
TransitRouterAttachmentId | String | Não | Não | ID da conexão VPC, conexão VPN, conexão VBR, conexão ECR ou conexão inter-região. | Não especifique este parâmetro ao configurar um flow log para uma instância Transit Router. |
Tags | List | Não | Sim | As tags. | Para mais informações, consulte Propriedades de Tags. |
TransitRouterId | String | Não | Não | ID da instância Transit Router. | Nenhuma |
Sintaxe de Tags
"Tags": [
{
"Value": String,
"Key": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatório |
Atualização permitida |
Descrição |
Restrições |
|
Key |
String |
Sim |
Não |
Chave da tag. |
Nenhuma |
|
Value |
String |
Não |
Não |
Valor da tag. |
Nenhuma |
Valores de retorno
Fn::GetAtt
FlowLogVersion: Versão do flow log.
TransitRouterAttachmentId: ID da conexão da instância de rede.
Description: Descrição do flow log.
ProjectName: Nome do projeto onde o tráfego capturado é armazenado.
CreateTime: Horário de criação do flow log.
FlowLogId: ID do flow log.
FlowLogName: Nome do flow log.
LogStoreName: Nome do Logstore onde o tráfego capturado é armazenado.
LogFormatString: String que especifica o formato personalizado do registro do flow log.
CenId: ID da instância CEN.
Tags: tag
TransitRouterId: ID da instância Transit Router.
Interval: Intervalo de agregação para captura de tráfego.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TransitRouterAttachmentId:
Type: String
Description:
en: |-
The ID of the VPC connection, VPN connection, VBR connection, ECR connection, or inter-region connection.
If you configure a flow log for a Transit Router instance, do not specify this parameter.
Required: false
FlowLogName:
Type: String
Description:
en: |-
The name of the flow log.
The name can be empty or 1 to 128 characters in length. It cannot start with http:// or https://.
Required: false
MinLength: 1
MaxLength: 128
Description:
AssociationProperty: TextArea
Type: String
Description:
en: |-
The description of the flow log.
The description can be empty or 1 to 256 characters in length. It cannot start with http:// or https://.
Required: false
MinLength: 1
MaxLength: 256
LogStoreName:
Type: String
Description:
en: |-
The Logstore that stores the captured traffic.
* If you have created a Logstore in the current region, enter the name of the Logstore.
* If you have not created a Logstore in the current region, specify a custom name. The system automatically creates a Logstore. The naming conventions for the Logstore are as follows:
** The name must be unique within a project.
** The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).
** The name must start and end with a lowercase letter or a digit.
** The name must be 3 to 63 characters in length.
Required: false
MinLength: 3
MaxLength: 63
ProjectName:
Type: String
Description:
en: |-
The project that stores the captured traffic.
* If you have created a project in the current region, enter the name of the project.
* If you have not created a project in the current region, specify a custom name. The system automatically creates a project.
The project name must be globally unique within an Alibaba Cloud region and cannot be modified after creation. The naming conventions are as follows:
** The name must be globally unique.
** The name can contain only lowercase letters, digits, and hyphens (-).
** The name must start and end with a lowercase letter or a digit.
** The name must be 3 to 63 characters in length.
Required: false
MinLength: 3
MaxLength: 63
LogFormatString:
Type: String
Description:
en: |-
A string that defines the custom log fields for the flow log record.
Format: ${Field 1}${Field 2}${Field 3}...${Field n}
* If you do not specify this parameter, all default fields are recorded.
* If you use this parameter, the string must start with ${srcaddr}${dstaddr}${bytes} because these are required parameters.
Required: false
CenId:
Type: String
Description:
en: The ID of the CEN instance.
Required: true
TransitRouterId:
Type: String
Description:
en: The ID of the Transit Router instance.
Required: false
Interval:
Type: Number
Description:
en: 'The aggregation interval for the flow log to capture traffic. Unit: seconds. Valid values: 60 and 600. Default value: 600.'
Required: false
MinValue: 60
MaxValue: 600
Resources:
ExtensionResource:
Type: ALIYUN::CEN::Flowlog
Properties:
TransitRouterAttachmentId:
Ref: TransitRouterAttachmentId
FlowLogName:
Ref: FlowLogName
Description:
Ref: Description
LogStoreName:
Ref: LogStoreName
ProjectName:
Ref: ProjectName
LogFormatString:
Ref: LogFormatString
CenId:
Ref: CenId
TransitRouterId:
Ref: TransitRouterId
Interval:
Ref: Interval
Outputs:
FlowLogVersion:
Description: The version of the flow log.
Value:
Fn::GetAtt:
- ExtensionResource
- FlowLogVersion
TransitRouterAttachmentId:
Description: The ID of the VPC connection, VPN connection, VBR connection, ECR connection, or inter-region connection.
Value:
Fn::GetAtt:
- ExtensionResource
- TransitRouterAttachmentId
Description:
Description: The description of the flow log.
Value:
Fn::GetAtt:
- ExtensionResource
- Description
ProjectName:
Description: The name of the project that stores the captured traffic.
Value:
Fn::GetAtt:
- ExtensionResource
- ProjectName
CreateTime:
Description: The time when the flow log was created.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
FlowLogId:
Description: The ID of the flow log.
Value:
Fn::GetAtt:
- ExtensionResource
- FlowLogId
FlowLogName:
Description: The name of the flow log.
Value:
Fn::GetAtt:
- ExtensionResource
- FlowLogName
LogStoreName:
Description: The name of the Logstore that stores the captured traffic.
Value:
Fn::GetAtt:
- ExtensionResource
- LogStoreName
LogFormatString:
Description: The string that defines the custom log fields for the flow log record.
Value:
Fn::GetAtt:
- ExtensionResource
- LogFormatString
CenId:
Description: The ID of the CEN instance.
Value:
Fn::GetAtt:
- ExtensionResource
- CenId
Tags:
Description: The tags of the flow log.
Value:
Fn::GetAtt:
- ExtensionResource
- Tags
TransitRouterId:
Description: The ID of the Transit Router instance.
Value:
Fn::GetAtt:
- ExtensionResource
- TransitRouterId
Interval:
Description: The aggregation interval for the flow log to capture traffic.
Value:
Fn::GetAtt:
- ExtensionResource
- Interval
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TransitRouterAttachmentId": {
"Type": "String",
"Description": {
"en": "The ID of the VPC connection, VPN connection, VBR connection, ECR connection, or inter-region connection.\nIf you configure a flow log for a Transit Router instance, do not specify this parameter."
},
"Required": false
},
"FlowLogName": {
"Type": "String",
"Description": {
"en": "The name of the flow log.\nThe name can be empty or 1 to 128 characters in length. It cannot start with http:// or https://."
},
"Required": false,
"MinLength": 1,
"MaxLength": 128
},
"Description": {
"AssociationProperty": "TextArea",
"Type": "String",
"Description": {
"en": "The description of the flow log.\nThe description can be empty or 1 to 256 characters in length. It cannot start with http:// or https://."
},
"Required": false,
"MinLength": 1,
"MaxLength": 256
},
"LogStoreName": {
"Type": "String",
"Description": {
"en": "The Logstore that stores the captured traffic.\n* If you have created a Logstore in the current region, enter the name of the Logstore.\n* If you have not created a Logstore in the current region, specify a custom name. The system automatically creates a Logstore. The naming conventions for the Logstore are as follows:\n ** The name must be unique within a project.\n ** The name can contain only lowercase letters, digits, hyphens (-), and underscores (_).\n ** The name must start and end with a lowercase letter or a digit.\n ** The name must be 3 to 63 characters in length."
},
"Required": false,
"MinLength": 3,
"MaxLength": 63
},
"ProjectName": {
"Type": "String",
"Description": {
"en": "The project that stores the captured traffic. \n* If you have created a project in the current region, enter the name of the project.\n* If you have not created a project in the current region, specify a custom name. The system automatically creates a project.\n The project name must be globally unique within an Alibaba Cloud region and cannot be modified after creation. The naming conventions are as follows:\n ** The name must be globally unique.\n ** The name can contain only lowercase letters, digits, and hyphens (-).\n ** The name must start and end with a lowercase letter or a digit.\n ** The name must be 3 to 63 characters in length."
},
"Required": false,
"MinLength": 3,
"MaxLength": 63
},
"LogFormatString": {
"Type": "String",
"Description": {
"en": "A string that defines the custom log fields for the flow log record.\nFormat: ${Field 1}${Field 2}${Field 3}...${Field n}\n * If you do not specify this parameter, all default fields are recorded.\n * If you use this parameter, the string must start with ${srcaddr}${dstaddr}${bytes} because these are required parameters."
},
"Required": false
},
"CenId": {
"Type": "String",
"Description": {
"en": "The ID of the CEN instance."
},
"Required": true
},
"TransitRouterId": {
"Type": "String",
"Description": {
"en": "The ID of the Transit Router instance."
},
"Required": false
},
"Interval": {
"Type": "Number",
"Description": {
"en": "The aggregation interval for the flow log to capture traffic. Unit: seconds. Valid values: 60 and 600. Default value: 600."
},
"Required": false,
"MinValue": 60,
"MaxValue": 600
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::CEN::Flowlog",
"Properties": {
"TransitRouterAttachmentId": {
"Ref": "TransitRouterAttachmentId"
},
"FlowLogName": {
"Ref": "FlowLogName"
},
"Description": {
"Ref": "Description"
},
"LogStoreName": {
"Ref": "LogStoreName"
},
"ProjectName": {
"Ref": "ProjectName"
},
"LogFormatString": {
"Ref": "LogFormatString"
},
"CenId": {
"Ref": "CenId"
},
"TransitRouterId": {
"Ref": "TransitRouterId"
},
"Interval": {
"Ref": "Interval"
}
}
}
},
"Outputs": {
"FlowLogVersion": {
"Description": "The version of the flow log.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FlowLogVersion"
]
}
},
"TransitRouterAttachmentId": {
"Description": "The ID of the VPC connection, VPN connection, VBR connection, ECR connection, or inter-region connection.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TransitRouterAttachmentId"
]
}
},
"Description": {
"Description": "The description of the flow log.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Description"
]
}
},
"ProjectName": {
"Description": "The name of the project that stores the captured traffic.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ProjectName"
]
}
},
"CreateTime": {
"Description": "The time when the flow log was created.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"FlowLogId": {
"Description": "The ID of the flow log.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FlowLogId"
]
}
},
"FlowLogName": {
"Description": "The name of the flow log.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FlowLogName"
]
}
},
"LogStoreName": {
"Description": "The name of the Logstore that stores the captured traffic.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"LogStoreName"
]
}
},
"LogFormatString": {
"Description": "The string that defines the custom log fields for the flow log record.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"LogFormatString"
]
}
},
"CenId": {
"Description": "The ID of the CEN instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CenId"
]
}
},
"Tags": {
"Description": "The tags of the flow log.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Tags"
]
}
},
"TransitRouterId": {
"Description": "The ID of the Transit Router instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TransitRouterId"
]
}
},
"Interval": {
"Description": "The aggregation interval for the flow log to capture traffic.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Interval"
]
}
}
}
}