ACS-CDN-SetDomainServerCertificate

更新时间:2024-09-05 08:54:57

模板名称

ACS-CDN-SetDomainServerCertificate 启用指定域名下证书功能

立即执行

模板描述

启用指定域名下证书功能

模板类型

自动化

所有者

Alibaba Cloud

输入参数

参数名称

描述

类型

是否必填

默认值

约束

参数名称

描述

类型

是否必填

默认值

约束

domainName

域名

String

certType

证书类型

String

certName

证书名称

String

regionId

地域ID

String

{{ ACS::RegionId }}

serverCertificateStatus

HTTPS证书是否启用

String

on

serverCertificate

安全证书内容

String

""

privateKey

私钥内容

String

""

forceSet

是否覆盖原有同名证书信息

String

1

OOSAssumeRole

OOS扮演的RAM角色

String

""

输出参数

执行此模板需要的权限策略

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "cdn:DescribeCdnDomainDetail",
                "cdn:SetDomainServerCertificate"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

详情

ACS-CDN-SetDomainServerCertificate详情

模板内容

FormatVersion: OOS-2019-06-01
Description:
  en: Set domain server certificate
  zh-cn: 启用指定域名下证书功能
  name-en: ACS-CDN-SetDomainServerCertificate
  name-zh-cn: 启用指定域名下证书功能
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: RegionId
      zh-cn: 地域ID
    AssociationProperty: RegionId
    Type: String
    Default: '{{ ACS::RegionId }}'
  domainName:
    Label:
      en: DomainName
      zh-cn: 域名
    Type: String
  serverCertificateStatus:
    Label:
      en: ServerCertificateStatus
      zh-cn: HTTPS证书是否启用
    Type: String
    AllowedValues:
      - 'on'
      - 'off'
    Default: 'on'
  certType:
    Description:
      en: When the certificate type is cas, PrivateKey does not need to pass parameters
      zh-cn: 当证书类型为cas时,PrivateKey无需传参
    Label:
      en: CertType
      zh-cn: 证书类型
    Type: String
    AllowedValues:
      - cas
      - free
      - upload
  certName:
    Label:
      en: CertName
      zh-cn: 证书名称
    Type: String
  serverCertificate:
    Description:
      en: Specify the content of the certificate only if you enable the SSL certificate
      zh-cn: 不启用证书则无需输入,配置证书请输入证书内容
    Label:
      en: ServerCertificate
      zh-cn: 安全证书内容
    Type: String
    Default: ''
  privateKey:
    Description:
      en: Specify the private key only if you enable the SSL certificate
      zh-cn: 不启用证书则无需输入,配置证书请输入私钥内容
    Label:
      en: PrivateKey
      zh-cn: 私钥内容
    Type: String
    Default: ''
  forceSet:
    Description:
      en: If you set the value to 1, the system does not check the certificate name for duplicates and overwrites the information of the existing certificate with the same name
      zh-cn: 设置为1时,忽略证书名称重复的校验,覆盖原有同名证书信息
    Label:
      en: ForceSet
      zh-cn: 是否覆盖原有同名证书信息
    Type: String
    Default: 1
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: OOS扮演的RAM角色
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getDomainDetail
  Action: ACS::ExecuteApi
  Description:
    en: get domain detail.
    zh-cn: 获取域名详情。
  Properties:
    Service: CDN
    API: DescribeCdnDomainDetail
    Parameters:
      RegionId: '{{ regionId }}'
      DomainName: '{{ domainName }}'
  Outputs:
    serverCertificateStatus:
      Type: String
      ValueSelector: GetDomainDetailModel.ServerCertificateStatus
- Name: whetherDomainIsReady
  Action: 'ACS::Choice'
  Description:
    en: Choose next task by server eertificate status
    zh-cn: 根据证书的状态选择下一个任务
  Properties:
    DefaultTask: SetDomainServerCertificate
    Choices:
      - When:
          'Fn::Equals':
            - 'on'
            - '{{ getDomainDetail.serverCertificateStatus }}'
        NextTask: ACS::END
- Name: SetDomainServerCertificate
  Action: ACS::ExecuteApi
  Description:
    en: Set domain server certificate
    zh-cn: 设置指定域名下证书功能。
  Properties:
    Service: CDN
    API: SetDomainServerCertificate
    Parameters:
      RegionId: '{{ regionId }}'
      DomainName: '{{ domainName }}'
      ServerCertificateStatus: '{{ serverCertificateStatus }}'
      CertType: '{{ certType }}'
      ServerCertificate: '{{ serverCertificate }}'
      PrivateKey: '{{ privateKey }}'
      ForceSet: '{{ forceSet }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - domainName
          - serverCertificateStatus
          - certType
          - certName
          - serverCertificate
          - privateKey
          - forceSet
        Label:
          default:
            zh-cn: 配置参数
            en: Configure Parameters
      - Parameters:
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 高级选项
            en: Control Options

  • 本页导读 (1)
  • 模板名称
  • 模板描述
  • 模板类型
  • 所有者
  • 输入参数
  • 输出参数
  • 执行此模板需要的权限策略
  • 详情
AI助理

点击开启售前

在线咨询服务

你好,我是AI助理

可以解答问题、推荐解决方案等