All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::MPS::MediaWorkflow

更新時間:Aug 12, 2024

ALIYUN::MPS::MediaWorkflow is used to add a media workflow.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

Name

String

Yes

No

The name of the media workflow.

  • The name cannot be empty.

  • It must be unique within an account.

  • It can be up to 64 characters in length.

  • It must be encoded in UTF-8.

Topology

Map

Yes

Yes

The topology of the media workflow.

The value of this property is a JSON object that contains activities and activity dependencies. Example:

{"Activities": {"mediaworkflow-example": {"Parameters": {"Outputs": "[{\"OutputObject\":\"examplebucket/output/{RunId}/TRANSCODE_165941222****/{FileName}\",\"TemplateId\":\"S00000001-200010\",\"TemplateName\":\"MP4-LD\"}]","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

No

Yes

The triggering mode of the media workflow.

Valid values:

  • OssAutoTrigger: The media workflow is automatically triggered.

  • NotInAuto: The media workflow is not automatically triggered.

Return values

Fn::GetAtt

  • State: the state of the media workflow.

  • MediaWorkflowId: the ID of the media workflow.

  • CreationTime: the time when the media workflow was created.

  • TriggerMode: the triggering mode of the media workflow.

  • Topology: the topology of the media workflow.

  • Name: the name of the media workflow.

Examples

Note

You must change the masked values of properties based on your business requirements.

YAML format

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-LD
              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 format

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