All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::Aligreen::AuditCallback

Last Updated:May 08, 2025

ALIYUN::Aligreen::AuditCallback is used to create an audit callback.

Syntax

{
  "Type": "ALIYUN::Aligreen::AuditCallback",
  "Properties": {
    "AuditCallbackName": String,
    "CryptType": String,
    "CallbackTypes": List,
    "CallbackSuggestions": List,
    "Url": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AuditCallbackName

String

Yes

No

The name of the audit callback.

None.

CryptType

String

Yes

Yes

The algorithm type.

Valid values:

  • SHA256: the Hash-based Message Authentication Code (HMAC) SHA256 encryption algorithm.

  • SM3: the SM3 Chinese cryptographic algorithm.

CallbackTypes

List

Yes

Yes

The callback types.

Valid values:

  • machineScan: machine audit result notification.

  • selfAudit: self-service audit notification.

You can specify up to two types.

CallbackSuggestions

List

Yes

Yes

The types of the Alibaba Cloud manual audit results.

Valid values:

  • block: violation.

  • review: suspected violation.

  • pass: compliance.

You can specify up to three types.

Url

String

Yes

Yes

The callback address of the moderation results.

None.

Return values

Fn::GetAtt

  • CryptType: the algorithm type.

  • CallbackTypes: the callback types.

  • AuditCallbackName: the name of the audit callback.

  • Url: the callback address of the moderation results.

  • CallbackSuggestions: the types of the Alibaba Cloud manual audit results.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CryptType:
    Type: String
    Description:
      en: 'The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.'
    AllowedValues:
      - SHA256
      - SM3
    Required: true
  CallbackTypes:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: 'Represents the resource attribute field for the notification type. Value: self-service audit result (selfAudit) or Alibaba Cloud audit result (aliyunAudit).'
        AllowedValues:
          - machineScan
          - selfAudit
        Required: true
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: 'A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.'
    Required: true
    MinLength: 1
    MaxLength: 2
  AuditCallbackName:
    Type: String
    Description:
      en: The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    Required: true
  Url:
    Type: String
    Description:
      en: The detection result will be called back to the url.
    Required: true
  CallbackSuggestions:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: 'Resource attribute fields that represent the results of the audit. Values: block, review, and pass.'
        AllowedValues:
          - block
          - review
          - pass
        Required: true
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: 'List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, pass: normal.'
    Required: true
    MinLength: 1
    MaxLength: 3
Resources:
  ExtensionResource:
    Type: ALIYUN::Aligreen::AuditCallback
    Properties:
      CryptType:
        Ref: CryptType
      CallbackTypes:
        Ref: CallbackTypes
      AuditCallbackName:
        Ref: AuditCallbackName
      Url:
        Ref: Url
      CallbackSuggestions:
        Ref: CallbackSuggestions
Outputs:
  CryptType:
    Description: The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CryptType
  CallbackTypes:
    Description: A list of Callback types.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackTypes
  AuditCallbackName:
    Description: The AuditCallback name defined by the customer.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AuditCallbackName
  Url:
    Description: The detection result will be called back to the url.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Url
  CallbackSuggestions:
    Description: List of audit results supported by message notification.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackSuggestions
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CryptType": {
      "Type": "String",
      "Description": {
        "en": "The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm."
      },
      "AllowedValues": [
        "SHA256",
        "SM3"
      ],
      "Required": true
    },
    "CallbackTypes": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "Represents the resource attribute field for the notification type. Value: self-service audit result (selfAudit) or Alibaba Cloud audit result (aliyunAudit)."
          },
          "AllowedValues": [
            "machineScan",
            "selfAudit"
          ],
          "Required": true
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 2
    },
    "AuditCallbackName": {
      "Type": "String",
      "Description": {
        "en": "The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits."
      },
      "Required": true
    },
    "Url": {
      "Type": "String",
      "Description": {
        "en": "The detection result will be called back to the url."
      },
      "Required": true
    },
    "CallbackSuggestions": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "Resource attribute fields that represent the results of the audit. Values: block, review, and pass."
          },
          "AllowedValues": [
            "block",
            "review",
            "pass"
          ],
          "Required": true
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, pass: normal."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 3
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::Aligreen::AuditCallback",
      "Properties": {
        "CryptType": {
          "Ref": "CryptType"
        },
        "CallbackTypes": {
          "Ref": "CallbackTypes"
        },
        "AuditCallbackName": {
          "Ref": "AuditCallbackName"
        },
        "Url": {
          "Ref": "Url"
        },
        "CallbackSuggestions": {
          "Ref": "CallbackSuggestions"
        }
      }
    }
  },
  "Outputs": {
    "CryptType": {
      "Description": "The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CryptType"
        ]
      }
    },
    "CallbackTypes": {
      "Description": "A list of Callback types.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackTypes"
        ]
      }
    },
    "AuditCallbackName": {
      "Description": "The AuditCallback name defined by the customer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AuditCallbackName"
        ]
      }
    },
    "Url": {
      "Description": "The detection result will be called back to the url.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Url"
        ]
      }
    },
    "CallbackSuggestions": {
      "Description": "List of audit results supported by message notification.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackSuggestions"
        ]
      }
    }
  }
}