Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::Aligreen::Callback

Última atualização: Jun 27, 2026

Cria um callback para o Content Moderation (Aligreen) receber resultados de moderação em uma URL especificada.

Sintaxe

{
  "Type": "ALIYUN::Aligreen::Callback",
  "Properties": {
    "CallbackUrl": String,
    "CallbackName": String,
    "CallbackTypes": List,
    "CallbackSuggestions": List,
    "CryptType": Integer
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

CallbackUrl

String

Sim

Sim

URL de destino dos resultados de moderação.

Nenhuma.

CallbackName

String

Sim

Sim

Nome do callback.

Nenhuma.

CallbackTypes

List

Sim

Sim

Eventos que acionam notificações de callback.

Valores válidos:

  • machineScan: notificação de resultado de auditoria automática.

  • selfAudit: notificação de auditoria de autoatendimento.

Especifique até dois tipos.

CallbackSuggestions

List

Sim

Sim

Tipos de resultado de moderação manual do Alibaba Cloud Content Moderation.

Valores válidos:

  • block: violação.

  • review: suspeita de violação.

  • pass: conformidade.

Especifique até três tipos.

CryptType

Integer

Não

Não

Algoritmo de criptografia.

Valores válidos:

  • 0: algoritmo de criptografia Hash-based Message Authentication Code (HMAC) SHA256.

  • 1: algoritmo criptográfico chinês ShangMi 3 (SM3).

Valores de retorno

Fn::GetAtt

  • CallbackUrl: URL de destino dos resultados de moderação.

  • CryptType: algoritmo de criptografia.

  • CallbackId: ID do callback.

  • CallbackName: nome do callback.

  • CallbackTypes: eventos que acionam notificações de callback.

  • CallbackSuggestions: tipos de resultados de auditoria manual do Alibaba Cloud.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CallbackUrl:
    Type: String
    Description:
      en: The detection result will be called back to the url.
    Required: true
  CallbackName:
    Type: String
    Description:
      en: The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    Required: true
  CallbackTypes:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: 'Represents the resource attribute field for the notification type. Value: self-service audit result (selfAudit) and machine audit result (machineScan).'
        AllowedValues:
          - selfAudit
          - machineScan
        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
  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::Callback
    Properties:
      CallbackUrl:
        Ref: CallbackUrl
      CallbackName:
        Ref: CallbackName
      CallbackTypes:
        Ref: CallbackTypes
      CallbackSuggestions:
        Ref: CallbackSuggestions
Outputs:
  CallbackUrl:
    Description: The detection result will be called back to the url.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackUrl
  CryptType:
    Description: The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CryptType
  CallbackId:
    Description: The ID of the primary key of the Callback.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackId
  CallbackName:
    Description: The Callback name defined by the customer.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackName
  CallbackTypes:
    Description: The list of Callback types.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackTypes
  CallbackSuggestions:
    Description: List of audit results supported by message notification.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackSuggestions
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CallbackUrl": {
      "Type": "String",
      "Description": {
        "en": "The detection result will be called back to the url."
      },
      "Required": true
    },
    "CallbackName": {
      "Type": "String",
      "Description": {
        "en": "The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits."
      },
      "Required": true
    },
    "CallbackTypes": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "Represents the resource attribute field for the notification type. Value: self-service audit result (selfAudit) and machine audit result (machineScan)."
          },
          "AllowedValues": [
            "selfAudit",
            "machineScan"
          ],
          "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
    },
    "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::Callback",
      "Properties": {
        "CallbackUrl": {
          "Ref": "CallbackUrl"
        },
        "CallbackName": {
          "Ref": "CallbackName"
        },
        "CallbackTypes": {
          "Ref": "CallbackTypes"
        },
        "CallbackSuggestions": {
          "Ref": "CallbackSuggestions"
        }
      }
    }
  },
  "Outputs": {
    "CallbackUrl": {
      "Description": "The detection result will be called back to the url.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackUrl"
        ]
      }
    },
    "CryptType": {
      "Description": "The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CryptType"
        ]
      }
    },
    "CallbackId": {
      "Description": "The ID of the primary key of the Callback.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackId"
        ]
      }
    },
    "CallbackName": {
      "Description": "The Callback name defined by the customer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackName"
        ]
      }
    },
    "CallbackTypes": {
      "Description": "The list of Callback types.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackTypes"
        ]
      }
    },
    "CallbackSuggestions": {
      "Description": "List of audit results supported by message notification.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackSuggestions"
        ]
      }
    }
  }
}