All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VOD::MessageCallback

更新時間:Nov 23, 2023

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

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 Message Service (MNS) queue.

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

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 application ID.

If you leave this property empty, the default application ID 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 set this property to null, all message notifications are disabled. If you set this property to ALL, all message notifications are enabled. You can also specify configurations to enable specific message notifications. Separate multiple event types with commas (,). For more information about the event types that you can specify, see Overview.

Note

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

MnsQueueName

String

No

Yes

The name of the MNS queue.

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

AuthKey

String

No

Yes

The authentication key.

The 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 MNS queue.

  • CallbackUrl: the callback URL.

  • AuthSwitch: the switch of HTTP callback authentication.

  • AppId: the application ID.

  • CallbackType: the callback method.

  • EventTypeList: the types of the callback events.

  • MnsQueueName: the name of the MNS queue.

  • AuthKey: the authentication key.

Examples

  • YAML format

    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
  • JSON format

    {
      "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"
            ]
          }
        }
      }
    }