The ALIYUN::ThreatDetection::ImageEventOperation resource creates a rule for handling image events.
Syntax
{
"Type": "ALIYUN::ThreatDetection::ImageEventOperation",
"Properties": {
"Conditions": Map,
"EventType": String,
"OperationCode": String,
"EventKey": String,
"EventName": String,
"Note": String,
"Scenarios": Map,
"Source": String
}
}Properties
Parameter | Type | Required | Editable | Description | Constraints |
Conditions | Map | Yes | Yes | The rule conditions. | The value is in JSON format. Valid keys are:
|
EventType | String | Yes | No | The image event type. | Valid values:
|
OperationCode | String | Yes | No | The event operation code. | Valid values:
|
EventKey | String | No | No | The image event key. | None |
EventName | String | No | No | The name of the event. | None |
Note | String | No | Yes | A note for the rule. | None |
Scenarios | Map | No | Yes | The application scope of the rule. | The value is in JSON format. Valid keys are:
Example: {"type": "repo", "value": "test-aaa/shenzhen-repo-01"} |
Source | String | No | No | The detection source for the event. | Valid values:
|
Return values
Fn::GetAtt
ImageEventOperationId: The ID of the resource.
EventType: The image event type.
Note: The note.
OperationCode: The event operation code.
EventKey: The image event key.
Scenarios: The application scope of the rule.
EventName: The image event name.
Source: The detection source for the event.
Conditions: The rule conditions.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Note:
Type: String
Description:
en: A note for the rule.
Default: Null
Required: false
EventType:
Type: String
Description:
en: The image event type.
AllowedValues:
- sensitiveFile
- maliciousFile
- buildRisk
Required: true
EventName:
Type: String
Description:
en: The name of the event.
Default: Null
Required: false
Source:
Type: String
Description:
en: |-
The detection source for the event. Valid values:
* **default**: image.
* **agentless**: agentless detection.
AllowedValues:
- agentless
- default
Default: Null
Required: false
EventKey:
Type: String
Description:
en: The image event key.
Default: Null
Required: false
Scenarios:
Description:
en: |-
The application scope of the rule. The value is in the JSON format. Valid keys are:
type
value
Example: {"type": "repo", "value": "test-aaa/shenzhen-repo-01"}
Required: false
Default: Null
Type: Json
Conditions:
Description:
en: |-
The rule conditions. Specify a value in the JSON format. You can specify the following keys:
* **condition**: the matching condition.
* **type**: the matching type.
* **value**: the matching value.
Required: true
Type: Json
OperationCode:
Type: String
Description:
en: The event operation code.
AllowedValues:
- whitelist
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ThreatDetection::ImageEventOperation
Properties:
Note:
Ref: Note
EventType:
Ref: EventType
EventName:
Ref: EventName
Source:
Ref: Source
EventKey:
Ref: EventKey
Scenarios:
Ref: Scenarios
Conditions:
Ref: Conditions
OperationCode:
Ref: OperationCode
Outputs:
Note:
Value:
Fn::GetAtt:
- ExtensionResource
- Note
Description: The note.
ImageEventOperationId:
Value:
Fn::GetAtt:
- ExtensionResource
- ImageEventOperationId
Description: The ID of the resource.
EventType:
Value:
Fn::GetAtt:
- ExtensionResource
- EventType
Description: The image event type.
EventName:
Value:
Fn::GetAtt:
- ExtensionResource
- EventName
Description: The image event name.
Source:
Value:
Fn::GetAtt:
- ExtensionResource
- Source
Description: The detection source for the event.
EventKey:
Value:
Fn::GetAtt:
- ExtensionResource
- EventKey
Description: The image event key.
Scenarios:
Value:
Fn::GetAtt:
- ExtensionResource
- Scenarios
Description: The application scope of the rule.
Conditions:
Value:
Fn::GetAtt:
- ExtensionResource
- Conditions
Description: The rule conditions.
OperationCode:
Value:
Fn::GetAtt:
- ExtensionResource
- OperationCode
Description: The event operation code.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Note": {
"Type": "String",
"Description": {
"en": "A note for the rule."
},
"Default": null,
"Required": false
},
"EventType": {
"Type": "String",
"Description": {
"en": "The image event type."
},
"AllowedValues": [
"sensitiveFile",
"maliciousFile",
"buildRisk"
],
"Required": true
},
"EventName": {
"Type": "String",
"Description": {
"en": "The name of the event."
},
"Default": null,
"Required": false
},
"Source": {
"Type": "String",
"Description": {
"en": "The detection source for the event. Valid values:\n* **default**: image.\n* **agentless**: agentless detection."
},
"AllowedValues": [
"agentless",
"default"
],
"Default": null,
"Required": false
},
"EventKey": {
"Type": "String",
"Description": {
"en": "The image event key."
},
"Default": null,
"Required": false
},
"Scenarios": {
"Description": {
"en": "The application scope of the rule. The value is in the JSON format. Valid keys are:\ntype\nvalue\nExample: {\"type\": \"repo\", \"value\": \"test-aaa/shenzhen-repo-01\"}"
},
"Required": false,
"Default": null,
"Type": "Json"
},
"Conditions": {
"Description": {
"en": "The rule conditions. Specify a value in the JSON format. You can specify the following keys:\n* **condition**: the matching condition.\n* **type**: the matching type.\n* **value**: the matching value."
},
"Required": true,
"Type": "Json"
},
"OperationCode": {
"Type": "String",
"Description": {
"en": "The event operation code."
},
"AllowedValues": [
"whitelist"
],
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ThreatDetection::ImageEventOperation",
"Properties": {
"Note": {
"Ref": "Note"
},
"EventType": {
"Ref": "EventType"
},
"EventName": {
"Ref": "EventName"
},
"Source": {
"Ref": "Source"
},
"EventKey": {
"Ref": "EventKey"
},
"Scenarios": {
"Ref": "Scenarios"
},
"Conditions": {
"Ref": "Conditions"
},
"OperationCode": {
"Ref": "OperationCode"
}
}
}
},
"Outputs": {
"Note": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Note"
]
},
"Description": "The note."
},
"ImageEventOperationId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ImageEventOperationId"
]
},
"Description": "The ID of the resource."
},
"EventType": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EventType"
]
},
"Description": "The image event type."
},
"EventName": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EventName"
]
},
"Description": "The image event name."
},
"Source": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Source"
]
},
"Description": "The detection source for the event."
},
"EventKey": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EventKey"
]
},
"Description": "The image event key."
},
"Scenarios": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Scenarios"
]
},
"Description": "The application scope of the rule."
},
"Conditions": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Conditions"
]
},
"Description": "The rule conditions."
},
"OperationCode": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"OperationCode"
]
},
"Description": "The event operation code."
}
}
}