全部产品
Search
文档中心

资源编排:ALIYUN::MPS::MediaWorkflow

更新时间:Jun 21, 2024

ALIYUN::MPS::MediaWorkflow类型用于新增媒体工作流。

语法

{
  "Type": "ALIYUN::MPS::MediaWorkflow",
  "Properties": {
    "Name": String,
    "Topology": Map,
    "TriggerMode": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Name

String

媒体工作流名称。

  • 不能为空串。

  • 同一账号下的工作流名称不可重复。

  • 不超过64个字符。

  • UTF-8编码。

Topology

Map

媒体工作流拓扑结构。

格式为JSON对象,包括活动列表及活动依赖。示例:

{"Activities": {"mediaworkflow-example": {"Parameters": {"Outputs": "[{\"OutputObject\":\"examplebucket/output/{RunId}/TRANSCODE_165941222****/{FileName}\",\"TemplateId\":\"S00000001-200010\",\"TemplateName\":\"MP4-流畅\"}]","OutputBucket": "examplebucket","OutputLocation": "oss-cn-shanghai"},"Type": "Transcode"},"Act-Start": {"Parameters": {"PipelineId": "a7d481f07d8c45da88c71853ce7d****","InputFile": "{\"Bucket\":\"example-input\",\"Location\":\"oss-cn-shanghai\",\"ObjectPrefix\":\"mps-test/input/\"}"},"Type": "Start"},"Act-Report": {"Parameters": {"PublishType": "Manual"},"Type": "Report"}},"Dependencies": {"mediaworkflow-example": ["Act-Report"],"Act-Start": ["mediaworkflow-example"],"Act-Report": []}}

TriggerMode

String

触发模式。

取值:

  • OssAutoTrigger:自动触发。

  • NotInAuto:不自动触发。

返回值

Fn::GetAtt

  • State:媒体工作流状态。

  • MediaWorkflowId:媒体工作流ID。

  • CreationTime:创建时间。

  • TriggerMode:触发模式。

  • Topology:媒体工作流拓扑结构。

  • Name:媒体工作流名称。

示例

说明

请您根据实际情况更改脱敏参数取值。

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionResource:
    Type: ALIYUN::MPS::MediaWorkflow
    Properties:
      Topology:
        Activities:
          mediaworkflow-example:
            Parameters:
              Outputs:
                - OutputObject: examplebucket/output/{RunId}/TRANSCODE_165941222****/{FileName}
                  TemplateId: S00000001-200010
                  TemplateName: MP4-流畅
              OutputBucket: examplebucket
              OutputLocation: oss-cn-shanghai
            Type: Transcode
          Act-Start:
            Parameters:
              PipelineId: a7d481f07d8c45da88c71853ce7d****
              InputFile:
                Bucket: example-input
                Location: oss-cn-shanghai
                ObjectPrefix: mps-test/input/
            Type: Start
          Act-Report:
            Parameters:
              PublishType: Manual
            Type: Report
        Dependencies:
          mediaworkflow-example:
            - Act-Report
          Act-Start:
            - mediaworkflow-example
          Act-Report: []
      Name: mediaworkflow-example
Outputs:
  State:
    Description: The state of the media workflow.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - State
  MediaWorkflowId:
    Description: The ID of the media workflow.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MediaWorkflowId
  CreationTime:
    Description: The time when the media workflow was created.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreationTime
  TriggerMode:
    Description: The trigger mode of the media workflow.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TriggerMode
  Topology:
    Description: The topology of the media workflow.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Topology
  Name:
    Description: The name of the media workflow.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Name

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::MPS::MediaWorkflow",
      "Properties": {
        "Topology": {
          "Activities": {
            "mediaworkflow-example": {
              "Parameters": {
                "Outputs": [
                  {
                    "OutputObject": "examplebucket/output/{RunId}/TRANSCODE_165941222****/{FileName}",
                    "TemplateId": "S00000001-200010",
                    "TemplateName": "MP4-流畅"
                  }
                ],
                "OutputBucket": "examplebucket",
                "OutputLocation": "oss-cn-shanghai"
              },
              "Type": "Transcode"
            },
            "Act-Start": {
              "Parameters": {
                "PipelineId": "a7d481f07d8c45da88c71853ce7d****",
                "InputFile": {
                  "Bucket": "example-input",
                  "Location": "oss-cn-shanghai",
                  "ObjectPrefix": "mps-test/input/"
                }
              },
              "Type": "Start"
            },
            "Act-Report": {
              "Parameters": {
                "PublishType": "Manual"
              },
              "Type": "Report"
            }
          },
          "Dependencies": {
            "mediaworkflow-example": [
              "Act-Report"
            ],
            "Act-Start": [
              "mediaworkflow-example"
            ],
            "Act-Report": []
          }
        },
        "Name": "mediaworkflow-example"
      }
    }
  },
  "Outputs": {
    "State": {
      "Description": "The state of the media workflow.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "State"
        ]
      }
    },
    "MediaWorkflowId": {
      "Description": "The ID of the media workflow.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MediaWorkflowId"
        ]
      }
    },
    "CreationTime": {
      "Description": "The time when the media workflow was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreationTime"
        ]
      }
    },
    "TriggerMode": {
      "Description": "The trigger mode of the media workflow.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TriggerMode"
        ]
      }
    },
    "Topology": {
      "Description": "The topology of the media workflow.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Topology"
        ]
      }
    },
    "Name": {
      "Description": "The name of the media workflow.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Name"
        ]
      }
    }
  }
}