Updated on 2023-12-13 GMT+08:00

CDN.Https

Element Description

The CDN.Https element can be used to configure the HTTPS of the acceleration domain name. You can configure the HTTPS certificate of the acceleration domain name and deploy it on network-wide CDN nodes to implement secure acceleration.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

domainId

Yes

Acceleration domain name ID

Type: HuaweiCloud.CDN.Domain.Id

Value Description: You are advised to use the get_input function to obtain the value, or connect to the CDN.Domain object and use the get_reference function to obtain the value.

certificate

No

Certificate content of the HTTPS protocol

Type: secret

Value Description: If the certificate is not enabled, you do not need to enter the value. The value is in PEM coding format.

certName

Yes

Certificate name

Type: string

privateKey

No

Private key used by the HTTPS protocol

Type: secret

Value Description: If the certificate is not enabled, you do not need to enter the value. The value is in PEM coding format.

httpsStatus

Yes

Whether the HTTPS certificate is enabled

Type: integer

Value Description: 0: Disable the HTTPS certificate. In this case, the certificate and private key are not required. 1: Enable HTTPS for acceleration and use HTTPS to access source websites. 2: Enable HTTPS for acceleration and use HTTP to access source websites. The certificate and private key are required.

forceRedirectHttps

No

Whether to forcibly redirect the client request

Type: boolean

Value Description: true: indicates yes. false: indicates no. After this function is enabled, all requests will be forcibly redirected to HTTPS access.

http2

No

Whether to use HTTP 2.0

Type: boolean

Value Description: true: indicates yes. false: indicates no.

Relationships Between Elements

Table 2 Relationship description

Description

Target

Connected

CDN.Domain

Return Value

Property

Type

Description

refID

string

CDN https ID

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0 
node_templates: 
  cdnd4u36: 
    type: HuaweiCloud.CDN.Domain 
    properties: 
      sources: 
        - activeStandby: 
            get_input: cdnd4u36_sources_0_activeStandby 
          originType: 
            get_input: cdnd4u36_sources_0_originType 
          ipOrDomain: 
            get_input: cdnd4u36_sources_0_ipOrDomain 
      businessType: 
        get_input: cdnd4u36_businessType 
      domainName: 
        get_input: cdnd4u36_domainName 
  cdnh6661: 
    type: HuaweiCloud.CDN.Https 
    properties: 
      domainId: 
        get_reference: cdnd4u36 
      certName: 
        get_input: cdnh6661_certName 
      httpsStatus: 
        get_input: cdnh6661_httpsStatus 
      certificate: 
        get_input: cdnh6661_certificate 
      privateKey: 
        get_input: cdnh6661_privateKey 
      forceRedirectHttps: 
        get_input: cdnh6661_forceRedirectHttps 
      http2: 
        get_input: cdnh6661_http2 
    requirements: 
      - domainId: 
          node: cdnd4u36 
inputs: 
  cdnd4u36_sources_0_activeStandby: 
    description: Active/standby status 
    default: master 
    label: '' 
  cdnd4u36_sources_0_originType: 
    description: Source site type 
    label: '' 
  cdnd4u36_sources_0_ipOrDomain: 
    description: Source IP address or domain name 
    label: '' 
  cdnd4u36_businessType: 
    description: Domain name service type 
    label: '' 
  cdnd4u36_domainName: 
    description: Acceleration domain name 
    label: '' 
  cdnh6661_certName: 
    description: Certificate name 
    label: '' 
  cdnh6661_httpsStatus: 
    description: Whether to enable the HTTPS certificate 
    label: '' 
  cdnh6661_certificate: 
    description: Certificate used by the HTTPS protocol 
    label: '' 
  cdnh6661_privateKey: 
    description: Private key used by the HTTPS protocol 
    label: '' 
  cdnh6661_forceRedirectHttps: 
    description: Whether to forcibly redirect the client request 
    label: '' 
  cdnh6661_http2: 
    description: Whether to use HTTP 2.0 
    label: ''