Order Advanced Certificate Manager Certificate Pack
ssl.certificate_packs.create(CertificatePackCreateParams**kwargs) -> CertificatePackCreateResponse
POST/zones/{zone_id}/ssl/certificate_packs/order
For a given zone, order an advanced certificate pack.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
hosts: Sequence[str]
Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty.
Order Advanced Certificate Manager Certificate Pack
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
certificate_pack = client.ssl.certificate_packs.create(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
certificate_authority="lets_encrypt",
hosts=["example.com", "*.example.com", "www.example.com"],
type="advanced",
validation_method="txt",
validity_days=14,
)
print(certificate_pack.id){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"certificates": [
{
"id": "7e7b8deba8538af625850b7b2530034c",
"hosts": [
"example.com",
"*.example.com"
],
"status": "active",
"bundle_method": "ubiquitous",
"expires_on": "2024-01-01T00:00:00Z",
"geo_restrictions": {
"label": "us"
},
"issuer": "Let's Encrypt",
"modified_on": "2014-01-01T05:20:00Z",
"priority": 0,
"signature": "ECDSAWithSHA256",
"uploaded_on": "2014-01-01T05:20:00Z",
"zone_id": "023e105f4ecef8ad9ca31a8372d0c353"
}
],
"hosts": [
"example.com",
"*.example.com",
"www.example.com"
],
"status": "initializing",
"type": "universal",
"certificate_authority": "lets_encrypt",
"cloudflare_branding": false,
"dcv_delegation_records": [
{
"cname": "_acme-challenge.example.com",
"cname_target": "dcv.cloudflare.com",
"emails": [
"administrator@example.com",
"webmaster@example.com"
],
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
"status": "pending",
"txt_name": "_acme-challenge.app.example.com",
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
}
],
"primary_certificate": "7e7b8deba8538af625850b7b2530034c",
"validation_errors": [
{
"message": "SERVFAIL looking up CAA for app.example.com"
}
],
"validation_method": "txt",
"validation_records": [
{
"cname": "_acme-challenge.example.com",
"cname_target": "dcv.cloudflare.com",
"emails": [
"administrator@example.com",
"webmaster@example.com"
],
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
"status": "pending",
"txt_name": "_acme-challenge.app.example.com",
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
}
],
"validity_days": 14
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"certificates": [
{
"id": "7e7b8deba8538af625850b7b2530034c",
"hosts": [
"example.com",
"*.example.com"
],
"status": "active",
"bundle_method": "ubiquitous",
"expires_on": "2024-01-01T00:00:00Z",
"geo_restrictions": {
"label": "us"
},
"issuer": "Let's Encrypt",
"modified_on": "2014-01-01T05:20:00Z",
"priority": 0,
"signature": "ECDSAWithSHA256",
"uploaded_on": "2014-01-01T05:20:00Z",
"zone_id": "023e105f4ecef8ad9ca31a8372d0c353"
}
],
"hosts": [
"example.com",
"*.example.com",
"www.example.com"
],
"status": "initializing",
"type": "universal",
"certificate_authority": "lets_encrypt",
"cloudflare_branding": false,
"dcv_delegation_records": [
{
"cname": "_acme-challenge.example.com",
"cname_target": "dcv.cloudflare.com",
"emails": [
"administrator@example.com",
"webmaster@example.com"
],
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
"status": "pending",
"txt_name": "_acme-challenge.app.example.com",
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
}
],
"primary_certificate": "7e7b8deba8538af625850b7b2530034c",
"validation_errors": [
{
"message": "SERVFAIL looking up CAA for app.example.com"
}
],
"validation_method": "txt",
"validation_records": [
{
"cname": "_acme-challenge.example.com",
"cname_target": "dcv.cloudflare.com",
"emails": [
"administrator@example.com",
"webmaster@example.com"
],
"http_body": "ca3-574923932a82475cb8592200f1a2a23d",
"http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
"status": "pending",
"txt_name": "_acme-challenge.app.example.com",
"txt_value": "810b7d5f01154524b961ba0cd578acc2"
}
],
"validity_days": 14
}
}