ALIYUN::ESA::ScheduledPreloadJob

ALIYUN::ESA::ScheduledPreloadJob类型用于新增定时预热任务。

语法

{
  "Type": "ALIYUN::ESA::ScheduledPreloadJob",
  "Properties": {
    "InsertWay": String,
    "SiteId": Integer,
    "ScheduledPreloadJobName": String,
    "OssUrl": String,
    "UrlList": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InsertWay

String

预热文件上传方式。

取值:

  • oss:OSS方式上传

  • textBox:文本框方式上传

SiteId

Integer

站点 ID。

ScheduledPreloadJobName

String

定时预热任务名称。

OssUrl

String

定时预热 OSS 文件。

填入 OSS 的文件地址。 注意:OSS 文件中是您需要预热的 URL。

UrlList

List

需要预热的 URL 列表。

文本框方式上传预热文件时使用。

返回值

Fn::GetAtt

  • TaskSubmitted:已提交到系统进行预热任务的 URL 数。

  • SiteId:站点 ID

  • UrlSubmitted:已提交的 URL 数。

  • ErrorInfo:错误信息

  • CreateTime:任务创建时间。

  • ScheduledPreloadJobName:定时预热任务名称。

  • ScheduledPreloadJobId:任务 ID。

  • Domains:预热域名列表。

  • InsertWay:预热文件上传方式

  • FailedFileOss:失败文件 OSS 地址。

  • TaskType:任务类型(刷新/预热)。

  • UrlCount:URL 总数。

  • FileId:URL 列表文件 ID(下载时使用)。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InsertWay:
    Type: String
    Description:
      en: The method to submit the URLs to be prefetched.
    AllowedValues:
      - oss
      - textBox
    Required: true
  SiteId:
    Type: Number
    Description:
      en: The site ID.
    Required: true
  OssUrl:
    Type: String
    Description:
      en: 'Preheat OSS files regularly and fill in the OSS file address. Note: The OSS file contains the URL that you need to warm up.'
    Required: false
  ScheduledPreloadJobName:
    Type: String
    Description:
      en: The name of the scheduled prefetch task.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ESA::ScheduledPreloadJob
    Properties:
      InsertWay:
        Ref: InsertWay
      SiteId:
        Ref: SiteId
      OssUrl:
        Ref: OssUrl
      ScheduledPreloadJobName:
        Ref: ScheduledPreloadJobName
Outputs:
  TaskSubmitted:
    Description: The number of submitted prefetch tasks.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TaskSubmitted
  SiteId:
    Description: The site ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SiteId
  UrlSubmitted:
    Description: The number of submitted URLs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UrlSubmitted
  ErrorInfo:
    Description: The error message.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ErrorInfo
  CreateTime:
    Description: The time when the task was created.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  ScheduledPreloadJobName:
    Description: The task name.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ScheduledPreloadJobName
  ScheduledPreloadJobId:
    Description: The ID of the prefetch task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ScheduledPreloadJobId
  Domains:
    Description: The domain names to be prefetched.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Domains
  InsertWay:
    Description: The method to submit the URLs to be prefetched.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InsertWay
  FailedFileOss:
    Description: OSS address of failed file.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - FailedFileOss
  TaskType:
    Description: 'The task type. Valid values: refresh and preload.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TaskType
  UrlCount:
    Description: The total number of URLs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UrlCount
  FileId:
    Description: The ID of the URL list file, which can be used during downloads.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - FileId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InsertWay": {
      "Type": "String",
      "Description": {
        "en": "The method to submit the URLs to be prefetched."
      },
      "AllowedValues": [
        "oss",
        "textBox"
      ],
      "Required": true
    },
    "SiteId": {
      "Type": "Number",
      "Description": {
        "en": "The site ID."
      },
      "Required": true
    },
    "OssUrl": {
      "Type": "String",
      "Description": {
        "en": "Preheat OSS files regularly and fill in the OSS file address. Note: The OSS file contains the URL that you need to warm up."
      },
      "Required": false
    },
    "ScheduledPreloadJobName": {
      "Type": "String",
      "Description": {
        "en": "The name of the scheduled prefetch task."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ESA::ScheduledPreloadJob",
      "Properties": {
        "InsertWay": {
          "Ref": "InsertWay"
        },
        "SiteId": {
          "Ref": "SiteId"
        },
        "OssUrl": {
          "Ref": "OssUrl"
        },
        "ScheduledPreloadJobName": {
          "Ref": "ScheduledPreloadJobName"
        }
      }
    }
  },
  "Outputs": {
    "TaskSubmitted": {
      "Description": "The number of submitted prefetch tasks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TaskSubmitted"
        ]
      }
    },
    "SiteId": {
      "Description": "The site ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SiteId"
        ]
      }
    },
    "UrlSubmitted": {
      "Description": "The number of submitted URLs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UrlSubmitted"
        ]
      }
    },
    "ErrorInfo": {
      "Description": "The error message.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ErrorInfo"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the task was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "ScheduledPreloadJobName": {
      "Description": "The task name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ScheduledPreloadJobName"
        ]
      }
    },
    "ScheduledPreloadJobId": {
      "Description": "The ID of the prefetch task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ScheduledPreloadJobId"
        ]
      }
    },
    "Domains": {
      "Description": "The domain names to be prefetched.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Domains"
        ]
      }
    },
    "InsertWay": {
      "Description": "The method to submit the URLs to be prefetched.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InsertWay"
        ]
      }
    },
    "FailedFileOss": {
      "Description": "OSS address of failed file.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "FailedFileOss"
        ]
      }
    },
    "TaskType": {
      "Description": "The task type. Valid values: refresh and preload.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TaskType"
        ]
      }
    },
    "UrlCount": {
      "Description": "The total number of URLs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UrlCount"
        ]
      }
    },
    "FileId": {
      "Description": "The ID of the URL list file, which can be used during downloads.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "FileId"
        ]
      }
    }
  }
}