阿里云资源编排ALIYUN::SLB::Certificate

ALIYUN::SLB::Certificate类型用于上传证书,支持ServerCertificate和CACertificate两种证书。


注意

  • 一次只能上传一份CA证书内容(”CertificateType”: “CA”)。
  • 一次只能上传一份服务器证书和对应的私钥(”CertificateType”: “Server”)。

语法

{
  "Type": "ALIYUN::SLB::Certificate",
  "Properties": {
    "CertificateName": String,
    "Certificate": String,
    "AliCloudCertificateName": String,
    "PrivateKey": String,
    "ResourceGroupId": String,
    "CertificateType": String,
    "AliCloudCertificateId": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
ResourceGroupId String 资源组ID。 无。
CertificateName String 证书名称。 无。
Certificate String 证书公钥。 无。
AliCloudCertificateName String 阿里云的云上证书名称。 无。
PrivateKey String 需要上传的私钥。 无。
AliCloudCertificateId String 阿里云的云上证书ID。 使用阿里云的云上证书时,此参数为必选参数。
CertificateType String 证书类型。 取值: Server,CA。

返回值

Fn::GetAtt

  • CertificateId:证书ID。
  • Fingerprint:证书的指纹。

示例

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "CertificateType": {
      "Type": "String",
      "Description": "The type of the certificate.",
      "AllowedValues": [
        "Server",
        "CA"
      ],
      "Default": "Server"
    },
    "AliCloudCertificateName": {
      "Type": "String",
      "Description": "The name of the Alibaba Cloud certificate."
    },
    "PrivateKey": {
      "Type": "String",
      "Description": "The private key."
    },
    "CertificateName": {
      "Type": "String",
      "Description": "The name of the certificate."
    },
    "Certificate": {
      "Type": "String",
      "Description": "The content of the certificate public key."
    },
    "AliCloudCertificateId": {
      "Type": "String",
      "Description": "The ID of the Alibaba Cloud certificate."
    }
  },
  "Resources": {
    "Certificate": {
      "Type": "ALIYUN::SLB::Certificate",
      "Properties": {
        "CertificateType": {
          "Ref": "CertificateType"
        },
        "AliCloudCertificateName": {
          "Ref": "AliCloudCertificateName"
        },
        "PrivateKey": {
          "Ref": "PrivateKey"
        },
        "CertificateName": {
          "Ref": "CertificateName"
        },
        "Certificate": {
          "Ref": "Certificate"
        },
        "AliCloudCertificateId": {
          "Ref": "AliCloudCertificateId"
        }
      }
    }
  },
  "Outputs": {
    "Fingerprint": {
      "Description": "The fingerprint of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "Certificate",
          "Fingerprint"
        ]
      }
    },
    "CertificateId": {
      "Description": "The ID of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "Certificate",
          "CertificateId"
        ]
      }
    }
  }
}

原创文章,作者:网友投稿,如若转载,请注明出处:https://www.cloudads.cn/archives/34141.html

发表评论

登录后才能评论