Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ESA::Certificate

Última atualização: Jun 27, 2026

Configure um certificado para um site.

Sintaxe

{
  "Type": "ALIYUN::ESA::Certificate",
  "Properties": {
    "CreatedType": String,
    "Domains": List,
    "SiteId": Integer,
    "CertId": String,
    "CertName": String,
    "CasId": String,
    "Certificate": String,
    "PrivateKey": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

CreatedType

String

Sim

Não

Tipo do certificado.

Valores válidos:

  • cas: certificado do Certificate Management Service.

  • upload: certificado personalizado enviado pelo usuário.

  • free: certificado gratuito.

Domains

List

Sim

Não

Lista de nomes de domínio.

Limite máximo de 50 nomes de domínio.

SiteId

Integer

Sim

Não

ID do site.

Nenhuma.

CertId

String

Não

Não

ID do certificado.

Aplica-se apenas a certificados dos tipos cas e upload. Não se aplica a certificados gratuitos criados pela operação ApplyCertificate.

CertName

String

Não

Sim

Nome do certificado.

Obrigatório quando CreatedType é definido como upload.

CasId

String

Não

Sim

ID do certificado no Certificate Management Service.

Obrigatório quando CreatedType é definido como cas.

Certificate

String

Não

Sim

Conteúdo do certificado.

Obrigatório quando CreatedType é definido como upload.

PrivateKey

String

Não

Não

Chave privada do certificado.

Obrigatório quando CreatedType é definido como upload.

Valores de retorno

Fn::GetAtt

  • SiteId: ID do site.

  • ApplyMessage: mensagem de erro retornada na solicitação do certificado.

  • FingerprintSha256: impressão digital SHA-256 do certificado.

  • SiteName: nome do site.

  • IssuerCN: autoridade certificadora (CA) emissora do certificado.

  • Issuer: emissor do certificado.

  • CertId: ID do certificado.

  • CreateTime: data e hora de criação do certificado.

  • ApplyCode: código de erro retornado na solicitação do certificado.

  • NotAfter: data de expiração do certificado.

  • CasId: ID do certificado no Certificate Management Service.

  • Domains: lista de nomes de domínio.

  • SigAlg: algoritmo de assinatura do certificado.

  • SerialNumber: número de série do certificado.

  • DCV: informações de Domain Control Validation (DCV).

  • UpdateTime: data e hora da última atualização do certificado.

  • CertName: nome do certificado.

  • NotBefore: data inicial de validade do certificado.

  • PubAlg: algoritmo de chave pública do certificado.

  • Certificate: conteúdo do certificado.

  • CommonName: campo Common Name (CN) do certificado.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Domains:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: The domain name.
        Required: false
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: A list of domain names.
    Required: true
    MinLength: 1
    MaxLength: 50
  SiteId:
    Type: Number
    Description:
      en: The ID of the site. You can obtain the site ID by calling the ListSites operation.
    Required: true
  CreatedType:
    Type: String
    Description:
      en: |-
        The type of the certificate. Valid values:
        - cas: A certificate from Certificate Management Service.
        - upload: A custom certificate that you upload.
        - free: A free certificate.
    AllowedValues:
      - cas
      - upload
      - free
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ESA::Certificate
    Properties:
      Domains:
        Ref: Domains
      SiteId:
        Ref: SiteId
      CreatedType:
        Ref: CreatedType
Outputs:
  SiteId:
    Description: The ID of the site.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SiteId
  ApplyMessage:
    Description: The error message returned for the certificate application.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ApplyMessage
  FingerprintSha256:
    Description: The SHA-256 fingerprint of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - FingerprintSha256
  SiteName:
    Description: The name of the site.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SiteName
  IssuerCN:
    Description: The common name (CN) of the certificate issuer.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - IssuerCN
  Issuer:
    Description: The issuer of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Issuer
  CertId:
    Description: The ID of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CertId
  CreateTime:
    Description: The time when the resource was created.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  ApplyCode:
    Description: The error code returned for the certificate application.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ApplyCode
  NotAfter:
    Description: The expiration date of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - NotAfter
  CasId:
    Description: The ID of the certificate from Certificate Management Service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CasId
  Domains:
    Description: The list of domain names.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Domains
  SigAlg:
    Description: The signature algorithm of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SigAlg
  SerialNumber:
    Description: The serial number of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SerialNumber
  DCV:
    Description: The Domain Control Validation (DCV) information.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DCV
  UpdateTime:
    Description: The time when the resource was last updated.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UpdateTime
  CertName:
    Description: The name of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CertName
  NotBefore:
    Description: The start date of the certificate validity period.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - NotBefore
  PubAlg:
    Description: The public key algorithm of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PubAlg
  Certificate:
    Description: The content of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Certificate
  CommonName:
    Description: The Common Name (CN) field of the certificate.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CommonName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Domains": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "The domain name."
          },
          "Required": false
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "A list of domain names."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 50
    },
    "SiteId": {
      "Type": "Number",
      "Description": {
        "en": "The ID of the site. You can obtain the site ID by calling the ListSites operation."
      },
      "Required": true
    },
    "CreatedType": {
      "Type": "String",
      "Description": {
        "en": "The type of the certificate.\n- cas: A certificate from Certificate Management Service.\n- upload: A custom certificate that you upload.\n- free: A free certificate."
      },
      "AllowedValues": [
        "cas",
        "upload",
        "free"
      ],
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ESA::Certificate",
      "Properties": {
        "Domains": {
          "Ref": "Domains"
        },
        "SiteId": {
          "Ref": "SiteId"
        },
        "CreatedType": {
          "Ref": "CreatedType"
        }
      }
    }
  },
  "Outputs": {
    "SiteId": {
      "Description": "The ID of the site.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SiteId"
        ]
      }
    },
    "ApplyMessage": {
      "Description": "The error message returned for the certificate application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ApplyMessage"
        ]
      }
    },
    "FingerprintSha256": {
      "Description": "The SHA-256 fingerprint of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "FingerprintSha256"
        ]
      }
    },
    "SiteName": {
      "Description": "The name of the site.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SiteName"
        ]
      }
    },
    "IssuerCN": {
      "Description": "The common name (CN) of the certificate issuer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "IssuerCN"
        ]
      }
    },
    "Issuer": {
      "Description": "The issuer of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Issuer"
        ]
      }
    },
    "CertId": {
      "Description": "The ID of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CertId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the resource was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "ApplyCode": {
      "Description": "The error code returned for the certificate application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ApplyCode"
        ]
      }
    },
    "NotAfter": {
      "Description": "The expiration date of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "NotAfter"
        ]
      }
    },
    "CasId": {
      "Description": "The ID of the certificate from Certificate Management Service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CasId"
        ]
      }
    },
    "Domains": {
      "Description": "The list of domain names.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Domains"
        ]
      }
    },
    "SigAlg": {
      "Description": "The signature algorithm of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SigAlg"
        ]
      }
    },
    "SerialNumber": {
      "Description": "The serial number of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SerialNumber"
        ]
      }
    },
    "DCV": {
      "Description": "The Domain Control Validation (DCV) information.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DCV"
        ]
      }
    },
    "UpdateTime": {
      "Description": "The time when the resource was last updated.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UpdateTime"
        ]
      }
    },
    "CertName": {
      "Description": "The name of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CertName"
        ]
      }
    },
    "NotBefore": {
      "Description": "The start date of the certificate validity period.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "NotBefore"
        ]
      }
    },
    "PubAlg": {
      "Description": "The public key algorithm of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PubAlg"
        ]
      }
    },
    "Certificate": {
      "Description": "The content of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Certificate"
        ]
      }
    },
    "CommonName": {
      "Description": "The Common Name (CN) field of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CommonName"
        ]
      }
    }
  }
}