All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VOD::MessageCallback

更新時間:Apr 07, 2025

ALIYUN::VOD::MessageCallback is used to configure the callback method, callback URL, and event types for event notifications.

Syntax

{
  "Type": "ALIYUN::VOD::MessageCallback",
  "Properties": {
    "MnsEndpoint": String,
    "CallbackUrl": String,
    "AuthSwitch": String,
    "AppId": String,
    "CallbackType": String,
    "EventTypeList": String,
    "MnsQueueName": String,
    "AuthKey": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

MnsEndpoint

String

No

Yes

The public endpoint of the Simple Message Queue (formerly MNS) (SMQ) queue.

This property must be specified when CallbackType is set to MNS. For more information, see Regions and endpoints.

CallbackUrl

String

No

Yes

The callback URL.

This property must be specified when CallbackType is set to HTTP. The callback URL can be up to 256 bytes in length. Only one callback URL is supported.

AuthSwitch

String

No

Yes

The switch of HTTP callback authentication.

This property takes effect when CallbackType is set to HTTP. Valid values:

  • on: enables HTTP callback authentication.

  • off: disables HTTP callback authentication.

AppId

String

No

No

The ID of the application.

If you leave this property empty, the default value app-1000000 is used.

CallbackType

String

Yes

Yes

The callback method.

Valid values:

  • HTTP

  • MNS

EventTypeList

String

No

Yes

The types of the callback events.

If you leave this property empty, all message notifications are disabled. If you set this property to ALL, all message notifications are enabled. If you specify specific event types for this property, the corresponding message notifications are enabled. Separate multiple event types with commas (,). For more information about the event types that you can specify, see Event notification.

Note

The value of all AI-related events, such as AIMediaAuditComplete and AIMediaDNAComplete, is AIComplete.

MnsQueueName

String

No

Yes

The name of the SMQ queue.

This property must be specified when CallbackType is set to MNS.

AuthKey

String

No

Yes

The authentication key.

The authentication key can be up to 32 characters in length, and must contain uppercase letters, lowercase letters, and digits. You can specify this property when CallbackType is set to HTTP.

Return values

Fn::GetAtt

  • MnsEndpoint: the public endpoint of the SMQ queue.

  • CallbackUrl: the callback URL.

  • AuthSwitch: the switch of HTTP callback authentication.

  • AppId: the ID of the application.

  • CallbackType: the callback method.

  • EventTypeList: the types of the callback events.

  • MnsQueueName: the name of the SMQ queue.

  • AuthKey: the authentication key.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  ExtensionResource:
    Type: 'ALIYUN::VOD::MessageCallback'
    Properties:
      CallbackType:
        Ref: CallbackType
Parameters:
  CallbackType:
    Type: String
    Description:
      en: Callback method.
Outputs:
  MnsQueueName:
    Description: queue name.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - MnsQueueName
  EventTypeList:
    Description: event type.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - EventTypeList
  AuthKey:
    Description: auth key.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - AuthKey
  MnsEndpoint:
    Description: mns endpoint.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - MnsEndpoint
  AppId:
    Description: appid.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - AppId
  AuthSwitch:
    Description: auth swith.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - AuthSwitch
  CallbackType:
    Description: callback type.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - CallbackType
  CallbackUrl:
    Description: url.
    Value:
      'Fn::GetAtt':
        - ExtensionResource
        - CallbackUrl
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::VOD::MessageCallback",
      "Properties": {
        "CallbackType": {
          "Ref": "CallbackType"
        }
      }
    }
  },
  "Parameters": {
    "CallbackType": {
      "Type": "String",
      "Description": {
        "en": "Callback method."
      }
    }
  },
  "Outputs": {
    "MnsQueueName": {
      "Description": "queue name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MnsQueueName"
        ]
      }
    },
    "EventTypeList": {
      "Description": "event type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EventTypeList"
        ]
      }
    },
    "AuthKey": {
      "Description": "auth key.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AuthKey"
        ]
      }
    },
    "MnsEndpoint": {
      "Description": "mns endpoint.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MnsEndpoint"
        ]
      }
    },
    "AppId": {
      "Description": "appid.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AppId"
        ]
      }
    },
    "AuthSwitch": {
      "Description": "auth swith.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AuthSwitch"
        ]
      }
    },
    "CallbackType": {
      "Description": "callback type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackType"
        ]
      }
    },
    "CallbackUrl": {
      "Description": "url.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackUrl"
        ]
      }
    }
  }
}