数字证书管理服务(原SSL证书) - cas CLI 命令参考

更新时间:
复制 MD 格式

本文列出数字证书管理服务(原SSL证书) - cas 在阿里云 CLI 中的可用命令,并提供各命令的语法和参数说明。

前提条件

  • 已安装阿里云 CLI。安装方法请参见安装/更新 CLI。

  • 执行需要身份认证的命令前,请确认已配置阿里云 CLI 凭证,且凭证对应的身份拥有所需权限。配置方法请参见配置与管理身份凭证。

地域与接入点

凭证配置中的默认地域可用 --region <regionId> 覆盖。

未指定接入地址时,CLI 按产品规则尝试解析,需要指定时可按地域和网络类型查看 Endpoint,再使用 --endpoint <endpoint>。

版本信息

属性

值

CLI 版本

3.5.4

API 版本

2020-04-07, 2020-06-30

不同版本的命令和参数通过页签分别展示。执行命令时,请使用对应页签中的语法。

可用命令

单击命令名称,查看命令描述、语法和参数说明。

命令详情

语法逐行列出命令参数:<类型> 是需要替换的值占位符,方括号表示可选参数,# 表示列表项序号;[options] 表示 CLI 通用选项,见“全局选项”。可选对象或列表内标为必填的字段,仅在提供该对象或列表项时必填。完整参数定义见各命令的参数说明。

AddCloudAccess

API 版本:2020-04-07

命令描述

添加授权ak

语法

aliyun cas AddCloudAccess --version 2020-04-07
    [--CloudName <string>]
    [--SecretId <string>]
    [--SecretKey <string>]
    [options]

参数

参数

类型

必填

说明

--CloudName

String

否

云服务供应商。目前仅支持腾讯云(Tencent).
注意:本参数实际为必填项,未提供时 API 返回 MissingParameter(400)

--SecretId

String

否

云资源集访问的密钥ID。
注意:本参数实际为必填项,未提供时 API 返回 MissingParameter(400)

--SecretKey

String

否

AK参数Secret。取值:
1.AkType取值primary:
Tencent:主账号SecretAccessKey
2.AkType取值sub:
Tencent:子账号SecretAccessKey
注意:本参数实际为必填项,未提供时 API 返回 MissingParameter(400)




示例

aliyun cas AddCloudAccess --region cn-hangzhou --SecretKey 'example-access-key-secret' --SecretId xcxx --CloudName Tencent

ApplyCertificate

API 版本:2020-04-07

命令描述

申请证书

语法

aliyun cas ApplyCertificate --version 2020-04-07
    --InstanceId <string>
    [options]

参数

参数

类型

必填

说明

--InstanceId

String

是

实例的 ID。实例需先通过阿里云控制台购买订阅实例获取,然后调用UpdateInstance接口,保证该实例的申请信息都已经完成更新和填写才可以申请证书(ApplyCertificate)。
您可以在阿里云数字证书管理服务控制台 (https://common-buy.aliyun.com/?commodityCode=cas_dv_public_cn)购买订阅实例。

示例

aliyun cas ApplyCertificate --region cn-hangzhou --InstanceId 'cas_dv-cn-rp643r82d0i1'

AssignCertificateCount

API 版本:2020-06-30

命令描述

分配证书使用数量

语法

aliyun cas AssignCertificateCount --version 2020-06-30
    [--CaIdentifier <string>]
    [--CertTotalCount <int>]
    [--Id <int>]
    [options]

参数

参数

类型

必填

说明

--CaIdentifier

String

否

CA证书标识。
仅接受 end-entity(SUB_ROOT)CA 实例,
通过 ListPcaCaCertificate 获取含 IssuerIdentifier 的有效 CA 列表。
必填说明:与ID二者至少提供其一、缺失时 API 返回 MissingParameter.Id/CaIdentifier(400)


--CertTotalCount

Integer

否

证书记录总数。
未提供时 API 返回 MissingParameter.CertTotalCount(400)

--Id

Integer

否

证书所属数据源id。
必填说明:与CaIdentifier二者至少提供其一、缺失时 API 返回 MissingParameter.Id/CaIdentifier(400)

BatchUpdateNoticeStatus

API 版本:2020-04-07

命令描述

批量更新通知状态

语法

aliyun cas BatchUpdateNoticeStatus --version 2020-04-07
    --Ids <string>
    [--Lang <string>]
    [--NoticeBiz <string>]
    --NoticeStatus <string>
    [--SourceIp <string>]
    [options]

参数

参数

类型

必填

说明

--Ids

String

是

待同步到证书服务的主键标识列表。多个ID使用半角逗号(,)间隔

--Lang

String

否

指定请求和接收消息的语言类型。取值:
zh:中文
en:英文

--NoticeBiz

String

否

消息通知的业务编码。此处固定为ssl

--NoticeStatus

String

是

是否开启消息通知。
--enable:开启。
--disable:关闭

--SourceIp

String

否

指定请求的来源IP地址

示例

aliyun cas BatchUpdateNoticeStatus --region cn-hangzhou --NoticeStatus disable --Ids 888

CancelCertificateForPackageRequest

API 版本:2020-04-07

命令描述

如果是已签发订单,则吊销已签发的证书;如果是待申请订单,则取消订单,返回额度

语法

aliyun cas CancelCertificateForPackageRequest --version 2020-04-07
    --OrderId <int>
    [options]

参数

参数

类型

必填

说明

--OrderId

Integer

是

订单ID。
此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取

示例

aliyun cas CancelCertificateForPackageRequest --region cn-hangzhou --OrderId 123456

CancelOrderRequest

API 版本:2020-04-07

命令描述

撤回待验证、审核中的证书申请订单

语法

aliyun cas CancelOrderRequest --version 2020-04-07
    --OrderId <int>
    [options]

参数

参数

类型

必填

说明

--OrderId

Integer

是

订单ID。
此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取。
OrderId 是证书申请订单 ID(非 CertificateId),仅 CHECKING 状态的订单可撤回,获取可撤回订单需先通过 CreateCertificateForPackageRequest 创建证书申请(依赖已购买的证书资源包)

示例

aliyun cas CancelOrderRequest --region cn-hangzhou --OrderId 123451222

CancelPendingCertificate

API 版本:2020-04-07

命令描述

撤回证书申请。
(1) 在 SSL 证书控制台购买订阅实例(cas_dv-cn-* 格式);
(2) 调用 UpdateInstance 填写证书申请信息;
(3) 调用 ApplyCertificate 提交审核,使实例进入 pending 状态;
(4) 调用 ListInstances(Status='pending') 查询可撤回的实例;



语法

aliyun cas CancelPendingCertificate --version 2020-04-07
    --InstanceId <string>
    [options]

参数

参数

类型

必填

说明

--InstanceId

String

是

实例的ID

示例

aliyun cas CancelPendingCertificate --region cn-hangzhou --InstanceId 'cas_dv-cn-rp643r82d0i1'

CreateCertificateForPackageRequest

API 版本:2020-04-07

命令描述

提交证书申请

语法

aliyun cas CreateCertificateForPackageRequest --version 2020-04-07
    [--CompanyName <string>]
    [--Csr <string>]
    [--Domain <string>]
    [--Email <string>]
    [--Phone <string>]
    [--ProductCode <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [--Username <string>]
    [--ValidateType <string>]
    [options]

参数

参数

类型

必填

说明

--CompanyName

String

否

证书申请公司的名称。
该参数仅适用于申请OV证书。申请OV证书时,您必须先在数字证书管理服务控制台 (https://yundun.console.aliyun.com/?p=cas#/)的信息管理模块添加公司信息,具体操作,请参见https://help.aliyun.com/document_detail/198289.html。申请DV证书时,无需添加公司信息。
申请OV证书时,如果您在此处设置了公司名称,则表示使用信息管理模块中对应的公司信息;如果您没有设置该参数,则表示从信息管理模块中选择使用最新添加的一条公司信息

--Csr

String

否

您使用OpenSSL或Keytool工具为域名手动生成的CSR文件的内容。CSR文件的密钥类型必须是RSA、ECC算法,且RSA算法的密钥长度必须大于等于2048。关于CSR文件的制作方法,请参见https://help.aliyun.com/document_detail/313297.html。如果不设置该参数,表示由SSL证书服务自动为您创建CSR。
CSR(Certificate Signing Request)是证书签名请求文件,包含了您的服务器信息和公司信息。申请证书时需要将您证书的CSR文件提交给CA认证中心审核,CA中心对CSR文件进行根证书私钥签名后,会生成证书公钥文件(即签发给您的SSL证书)。
<notice>
CSR中的CN字段表示证书绑定的域名。您设置CSR参数时,该字段为必填字段。
</notice>



--Domain

String

否

证书要绑定的域名。具体要求如下:
支持设置单域名或者通配符域名(例如,*.aliyundoc.com)。
支持设置多个域名。多个域名间使用英文逗号(,)分隔。最多可以设置5个域名。
如果设置多个域名,则多个域名只能全部是单域名或者通配符域名,不允许同时包含单域名和通配符域名。
<notice>
证书绑定多个域名时,该参数为必填项。该参数与Csr参数不允许同时为空。如果您同时设置了该参数和Csr参数,则取Csr中的CN字段值作为证书绑定的域名。
</notice>





--Email

String

否

申请联系人的邮箱地址。CA中心收到您的证书申请后,将向该邮箱发送一封证书申请验证邮件。您需要登录该邮箱,查收相关邮件,并按照邮件提示完成验证。
如果不设置该参数,表示从信息管理模块中选择使用最新添加的一条联系人信息。关于在信息管理模块中添加联系人的具体操作,请参见https://help.aliyun.com/document_detail/198262.html

--Phone

String

否

申请联系人的手机号码。后续CA中心工作人员可能会通过该电话联系您,验证您的证书申请信息。
如果不设置该参数,表示从信息管理模块中选择使用最新添加的一条联系人信息。关于在信息管理模块中添加联系人的具体操作,请参见https://help.aliyun.com/document_detail/198262.html

--ProductCode

String

否

要申请的证书规格。取值:
digicert-free-1-free(默认):表示3个月个人测试证书(免费版)。仅中国站。
symantec-free-1-free:表示12个月的个人测试证书(pro)。仅中国站。
symantec-dv-1-starter:表示DigiCert DV通配符域名证书。
symantec-ov-1-personal:表示DigiCert OV单域名证书。
symantec-ov-w-personal:表示DigiCert OV通配符域名证书。
geotrust-dv-1-starter:表示GeoTrust DV单域名证书。
geotrust-dv-w-starter:表示GeoTrust DV通配符域名证书。
geotrust-ov-1-personal:表示GeoTrust OV单域名证书。
geotrust-ov-w-personal:表示GeoTrust OV通配符域名证书。
globalsign-dv-1-personal:表示GlobalSign DV单域名证书。
globalsign-dv-w-advanced:表示GlobalSign DV通配符域名证书。
globalsign-ov-1-personal:表示GlobalSign OV单域名证书。
globalsign-ov-w-advanced:表示GlobalSign OV通配符域名证书。
cfca-ov-1-personal:表示CFCA OV单域名证书(仅中国站)。
cfca-ev-w-advanced:表示CFCA OV通配符域名证书(仅中国站)














--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签的Value值。支持查询多个标签Value值

--Username

String

否

申请联系人的姓名。
如果不设置该参数,表示从信息管理模块中选择使用最新添加的一条联系人信息。关于在信息管理模块中添加联系人的具体操作,请参见https://help.aliyun.com/document_detail/198262.html

--ValidateType

String

否

域名所有权的验证方式。取值:
DNS:DNS验证。通过在域名的DNS管理平台为域名添加一条TXT类型的DNS记录,验证域名的所有权。您需要域名解析的管理权限,才可以完成验证。
FILE:文件验证。通过在域名服务器上创建指定的文件,验证域名的所有权。您需要域名服务器的管理员权限,才可以完成验证。
关于两种验证方式的更多信息,请参见https://help.aliyun.com/document_detail/48016.html


示例

aliyun cas CreateCertificateForPackageRequest --region cn-hangzhou --CompanyName '某公司' --Csr='-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST-----' --Email 'username@example.com' --Tags.1.Value 1 --ProductCode 'digicert-free-1-free' --Username Tom --Phone '1390000****' --Tags.1.Key runtime --Domain 'aliyundoc.com' --ValidateType DNS

CreateCertificateRequest

API 版本:2020-04-07

命令描述

完成扩展服务DV证书的购买、申请和签发流程

语法

aliyun cas CreateCertificateRequest --version 2020-04-07
    --Domain <string>
    --Email <string>
    --Phone <string>
    [--ProductCode <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    --Username <string>
    --ValidateType <string>
    [options]

参数

参数

类型

必填

说明

--Domain

String

是

证书要绑定的域名。仅支持设置一个域名。
该域名必须与您要申请的证书规格(通过ProductCode参数指定)匹配。申请单域名证书时,此处必须设置一个单域名;申请通配符域名证书时,此处必须设置一个通配符域名(例如,*.aliyundoc.com)

--Email

String

是

申请联系人的邮箱地址

--Phone

String

是

申请联系人的手机号码

--ProductCode

String

否

要申请的证书规格。取值:
digicert-free-1-free(默认):表示3个月个人测试证书(免费版)。仅中国站。
symantec-free-1-free:表示12个月的个人测试证书(pro)。仅中国站。
symantec-dv-1-starter:表示DigiCert DV通配符域名证书。
geotrust-dv-1-starter:表示GeoTrust DV单域名证书。
geotrust-dv-w-starter:表示GeoTrust DV通配符域名证书。
globalsign-dv-1-personal:表示GlobalSign DV单域名证书。
globalsign-dv-w-advanced:表示GlobalSign DV通配符域名证书






--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Username

String

是

申请联系人的姓名

--ValidateType

String

是

域名所有权的验证方式。取值:
DNS:DNS验证。通过在域名的DNS管理平台为域名添加一条TXT类型的DNS记录,验证域名的所有权。您需要域名解析的管理权限,才可以完成验证。
FILE:文件验证。通过在域名服务器上创建指定的文件,验证域名的所有权。您需要域名服务器的管理员权限,才可以完成验证。
关于两种验证方式的更多信息,请参见https://help.aliyun.com/document_detail/48016.html


示例

aliyun cas CreateCertificateRequest --region cn-hangzhou --Email 'username@example.com' --Username Tom --Phone '1390000****' --Domain 'www.aliyundoc.com' --ValidateType DNS

CreateCertificateWithCsrRequest

API 版本:2020-04-07

命令描述

购买、申请和签发自带CSR文件的DV证书。证书扩展服务可通过一步完成DV证书的购买和申请

语法

aliyun cas CreateCertificateWithCsrRequest --version 2020-04-07
    --Csr <string>
    --Email <string>
    --Phone <string>
    [--ProductCode <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    --Username <string>
    --ValidateType <string>
    [options]

参数

参数

类型

必填

说明

--Csr

String

是

已有的CSR文件的内容。
CSR文件的密钥类型必须是RSA、ECC算法,且RSA算法的密钥长度必须大于等于2048。关于CSR文件的制作方法,请参见https://help.aliyun.com/document_detail/42218.html。 您也可以在数字证书管理服务控制台 (https://yundunnext.console.aliyun.com/?&p=cas)创建CSR,具体操作,请参见https://help.aliyun.com/document_detail/313297.html。
CSR(Certificate Signing Request)是证书签名请求文件,包含了您的服务器信息和公司信息。申请证书时需要将您证书的CSR文件提交给CA认证中心审核,CA中心对CSR文件进行根证书私钥签名后,会生成证书公钥文件(即签发给您的SSL证书)。
CSR中的CN字段表示证书绑定的域名


--Email

String

是

申请联系人的邮箱地址

--Phone

String

是

申请联系人的手机号码

--ProductCode

String

否

要申请的证书规格。取值:
digicert-free-1-free(默认):表示3个月个人测试证书(免费版)。仅中国站。
symantec-free-1-free:表示12个月的个人测试证书(pro)。仅中国站。
symantec-dv-1-starter:表示DigiCert DV通配符域名证书。
geotrust-dv-1-starter:表示GeoTrust DV单域名证书。
geotrust-dv-w-starter:表示GeoTrust DV通配符域名证书。
globalsign-dv-1-personal:表示GlobalSign DV单域名证书。
globalsign-dv-w-advanced:表示GlobalSign DV通配符域名证书






--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签的值(value)

--Username

String

是

申请联系人的姓名

--ValidateType

String

是

域名所有权的验证方式。取值:
DNS:DNS验证。通过在域名的DNS管理平台为域名添加一条TXT类型的DNS记录,验证域名的所有权。您需要域名解析的管理权限,才可以完成验证。
FILE:文件验证。通过在域名服务器上创建指定的文件,验证域名的所有权。您需要域名服务器的管理员权限,才可以完成验证。
关于两种验证方式的更多信息,请参见https://help.aliyun.com/document_detail/48016.html


示例

aliyun cas CreateCertificateWithCsrRequest --region cn-hangzhou --Csr='-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST-----' --Email 'username@example.com' --Username Tom --Phone '1390000****' --ValidateType DNS

CreateClientCertificate

API 版本:2020-06-30

命令描述

基于系统自动生成的CSR签发单个客户端证书

语法

aliyun cas CreateClientCertificate --version 2020-06-30
    [--AfterTime <int>]
    [--Algorithm <string>]
    [--AliasName <string>]
    [--AsynchronousFlag <bool>]
    [--BeforeTime <int>]
    [--ClientToken <string>]
    [--CommonName <string>]
    [--Country <string>]
    [--CustomIdentifier <string>]
    [--Days <int>]
    [--EnableCrl <int>]
    [--Immediately <int>]
    [--Locality <string>]
    [--Months <int>]
    [--Organization <string>]
    [--OrganizationUnit <string>]
    --ParentIdentifier <string>
    [--ResourceGroupId <string>]
    [--SanType <int>]
    [--SanValue <string>]
    [--State <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [--Years <int>]
    [options]

参数

参数

类型

必填

说明

--AfterTime

Integer

否

客户端证书的服务到期时间,使用时间戳格式。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时设置

--Algorithm

String

否

客户端证书的密钥算法。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048:对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
ECC_384:对应签名算法为Sha256WithECDSA。
ECC_512:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
客户端证书的加密算法必须与子CA证书一致,密钥长度可以不一致。例如:子CA证书的密钥算法为RSA_2048,则客户端证书的密钥算法必须是RSA_1024、RSA_2048、RSA_4096中的一种。
您可以调用https://help.aliyun.com/document_detail/465954.html查询子CA证书的密钥算法








--AliasName

String

否

设置签发证书的名称

--AsynchronousFlag

Boolean

否

异步处理标识。当传值为“true”时,后端服务将采用异步的方式申请证书。
用户请求后可通过ListClientCertificate接口获取最新证书

--BeforeTime

Integer

否

客户端证书的签发时间,使用时间戳格式,默认为您调用该接口的时间。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时设置

--ClientToken

String

否

用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符

--CommonName

String

否

表示证书使用者的名称。客户端认证(ClientAuth)证书使用者一般是自然人、公司、组织或某个应用,建议填写使用者的通用名称。例如,张三、阿里巴巴、阿里云密码平台、天猫精灵等

--Country

String

否

所属国家,默认:CN

--CustomIdentifier

String

否

用户自定义标识,唯一键

--Days

Integer

否

客户端证书的有效期。单位:天。
Days、BeforeTime、AfterTime参数不能同时为空,并且BeforeTime、AfterTime参数必须同时为空或者同时设置。该参数具体设置说明如下:
当设置Days参数时,您可以选择同时设置BeforeTime、AfterTime参数或者不设置BeforeTime、AfterTime参数。
当不设置Days参数时,您必须设置BeforeTime、AfterTime参数。
当您同时设置Days、BeforeTime、AfterTime参数时,客户端证书的有效期以Days参数的值为准。
客户端证书的有效期不能超过子CA证书的有效期。您可以调用https://help.aliyun.com/document_detail/465954.html查看子CA证书的有效期




--EnableCrl

Integer

否

是否包含CRL地址
0 - 否
1 - 是

--Immediately

Integer

否

立即返回数字证书。
0,不返回。默认值。
1,返回证书。
2, 返回证书及其证书链


--Locality

String

否

设置证书组织机构所在城市的名称。支持使用中文、英文字符等。
默认为签发该证书的子CA证书的组织机构所在城市的名称

--Months

Integer

否

购买证书的时长。单位:月

--Organization

String

否

机构名称,默认:Alibaba Inc

--OrganizationUnit

String

否

部门名称,默认:Aliyun CDN

--ParentIdentifier

String

是

签发该证书的子CA证书的唯一识别码。 Sub CA 所绑定的私有 CA 实例(PrivateCaInstanceId)必须处于有效未过期状态。
您可以调用[DescribeCACertificateList]查询子CA证书的唯一识别码

--ResourceGroupId

String

否

资源分组ID

--SanType

Integer

否

客户端证书支持的扩展信息SAN(Subject Alternative Name)类型。取值:
1:表示邮箱。
6:表示统一资源标志符URI(Uniform Resource Identifier)

--SanValue

String

否

客户端证书的具体扩展信息。支持输入多个扩展信息,如果您需要输入多个扩展信息,请用半角逗号(,)将其隔开

--State

String

否

设置证书组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等。默认为签发该证书的子CA证书组织机构所在省份、直辖市或自治区的名称。

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Years

Integer

否

购买证书的时长。单位:年

CreateClientCertificateWithCsr

API 版本:2020-06-30

命令描述

基于自定义的CSR签发单个客户端证书

语法

aliyun cas CreateClientCertificateWithCsr --version 2020-06-30
    [--AfterTime <int>]
    [--Algorithm <string>]
    [--AsynchronousFlag <bool>]
    [--BeforeTime <int>]
    [--CommonName <string>]
    [--Country <string>]
    [--Csr <string>]
    [--CustomIdentifier <string>]
    [--Days <int>]
    [--EnableCrl <int>]
    [--Immediately <int>]
    [--Locality <string>]
    [--Months <int>]
    [--Organization <string>]
    [--OrganizationUnit <string>]
    [--ParentIdentifier <string>]
    [--ResourceGroupId <string>]
    [--SanType <int>]
    [--SanValue <string>]
    [--State <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [--Years <int>]
    [options]

参数

参数

类型

必填

说明

--AfterTime

Integer

否

客户端证书的服务到期时间,使用时间戳格式。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时设置

--Algorithm

String

否

客户端证书的密钥算法。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048:对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
ECC_384:对应签名算法为Sha256WithECDSA。
ECC_512:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
客户端证书的加密算法必须与子CA证书一致,密钥长度可以不一致。例如:子CA证书的密钥算法为RSA_2048,则客户端证书的密钥算法必须是RSA_1024、RSA_2048、RSA_4096中的一种。
您可以调用https://help.aliyun.com/document_detail/465954.html查询子CA证书的密钥算法








--AsynchronousFlag

Boolean

否

异步处理标识。当传值为“true”时,后端服务将采用异步的方式申请证书。
用户请求后可通过ListClientCertificate接口获取最新证书

--BeforeTime

Integer

否

客户端证书的签发时间,使用时间戳格式,默认为您调用该接口的时间。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时设置

--CommonName

String

否

设置证书的公用名。支持使用中文、英文字符等。
如果您设置了CsrPemString参数,则CommonName参数取值以CsrPemString参数中的对应信息为准

--Country

String

否

国家代码,例如CN、US

--Csr

String

否

CSR内容。您可以通过OpenSSL工具或者Keytool工具生成CSR。更多信息,请参见https://help.aliyun.com/document_detail/42218.html。
您也可以通过SSL证书控制台创建CSR。更多信息,请参见https://help.aliyun.com/document_detail/313297.html。

--CustomIdentifier

String

否

用户自定义标识,唯一键

--Days

Integer

否

客户端证书的有效期。单位:天。
Days、BeforeTime、AfterTime参数不能同时为空,同时BeforeTime和AfterTime参数必须同时为空或者同时设置。该参数具体设置说明如下:
当设置Days参数时,您可以选择同时设置BeforeTime和AfterTime参数或者不设置BeforeTime和AfterTime参数。
当不设置Days参数时,您必须设置BeforeTime和AfterTime参数。
当您同时设置Days、BeforeTime、AfterTime参数时,客户端证书的有效期以Days参数的值为准。
客户端证书的有效期不能超过子CA证书的有效期。您可以调用https://help.aliyun.com/document_detail/465954.html查看子CA证书的有效期




--EnableCrl

Integer

否

是否包含CRL地址
0 - 否
1 - 是

--Immediately

Integer

否

立即返回数字证书。
0,不返回。默认值。
1,返回证书。
2, 返回证书及其证书链


--Locality

String

否

设置证书组织机构所在城市的名称。支持使用中文、英文字符等。
默认为签发该证书的子CA证书的组织机构所在城市的名称

--Months

Integer

否

证书有效期。单位:月

--Organization

String

否

机构名称,默认:Alibaba Inc

--OrganizationUnit

String

否

部门名称,默认:Aliyun CDN

--ParentIdentifier

String

否

签发该证书的子CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465957.html查询子CA证书的唯一识别码

--ResourceGroupId

String

否

证书所属资源组的ID

--SanType

Integer

否

客户端证书的扩展信息SAN(Subject Alternative Name)的类型。取值:
0:otherName (0):其他名称
1:rfc822Name (1):RFC822 名称(通常指电子邮件地址)
2:dNSName (2):DNS 名称(域名)
3:x400Address (3):X.400 地址(一种早期的电子邮件标准地址)
4:directoryName (4):目录名称(通常指 X.500 专有名称 DN)
5:ediPartyName (5):EDI 参与方名称(电子数据交换参与方名称)
6:uniformResourceIdentifier (6):统一资源标识符(URI:Uniform Resource Identifier)
7:iPAddress (7):IP 地址
8:registeredID (8):已注册的 ID(对象标识符 OID)








--SanValue

String

否

客户端证书的具体扩展信息。支持输入多个扩展信息,如果您需要输入多个扩展信息,请用半角逗号(,)将其隔开。
otherName (0):其他名称
示例值:1.3.6.1.4.1.311.20.2.3 (OID) + user@domain.com (UPN 用户主体名称)
说明:这是一种自定义的扩展类型,通常由特定的 OID(对象标识符)和对应的值组成。在 Windows 环境中,常用来存放 UPN(用户主体名称),比如用于智能卡登录的 zhangsan@company.com。
rfc822Name (1):RFC822 名称(电子邮件地址)
示例值:admin@example.com,support@company.cn
说明:遵循 RFC 822 标准的互联网电子邮箱地址。常用于 S/MIME 邮件签名和加密证书中,用来标识邮件的发送者或接收者。
dNSName (2):DNS 名称(域名)
示例值:www.example.com,api.test.cn,*.mydomain.com(通配符域名)
说明:这是目前 HTTPS 网站 SSL/TLS 证书中最常用的类型。一个证书可以通过 SAN 扩展包含多个 DNS 名称,从而实现一张证书保护多个子域名或完全不同的域名。
x400Address (3):X.400 地址
示例值:G=Zhang; S=San; O=Company; PRMD=IT; ADMD=Telecom; C=CN
说明:这是一种较早期的电子邮件系统地址标准,结构非常复杂,包含了国家(C)、管理域(ADMD)、组织(O)、姓(S)、名(G)等属性。在现代互联网 HTTPS 证书中极少使用,多见于一些传统的欧洲政企或军事通信系统。
directoryName (4):目录名称
示例值:CN=IT Department, OU=Tech, O=Company Ltd, L=Beijing, ST=Beijing, C=CN
说明:即标准的 X.500 专有名称(DN)。它通常用来在证书中明确标识某个组织、部门或实体的完整层级信息,常见于企业内部的根证书或特定的政务数字证书中。
ediPartyName (5):EDI 参与方名称
示例值:nameAssigner=GlobalTradeOrg, partyName=SupplierA
说明:专用于电子数据交换(EDI)领域。用来标识在商业报文交换(如订单、发票传输)中的特定参与方名称,通常包含分配名称的机构(nameAssigner)和参与方本身的名称(partyName)。
uniformResourceIdentifier (6):统一资源标识符(URI)
示例值:http://www.example.com/verify,https://api.test.cn/status
说明:标准的 URL 格式,必须包含协议头(如 http:// 或 https://)。它可以指向一个具体的网络资源地址。
iPAddress (7):IP 地址
示例值:192.168.1.100(IPv4)、2001:0db8:85a3::8a2e:0370:7334(IPv6)
说明:直接绑定服务器的 IP 地址。常用于没有域名的内部系统、API 接口服务器,或者只能通过公网 IP 访问的特定业务(注意:公网 IP 证书通常需要严格的组织验证 OV)。
registeredID (8):已注册的 ID(对象标识符 OID)
示例值:1.2.3.4.55.6.5.99、2.5.29.17
说明:由国际标准组织分配的唯一数字标识符。在证书中较少作为主体名称直接使用,更多是作为系统内部的一种唯一身份识别码或策略标识


























--State

String

否

设置证书组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等。默认为签发该证书的子CA证书组织机构所在省份、直辖市或自治区的名称。

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签的值(value)

--Years

Integer

否

证书有效期。单位:年

CreateCompany

API 版本:2020-04-07

命令描述

创建公司

语法

aliyun cas CreateCompany --version 2020-04-07
    --City <string>
    --CompanyAddress <string>
    --CompanyCode <string>
    [--CompanyEmail <string>]
    --CompanyName <string>
    --CompanyPhone <string>
    --CompanyType <int>
    --CountryCode <string>
    [--Department <string>]
    --Lang <string>
    --PostCode <string>
    --Province <string>
    [options]

参数

参数

类型

必填

说明

--City

String

是

城市

--CompanyAddress

String

是

公司地址

--CompanyCode

String

是

公司代码

--CompanyEmail

String

否

公司邮箱

--CompanyName

String

是

公司或者组织机构名称

--CompanyPhone

String

是

公司电话

--CompanyType

Integer

是

公司类型

--CountryCode

String

是

国家代码

--Department

String

否

部门

--Lang

String

是

语言

--PostCode

String

是

邮编

--Province

String

是

省份

示例

aliyun cas CreateCompany --region cn-hangzhou --CompanyAddress test --CompanyName testYanwen045 --Lang zh --CompanyType 0 --City Beijing --PostCode 100000 --CountryCode CN --CompanyCode xxx --CompanyPhone 1999 --Province Beijing

CreateContact

API 版本:2020-04-07

命令描述

创建证书申请联系人

语法

aliyun cas CreateContact --version 2020-04-07
    [--Email <string>]
    [--Idcard <string>]
    --Mobile <string>
    --Name <string>
    [--Webhooks <string>]
    [options]

参数

参数

类型

必填

说明

--Email

String

否

联系人邮箱

--Idcard

String

否

联系人身份证号码,CFCA证书品牌需要,其他品牌不需要

--Mobile

String

是

联系人电话

--Name

String

是

证书联系人名称

--Webhooks

String

否

钉钉、企业微信或飞书机器人的webhook地址,list格式的字符串

示例

aliyun cas CreateContact --region cn-hangzhou --Mobile '1335678****' --Name 'zhang san'

CreateCsr

API 版本:2020-04-07

命令描述

CSR是证书请求文件,包含您的SSL证书信息,例如,证书绑定的域名、证书持有主体的名称及地理位置信息等。您向CA中心提交证书申请时,必须提供CSR。CA中心审核通过您的证书申请后,将使用其根CA私钥为您提供的CSR签名,生成SSL证书公钥(即签发给您的SSL证书)。SSL证书的私钥即您在生成CSR时同时生成的私钥

语法

aliyun cas CreateCsr --version 2020-04-07
    --Algorithm <string>
    --CommonName <string>
    [--CorpName <string>]
    --CountryCode <string>
    [--Department <string>]
    --KeySize <int>
    --Locality <string>
    [--Name <string>]
    --Province <string>
    [--Sans <string>]
    [options]

参数

参数

类型

必填

说明

--Algorithm

String

是

CSR密钥算法,仅支持RSA、SM2、ECC。更多关于密钥算法的说明,请参见https://help.aliyun.com/document_detail/197871.html

  • 约束:

    • 允许值:["ECC", "RSA", "SM2"]

--CommonName

String

是

主域名,通用域名

--CorpName

String

否

单位名称

--CountryCode

String

是

设置证书组织机构所在国家或地区的代码。例如,CN 表示中国,US 表示美国

--Department

String

否

证书使用部门

--KeySize

Integer

是

密钥算法长度。
RSA算法长度一般为2048、3072、4096等。
ECC和SM2算法长度一般为256

--Locality

String

是

公司所在城市

--Name

String

否

CSR名称。长度不超过50个字符,且仅支持英文大小写字母(a~z和A~Z)、阿拉伯数字(0~9)、下划线(_)、短划线(-)和半角句号(.)

--Province

String

是

公司所在省份或者地区

--Sans

String

否

备用名称,申请同一SSL证书的其他域名,多个域名请使用英文逗号分隔

示例

aliyun cas CreateCsr --region cn-hangzhou --Locality Beijing --CountryCode CN --KeySize 2048 --Algorithm RSA --Province Beijing --CommonName 'example.com'

CreateCustomCertificate

API 版本:2020-06-30

命令描述

使用指定的证书主体名称、证书主题别名、密钥用法、扩展密钥用法颁发数字证书。
调用本 API 前,若 ParentIdentifier 指向的 SUB_ROOT CA 是新创建的,须先调用 AssignCertificateCount(参数 CaIdentifier 取 ParentIdentifier 的值)为该 CA 分配证书配额(CertTotalCount),否则会返回 QuotaExceeded

语法

aliyun cas CreateCustomCertificate --version 2020-06-30
    [--ApiPassthrough <object>]
    --Csr <string>
    [--EnableCrl <int>]
    [--Immediately <int>]
    --ParentIdentifier <string>
    [--ResourceGroupId <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    --Validity <string>
    [--customIdentifier <string>]
    [options]

参数

参数

类型

必填

说明

--ApiPassthrough

Object

否

透传参数。调用示例:
` {
"apiPassthrough": {
"extensions": {
"keyUsage": {
"digitalSignature": true,
"keyEncipherment": true
},
"extendedKeyUsages": ["serverAuth", "clientAuth"],
"subjectAlternativeNames": [
{"type": "dNSName", "value": "www.example.com"},
{"type": "dNSName", "value": "example.com"},
{"type": "iPAddress", "value": "192.168.1.1"}
],
"criticals": ["ExtendedKeyUsages"]
}
}
}`
















--Csr

String

是

CSR内容。您可以通过OpenSSL工具或者Keytool工具生成CSR。更多信息,请参见https://help.aliyun.com/document_detail/42218.html

--EnableCrl

Integer

否

是否包含CRL地址
0 - 否
1 - 是

--Immediately

Integer

否

立即获取证书。
0 - 异步颁发证书。
1 - 立即颁发证书。
2 - 立即颁发证书并返回CA证书链


--ParentIdentifier

String

是

CA证书识别码。
该参数必须指向一个 SUB_ROOT(终端实体)CA;使用 ROOT CA 时 API 会返回 OperationDenied.NotSupport

--ResourceGroupId

String

否

资源组ID。此ID可通过调用https://help.aliyun.com/document_detail/2716559.html接口获取

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Validity

String

是

证书有效期。不可超过实例有效期。支持使用相对时间和绝对时间。
相对时间:支持单位年、月、日。
年 - y
月 - m
日 - d
绝对时间:使用GMT时间。格式:yyyy-MM-dd'T'HH:mm:ss'Z'
指定结束时间 - $NotAfter
指定开始时间和结束时间 - $NotBefore/$NotAfter






--customIdentifier

String

否

用户自定义标识

CreateDeploymentJob

API 版本:2020-04-07

命令描述

SSL证书签发完成后,您可以通过该接口创建不同类型的证书部署任务,立即或手动指定任务部署时间,将SSL证书部署到阿里云产品或三方云产品,为您的业务网站提供可信身份认证和安全数据传输

语法

aliyun cas CreateDeploymentJob --version 2020-04-07
    --CertIds <string>
    --ContactIds <string>
    --JobType <string>
    --Name <string>
    --ResourceIds <string>
    [--ScheduleTime <int>]
    [options]

参数

参数

类型

必填

说明

--CertIds

String

是

证书ID,多个证书ID用半角逗号(,)分隔。此处ID为https://help.aliyun.com/document_detail/455804.html返回的**CertificateId**

--ContactIds

String

是

联系人ID。多个联系人ID用半角逗号(,)分隔。此处ID为https://help.aliyun.com/document_detail/2712221.html返回的主键**Id**

--JobType

String

是

任务类型

  • 约束:

    • 允许值:["cloud", "user"]

--Name

String

是

部署任务名称

--ResourceIds

String

是

云产品资源ID。多个资源ID用半角逗号(,)分隔。此处ID为https://help.aliyun.com/document_detail/2712230.html返回的主键**Id**。
ListCloudResources 返回的是账号下已有的云产品基础设施(SLB、ALB、CDN、WAF、DCDN 等实例),CAS 不提供创建这些资源的接口,需要先通过对应云产品的 API(如 CreateLoadBalancer 等)或控制台预先创建资源后才能在 ListCloudResources 中查到并用于本接口

--ScheduleTime

Integer

否

设置任务开始调度的时间(Unix时间戳)。如果不设置,在任务处于待执行状态时将立即执行部署

示例

aliyun cas CreateDeploymentJob --region cn-hangzhou --JobType user --CertIds '12342649,12304338,12067351,9957285' --ResourceIds '6591316,6585549,6190248,5811894,5775176,5772504' --Name jobName --ContactIds '1,2'

CreateExternalCACertificate

API 版本:2020-06-30

命令描述

基于CSR和API参数创建并颁发外部子CA证书

语法

aliyun cas CreateExternalCACertificate --version 2020-06-30
    [--ApiPassthrough <object>]
    [--CertMaxTime <int>]
    [--Csr <string>]
    [--InstanceId <string>]
    [--ResourceGroupId <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [--Validity <string>]
    [options]

参数

参数

类型

必填

说明

--ApiPassthrough

Object

否

通过API参数覆盖CSR内容或添加到CA证书中

--CertMaxTime

Integer

否

签发证书的最长时间由CA的certMaxTime指定。单位:天

--Csr

String

否

证书签名请求。可包含CA证书的SubjectDN、CA证书自定义扩展项等。SubjectKeyIdentifier、AuthorityKeyIdentifier、CRLDistributionPoints证书扩展项由CA生成,CSR中的值会被忽略

--InstanceId

String

否

需要启用的外部子CA实例ID

--ResourceGroupId

String

否

资源分组ID

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Validity

String

否

证书有效期。支持使用相对时间和绝对时间。
相对时间:支持单位年、月、日。
年 - y
月 - m
日 - d
绝对时间:使用 GMT 时间。格式:yyyy-MM-dd'T'HH:mm:ss'Z'
指定结束时间 - $NotAfter
指定开始时间和结束时间 - $NotBefore/$NotAfter






CreateRevokeClientCertificate

API 版本:2020-06-30

命令描述

吊销某个客户端证书或服务端证书

语法

aliyun cas CreateRevokeClientCertificate --version 2020-06-30
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

要吊销的客户端证书或服务端证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465990.html查询所有客户端与服务端证书的唯一识别码

CreateRollbackTask

API 版本:2020-04-07

命令描述

部署回滚

语法

aliyun cas CreateRollbackTask --version 2020-04-07
    --JobId <int>
    --WorkerId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID

--WorkerId

Integer

是

部署worker ID

示例

aliyun cas CreateRollbackTask --region cn-hangzhou --WorkerId 4197913 --JobId 436493

CreateRootCACertificate

API 版本:2020-06-30

命令描述

创建一个根CA证书

语法

aliyun cas CreateRootCACertificate --version 2020-06-30
    [--Algorithm <string>]
    [--ClientToken <string>]
    --CommonName <string>
    [--CountryCode <string>]
    --Locality <string>
    --Organization <string>
    --OrganizationUnit <string>
    [--ResourceGroupId <string>]
    --State <string>
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    --Years <int>
    [options]

参数

参数

类型

必填

说明

--Algorithm

String

否

根CA证书的密钥算法类型。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048:对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
ECC_384:对应签名算法为Sha256WithECDSA。
ECC_512:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
根CA证书的加密算法必须与您购买的私有根CA的证书算法一致。示例:如果您购买私有根CA时选择的证书算法为RSA,则根CA证书的密钥算法必须是RSA_1024、RSA_2048或RSA_4096







--ClientToken

String

否

客户端Token,用于保证请求的幂等性。
从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符。
若您未指定,则系统自动使用API请求的RequestId作为ClientToken标识。每次API请求的RequestId可能不一样

--CommonName

String

是

组织机构的通用名称或简称。支持使用中文、英文字符等

--CountryCode

String

否

组织机构所在国家或地区的代码,使用两位大写英文字母缩写表示。例如,CN表示中国,US表示美国。
关于不同国家的代码,请参见https://help.aliyun.com/document_detail/198289.html中的**国际代号**章节

--Locality

String

是

组织机构所在城市的名称。支持使用中文、英文字符等

--Organization

String

是

根CA证书关联的组织机构(对应您的企业或单位)的名称。支持使用中文、英文字符等

--OrganizationUnit

String

是

组织机构下部门或分支的名称。支持使用中文、英文字符等

--ResourceGroupId

String

否

资源分组ID

--State

String

是

组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等。

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Years

Integer

是

根CA证书的有效期,单位:年。
建议设置为5~10年

CreateServerCertificate

API 版本:2020-06-30

命令描述

基于系统自动生成的CSR签发单个服务端证书

语法

aliyun cas CreateServerCertificate --version 2020-06-30
    [--AfterTime <int>]
    --Algorithm <string>
    [--AsynchronousFlag <bool>]
    [--BeforeTime <int>]
    --CommonName <string>
    [--Country <string>]
    [--CustomIdentifier <string>]
    [--Days <int>]
    [--Domain <string>]
    [--EnableCrl <int>]
    [--Immediately <int>]
    [--Locality <string>]
    [--Months <int>]
    [--Organization <string>]
    [--OrganizationUnit <string>]
    --ParentIdentifier <string>
    [--ResourceGroupId <string>]
    [--State <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [--Years <int>]
    [options]

参数

参数

类型

必填

说明

--AfterTime

Integer

否

服务端证书的服务到期时间,使用时间戳格式。单位:秒。
BeforeTime和AfterTime参数必须同为空或者同时设置

--Algorithm

String

是

服务端证书的密钥算法。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048:对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
ECC_384:对应签名算法为Sha256WithECDSA。
ECC_512:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
服务端证书的加密算法必须与子CA证书一致,密钥长度可以不一致。例如:子CA证书的密钥算法为RSA_2048,则服务端证书的密钥算法必须是RSA_1024、RSA_2048、RSA_4096中的一种。
您可以调用https://help.aliyun.com/document_detail/465954.html查询子CA证书的密钥算法








--AsynchronousFlag

Boolean

否

异步处理标识。当传值为“true”时,后端服务将采用异步的方式申请证书。
用户请求后可通过ListClientCertificate接口获取最新证书

--BeforeTime

Integer

否

服务端证书的签发时间,使用时间戳格式,默认为您调用该接口的时间。单位:秒。
BeforeTime和AfterTime参数必须同为空或者同时设置

--CommonName

String

是

表示证书使用者的名称。服务端认证(ServerAuth)证书使用者是服务器,建议填写服务器绑定的域名或IP

--Country

String

否

国家代码,如CN,US

--CustomIdentifier

String

否

用户自定义标识,唯一键

--Days

Integer

否

服务端证书的有效期。单位:天。
Days、BeforeTime、AfterTime参数不能同时为空,并且BeforeTime和AfterTime参数必须同时为空或者同时设置。该参数具体设置说明如下:
当设置Days参数时,您可以选择同时设置BeforeTime、AfterTime参数或者不设置BeforeTime、AfterTime参数。
当不设置Days参数时,您必须设置BeforeTime、AfterTime参数。
当您同时设置Days、BeforeTime、AfterTime参数时,服务端证书的有效期以Days参数的值为准。
服务端证书的有效期不能超过子CA证书的有效期。您可以调用https://help.aliyun.com/document_detail/465954.html查看子CA证书的有效期




--Domain

String

否

服务端证书的扩展域名、扩展IP地址。为证书添加扩展信息后,您可以将证书应用到多个域名、IP地址。
多个域名、IP地址之间需用半角逗号(,)隔开

--EnableCrl

Integer

否

是否包含CRL地址
0 - 否
1 - 是

--Immediately

Integer

否

立即返回数字证书。
0,不返回。默认值。
1,返回证书。
2, 返回证书及其证书链


--Locality

String

否

设置证书组织机构所在城市的名称。支持使用中文、英文字符等。
默认为签发该证书的子CA证书的组织机构所在城市的名称

--Months

Integer

否

证书有效期。单位:月

--Organization

String

否

机构名称,默认:Alibaba Inc

--OrganizationUnit

String

否

部门名称,默认:Aliyun CDN

--ParentIdentifier

String

是

签发该证书的子CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465957.html查询子CA证书的唯一识别码

--ResourceGroupId

String

否

资源组ID。此ID可通过调用https://help.aliyun.com/document_detail/2716559.html接口获取

--State

String

否

设置证书组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等。默认为签发该证书的子CA证书组织机构所在省份、直辖市或自治区的名称。

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Years

Integer

否

证书有效期。单位:年

CreateServerCertificateWithCsr

API 版本:2020-06-30

命令描述

基于自定义的CSR签发单个服务端证书

语法

aliyun cas CreateServerCertificateWithCsr --version 2020-06-30
    [--AfterTime <int>]
    [--Algorithm <string>]
    [--AsynchronousFlag <bool>]
    [--BeforeTime <int>]
    [--CommonName <string>]
    [--Country <string>]
    --Csr <string>
    [--CustomIdentifier <string>]
    [--Days <int>]
    [--Domain <string>]
    [--EnableCrl <int>]
    [--Immediately <int>]
    [--Locality <string>]
    [--Months <int>]
    [--Organization <string>]
    [--OrganizationUnit <string>]
    --ParentIdentifier <string>
    [--ResourceGroupId <string>]
    [--State <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [--Years <int>]
    [options]

参数

参数

类型

必填

说明

--AfterTime

Integer

否

服务端证书的服务到期时间,使用时间戳格式。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时配置

--Algorithm

String

否

服务端证书的密钥算法。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048:对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
ECC_384:对应签名算法为Sha256WithECDSA。
ECC_512:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
服务端证书的加密算法必须与子CA证书一致,密钥长度可以不一致。例如:子CA证书的密钥算法为RSA_2048,则服务端证书的密钥算法必须是RSA_1024、RSA_2048、RSA_4096中的一种。
您可以调用https://help.aliyun.com/document_detail/465954.html查询子CA证书的密钥算法








--AsynchronousFlag

Boolean

否

异步处理标识。当传值为“true”时,后端服务将采用异步的方式申请证书。
用户请求后可通过ListClientCertificate接口获取最新证书

--BeforeTime

Integer

否

服务端证书的签发时间,使用时间戳格式,默认为您调用该接口的时间。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时配置

--CommonName

String

否

设置证书的公用名。支持使用中文、英文字符等。
如果您设置了Csr参数,则CommonName参数取值以Csr参数中的对应信息为准

--Country

String

否

国家代码,例如CN

--Csr

String

是

CSR内容。
您可以通过OpenSSL工具或者Keytool工具生成CSR。更多信息,请参见https://help.aliyun.com/document_detail/42218.html。
您也可以通过SSL证书控制台创建CSR。更多信息,请参见https://help.aliyun.com/document_detail/313297.html。

--CustomIdentifier

String

否

用户自定义标识,唯一键

--Days

Integer

否

服务端证书的有效期。单位:天。
Days、BeforeTime、AfterTime参数不能同时为空,并且BeforeTime、AfterTime参数必须同时为空或者同时设置。该参数具体设置说明如下:
当设置Days参数时,您可以选择同时设置BeforeTime、AfterTime参数或者不设置BeforeTime、AfterTime参数。
当不设置Days参数时,您必须设置BeforeTime、AfterTime参数。
当您同时设置Days、BeforeTime、AfterTime参数时,服务端证书的有效期以Days参数的值为准。
服务端证书的有效期不能超过子CA证书的有效期。您可以调用https://help.aliyun.com/document_detail/465954.html查看子CA证书的有效期




--Domain

String

否

服务端证书的扩展域名或者扩展IP地址。为证书添加扩展信息后,您可以将证书应用到多个域名或者IP地址。
支持同时输入多个域名和IP地址。如果您需要输入多个扩展信息,请用半角逗号(,)将其隔开

--EnableCrl

Integer

否

是否包含CRL地址
0 - 否
1 - 是

--Immediately

Integer

否

立即返回数字证书。
0 , 不返回。默认值。
1,返回证书。
2, 返回证书及其证书链


--Locality

String

否

设置证书组织机构所在城市的名称。支持使用中文、英文字符等。
默认为签发该证书的子CA证书的组织机构所在城市的名称

--Months

Integer

否

证书有效期。单位:月

--Organization

String

否

机构名称,默认:Alibaba Inc

--OrganizationUnit

String

否

部门名称,默认:Aliyun CDN

--ParentIdentifier

String

是

签发该证书的子CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465957.html查询子CA证书的唯一识别码

--ResourceGroupId

String

否

资源分组ID

--State

String

否

设置证书组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等。默认为签发该证书的子CA证书组织机构所在省份、直辖市或自治区的名称。

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签的值(value)

--Years

Integer

否

证书有效期。单位:年

CreateSubCACertificate

API 版本:2020-06-30

命令描述

创建一个子CA证书

语法

aliyun cas CreateSubCACertificate --version 2020-06-30
    --Algorithm <string>
    [--CertMaxTime <int>]
    [--ClientToken <string>]
    --CommonName <string>
    [--CountryCode <string>]
    [--CrlDay <int>]
    [--EnableCrl <bool>]
    [--ExtendedKeyUsages <array>]
    --Locality <string>
    --Organization <string>
    --OrganizationUnit <string>
    [--ParentIdentifier <string>]
    [--PathLenConstraint <int>]
    [--ResourceGroupId <string>]
    --State <string>
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    --Years <int>
    [options]

参数

参数

类型

必填

说明

--Algorithm

String

是

子CA证书的密钥算法类型。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048:对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
子CA证书的加密算法必须与根CA证书一致,密钥长度可以不一致。示例:根CA证书的密钥算法为RSA_2048,则子CA证书的密钥算法必须是RSA_1024、RSA_2048、RSA_4096。
您可以调用https://help.aliyun.com/document_detail/465954.html查询根CA证书的密钥算法






--CertMaxTime

Integer

否

签发证书的最长时间由CA的certMaxTime指定。单位:天

--ClientToken

String

否

用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符

--CommonName

String

是

组织机构的通用名称或简称。支持使用中文、英文字符等

--CountryCode

String

否

组织机构所在国家或地区的代码,使用两位或三位大写英文字母缩写表示。例如,CN表示中国,US表示美国。
关于不同国家的代码,请参见https://help.aliyun.com/document_detail/198289.html中的**国际代号**章节

--CrlDay

Integer

否

CRL有效期 1-365天

--EnableCrl

Boolean

否

是否启用CRL服务
false - 否
true - 是

  • 约束:

    • 允许值:["false", "true"]

--ExtendedKeyUsages

List

否

扩展密钥用法

--Locality

String

是

组织机构所在城市的名称。支持使用中文、英文字符等

--Organization

String

是

子CA证书关联的组织机构(对应您的企业或单位)的名称。支持使用中文、英文字符等

--OrganizationUnit

String

是

组织机构下部门或分支的名称。支持使用中文、英文字符等

--ParentIdentifier

String

否

根CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465957.html查询所有CA证书的唯一识别码

--PathLenConstraint

Integer

否

证书路径长度限制,默认0

--ResourceGroupId

String

否

资源分组ID

--State

String

是

组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等。

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

--Years

Integer

是

子CA证书的有效期,单位:年。
建议设置为5~10年。
子CA证书的有效期不能超过根CA证书的有效期。您可以调用https://help.aliyun.com/document_detail/465954.html查询根CA证书的有效期

CreateWHClientCertificate

API 版本:2020-04-07

命令描述

一般用户证书仓库中,申请签发单个客户端证书

语法

aliyun cas CreateWHClientCertificate --version 2020-04-07
    [--AfterTime <int>]
    [--Algorithm <string>]
    [--BeforeTime <int>]
    [--CommonName <string>]
    [--Country <string>]
    [--Csr <string>]
    [--Days <int>]
    [--Immediately <int>]
    [--Locality <string>]
    [--Months <int>]
    [--Organization <string>]
    [--OrganizationUnit <string>]
    --ParentIdentifier <string>
    [--SanType <int>]
    [--SanValue <string>]
    [--State <string>]
    [--Years <int>]
    [options]

参数

参数

类型

必填

说明

--AfterTime

Integer

否

客户端证书的服务到期时间,使用时间戳格式。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时设置

--Algorithm

String

否

客户端证书的密钥算法。密钥算法使用<加密算法>_<密钥长度>格式表示。取值:
RSA_1024:对应签名算法为Sha256WithRSA。
RSA_2048 :对应签名算法为Sha256WithRSA。
RSA_4096:对应签名算法为Sha256WithRSA。
ECC_256:对应签名算法为Sha256WithECDSA。
ECC_384:对应签名算法为Sha256WithECDSA。
ECC_512:对应签名算法为Sha256WithECDSA。
SM2_256:对应签名算法为SM3WithSM2。
客户端证书的加密算法必须与子CA证书一致,密钥长度可以不一致。例如:子CA证书的密钥算法为RSA_2048,则客户端证书的密钥算法必须是RSA_1024、RSA_2048、RSA_4096中的一种







--BeforeTime

Integer

否

客户端证书的签发时间,使用时间戳格式,默认为您调用该接口的时间。单位:秒。
BeforeTime和AfterTime参数必须同时为空或者同时设置

--CommonName

String

否

客户端证书的公用名。支持使用中文、英文字符等

--Country

String

否

购买证书的用户所属的公司或组织所在的国家

--Csr

String

否

CSR内容。您可以通过OpenSSL工具或者Keytool工具生成CSR

--Days

Integer

否

客户端证书的有效期。单位:天。
Days、BeforeTime、AfterTime参数不能同时为空,并且BeforeTime、AfterTime参数必须同时为空或者同时设置。该参数具体设置说明如下:
当设置Days参数时,您可以选择同时设置BeforeTime、AfterTime参数或者不设置BeforeTime、AfterTime参数。
当不设置Days参数时,您必须设置BeforeTime、AfterTime参数。
当您同时设置Days、BeforeTime、AfterTime参数时,客户端证书的有效期以Days参数的值为准



--Immediately

Integer

否

立即返回数字证书。
0,不返回。默认值。
1,返回证书。
2, 返回证书及其证书链


--Locality

String

否

组织机构所在城市的名称。支持使用中文、英文字符等

--Months

Integer

否

证书有效期。单位:月

--Organization

String

否

根CA证书关联的组织机构(对应您的企业或单位)的名称。支持使用中文、英文字符等

--OrganizationUnit

String

否

证书所属的公司或组织名称

--ParentIdentifier

String

是

签发该证书的子CA证书的唯一识别码

--SanType

Integer

否

客户端证书支持的扩展信息SAN(Subject Alternative Name)类型。取值:
1:表示邮箱。
2:表示域名。
6:表示统一资源标志符URI(Uniform Resource Identifier)。
7:表示IP地址



--SanValue

String

否

客户端证书的具体扩展信息。支持输入多个扩展信息,如果您需要输入多个扩展信息,请用半角逗号(,)将其隔开

--State

String

否

组织机构所在省份、直辖市或自治区的名称。支持使用中文、英文字符等

--Years

Integer

否

证书有效期。单位:年

示例

aliyun cas CreateWHClientCertificate --region cn-hangzhou --ParentIdentifier '273ae6bb538d538c70c01f81jh2****'

CreateWarehouse

API 版本:2020-04-07

命令描述

创建证书仓库

语法

aliyun cas CreateWarehouse --version 2020-04-07
    [--Biz <string>]
    [--Name <string>]
    [--Type <string>]
    [options]

参数

参数

类型

必填

说明

--Biz

String

否

仓库使用场景

--Name

String

否

证书仓库名称

--Type

String

否

证书仓库类型

  • 约束:

    • 允许值:["pcaAuthorityCertificate", "pcaCertificate", "personal", "ssl", "uploadedAuthorityCertificate", "uploadedCertificate"]

示例

aliyun cas CreateWarehouse --region cn-hangzhou --Type pcaCertificate --Biz contract --Name MyCertificateWarehouse

Decrypt

API 版本:2020-04-07

命令描述

本接口一般用于证书仓库中证书解密

语法

aliyun cas Decrypt --version 2020-04-07
    --Algorithm <string>
    [--CertIdentifier <string>]
    --CiphertextBlob <string>
    [--CustomIdentifier <string>]
    [--MessageType <string>]
    [--WarehouseId <int>]
    [options]

参数

参数

类型

必填

说明

--Algorithm

String

是

加密算法,取值:
RSAES_OAEP_SHA_1
RSAES_OAEP_SHA_256
SM2PKE


--CertIdentifier

String

否

证书唯一识别码。该参数可通过调用https://help.aliyun.com/document_detail/455806.html获取。
SSL证书识别码一般为{证书ID}-cn-hangzhou。
PCA证书为对应私有证书的Identifier字段

--CiphertextBlob

String

是

待解密数据。使用Base64编码

--CustomIdentifier

String

否

用户自定义标识,唯一键

--MessageType

String

否

消息类型。取值:
RAW:返回结果为UTF-8编码的原文。
Base64(默认值):返回结果为Base64加密之后的结果

  • 约束:

    • 允许值:["Base64", "RAW"]

--WarehouseId

Integer

否

仓库ID。
此ID可通过调用https://help.aliyun.com/document_detail/455805.html获取

示例

aliyun cas Decrypt --region cn-hangzhou --CiphertextBlob 'ZOyIygCyaOW6Gj****MlNKiuyjfzw=' --Algorithm RSAESOAEPSHA_1

DeleteCertificateRequest

API 版本:2020-04-07

命令描述

删除DV证书申请失败的订单

语法

aliyun cas DeleteCertificateRequest --version 2020-04-07
    --OrderId <int>
    [options]

参数

参数

类型

必填

说明

--OrderId

Integer

是

要删除的证书申请订单的ID。
证书订单ID一般是通过调用https://help.aliyun.com/document_detail/455296.html、https://help.aliyun.com/document_detail/455292.html或https://help.aliyun.com/document_detail/455801.html接口返回的证书申请订单ID(即**OrderId**)。此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取

示例

aliyun cas DeleteCertificateRequest --region cn-hangzhou --OrderId 123451222

DeleteClientCertificate

API 版本:2020-06-30

命令描述

删除已吊销的客户端证书或服务端证书

语法

aliyun cas DeleteClientCertificate --version 2020-06-30
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

要删除的客户端证书或服务端证书的唯一识别码。证书的当前状态必须是REVOKE。
您可以调用https://help.aliyun.com/document_detail/465990.html查询所有客户端证书和服务端证书的唯一识别码和当前状态

DeleteCloudAccess

API 版本:2020-04-07

命令描述

删除授权ak

语法

aliyun cas DeleteCloudAccess --version 2020-04-07
    [--AccessId <string>]
    [options]

参数

参数

类型

必填

说明

--AccessId

String

否

AK主键ID

示例

aliyun cas DeleteCloudAccess --region cn-hangzhou --AccessId 132

DeleteCompany

API 版本:2020-04-07

命令描述

删除公司

语法

aliyun cas DeleteCompany --version 2020-04-07
    --CompanyId <int>
    [options]

参数

参数

类型

必填

说明

--CompanyId

Integer

是

公司 ID

示例

aliyun cas DeleteCompany --region cn-hangzhou --CompanyId 51001

DeleteContact

API 版本:2020-04-07

命令描述

删除联系人

语法

aliyun cas DeleteContact --version 2020-04-07
    --ContactId <int>
    [options]

参数

参数

类型

必填

说明

--ContactId

Integer

是

联系人 ID

示例

aliyun cas DeleteContact --region cn-hangzhou --ContactId 1352570

DeleteCsr

API 版本:2020-04-07

命令描述

如果您不再需要某个CSR,可以将其删除

语法

aliyun cas DeleteCsr --version 2020-04-07
    --CsrId <int>
    [options]

参数

参数

类型

必填

说明

--CsrId

Integer

是

CSR ID

示例

aliyun cas DeleteCsr --region cn-hangzhou --CsrId 3013

DeleteDeploymentJob

API 版本:2020-04-07

命令描述

删除部署任务

语法

aliyun cas DeleteDeploymentJob --version 2020-04-07
    --JobId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

示例

aliyun cas DeleteDeploymentJob --region cn-hangzhou --JobId 8888

DeleteInstance

API 版本:2020-04-07

命令描述

删除实例

语法

aliyun cas DeleteInstance --version 2020-04-07
    [--ClientToken <string>]
    --InstanceId <string>
    [options]

参数

参数

类型

必填

说明

--ClientToken

String

否

用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符

--InstanceId

String

是

实例的ID

示例

aliyun cas DeleteInstance --region cn-hangzhou --InstanceId 'cas-cn-68n1mm16****'

DeletePCACert

API 版本:2020-04-07

命令描述

本接口一般用于删除证书仓库中PCA证书

语法

aliyun cas DeletePCACert --version 2020-04-07
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

证书识别码。可通过https://help.aliyun.com/document_detail/452331.html接口查询

示例

aliyun cas DeletePCACert --region cn-hangzhou --Identifier ccaf0c629c2be1e2ab

DeleteUserCertificate

API 版本:2020-04-07

命令描述

删除已过期、已吊销或上传的证书

语法

aliyun cas DeleteUserCertificate --version 2020-04-07
    --CertId <int>
    [--ClientToken <string>]
    [options]

参数

参数

类型

必填

说明

--CertId

Integer

是

证书ID。
此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取

--ClientToken

String

否

用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符

示例

aliyun cas DeleteUserCertificate --region cn-hangzhou --CertId 7562353

DeleteWarehouse

API 版本:2020-04-07

命令描述

删除证书应用仓库

语法

aliyun cas DeleteWarehouse --version 2020-04-07
    [--WarehouseInstanceId <string>]
    [options]

参数

参数

类型

必填

说明

--WarehouseInstanceId

String

否

证书仓库实例ID

示例

aliyun cas DeleteWarehouse --region cn-hangzhou --WarehouseInstanceId 'cas-wh-Q7ID6V'

DeleteWorkerResource

API 版本:2020-04-07

命令描述

删除部署任务worker(预览)

语法

aliyun cas DeleteWorkerResource --version 2020-04-07
    --JobId <int>
    --WorkerId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

--WorkerId

Integer

是

部署任务Worker ID。此处ID可通过https://help.aliyun.com/document_detail/2712224.html接口获取

示例

aliyun cas DeleteWorkerResource --region cn-hangzhou --WorkerId 13 --JobId 8888

DescribeCACertificate

API 版本:2020-06-30

命令描述

查询CA详情

语法

aliyun cas DescribeCACertificate --version 2020-06-30
    [--Identifier <string>]
    [options]

参数

参数

类型

必填

说明

--Identifier

String

否

要查询的CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465957.html查询所有CA证书的唯一识别码

DescribeCACertificateCount

API 版本:2020-06-30

命令描述

查询已创建的CA证书的数量

语法

aliyun cas DescribeCACertificateCount --version 2020-06-30
    [options]

参数

该命令没有专属参数。CLI 通用选项见“全局选项”。

DescribeCACertificateList

API 版本:2020-06-30

命令描述

查询所有根CA证书和子CA证书的信息

语法

aliyun cas DescribeCACertificateList --version 2020-06-30
    [--CaStatus <string>]
    [--CertType <string>]
    [--CurrentPage <int>]
    [--Identifier <string>]
    [--IssuerType <string>]
    [--ResourceGroupId <string>]
    [--ShowSize <int>]
    [--ValidStatus <string>]
    [options]

参数

参数

类型

必填

说明

--CaStatus

String

否

当前的CA状态,取值:
issue:启用。
forbidden:禁用。
revoke:已吊销


--CertType

String

否

CA的类型 。取值:
root:根CA。
subRoot:子CA。
externalCa:外部导入的CA


--CurrentPage

Integer

否

分页查询时,设置当前页面的页码。默认值为1

--Identifier

String

否

CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/328095.html查询所有CA证书的唯一识别码

--IssuerType

String

否

签发CA的机构。取值:
local:私有证书。
iTrusChina: 合规CA。
external:外部导入


--ResourceGroupId

String

否

资源组ID。此ID可通过调用https://help.aliyun.com/document_detail/2716559.html接口获取

--ShowSize

Integer

否

分页查询时,设置每页包含CA证书的数量。默认值为20

--ValidStatus

String

否

CA时间状态。取值:
valid:表示CA处于有效期内。
notValid:表示CA已过期

DescribeCertificatePrivateKey

API 版本:2020-06-30

命令描述

获取单个客户端证书或服务端证书的私钥(加密格式)

语法

aliyun cas DescribeCertificatePrivateKey --version 2020-06-30
    --EncryptedCode <string>
    --Identifier <string>
    [--ResourceGroupId <string>]
    [options]

参数

参数

类型

必填

说明

--EncryptedCode

String

是

设置用于加密私钥的密码。支持使用英文大小写字母、数字、特殊字符(例如,,.+-_#)等。最大长度为32字节。
<warning> 请记住您设置的密码,后续您需要使用该密码为私钥(加密格式)解密。如果您忘记了已设置的私钥密码,则本次调用获取的私钥(加密格式)将无法解密,您必须重新调用本接口。
</warning>

--Identifier

String

是

要获取私钥的客户端证书或服务端证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465990.html查询所有客户端与服务端证书的唯一识别码。
END_ENTITY 类型证书不被本接口支持(传入返回 NotFound),
部分 CLIENT/SERVER 证书因隔离策略不允许私钥导出(返回 OperationDenied.NotSupport),建议调用方在 ListClientCertificate 响应中按 CertificateType 过滤 END_ENTITY 后再调用


--ResourceGroupId

String

否

证书所属资源组的ID

DescribeCertificateState

API 版本:2020-04-07

命令描述

查询指定的证书申请订单的状态

语法

aliyun cas DescribeCertificateState --version 2020-04-07
    --OrderId <int>
    [options]

参数

参数

类型

必填

说明

--OrderId

Integer

是

要查询的证书申请订单的ID。
此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取。
需先在控制台购买证书资源包,再通过 CreateCertificateForPackageRequest 创建证书申请,然后使用 ListUserCertificateOrder(OrderType=CPACK 或 BUY)获取 OrderId,并明确区分 OrderId 与 CertificateId

示例

aliyun cas DescribeCertificateState --region cn-hangzhou --OrderId 123451222

DescribeClientCertificate

API 版本:2020-06-30

命令描述

通过证书的唯一识别码查询单个客户端证书或服务端证书的详细信息

语法

aliyun cas DescribeClientCertificate --version 2020-06-30
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

要查询的客户端证书或服务端证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465990.html查询所有客户端证书和服务端证书的唯一识别码

DescribeClientCertificateForSerialNumber

API 版本:2020-06-30

命令描述

通过证书的序列号批量查询客户端证书或服务端证书的详细信息

已弃用:true

语法

aliyun cas DescribeClientCertificateForSerialNumber --version 2020-06-30
    --SerialNumber <string>
    [options]

参数

参数

类型

必填

说明

--SerialNumber

String

是

要查询的客户端证书或服务端证书的序列号。多个序列号之间使用半角逗号(,)分隔。
您可以调用https://help.aliyun.com/document_detail/330884.html查询所有客户端证书和服务端证书的序列号

DescribeClientCertificateStatus

API 版本:2020-06-30

命令描述

通过证书的唯一识别码查询客户端证书和服务端证书的状态信息

语法

aliyun cas DescribeClientCertificateStatus --version 2020-06-30
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

要查询的客户端证书或服务端证书的唯一识别码。多个证书识别码之间使用半角逗号(,)分隔。
您可以调用https://help.aliyun.com/document_detail/465990.html查询所有客户端与服务端证书的唯一识别码

DescribeClientCertificateStatusForSerialNumber

API 版本:2020-06-30

命令描述

通过证书的序列号查询客户端证书和服务端证书的状态信息

语法

aliyun cas DescribeClientCertificateStatusForSerialNumber --version 2020-06-30
    --SerialNumber <string>
    [options]

参数

参数

类型

必填

说明

--SerialNumber

String

是

要查询的客户端证书或服务端证书的序列号。多个证书序列号之间使用半角逗号(,)分隔。
您可以调用https://help.aliyun.com/document_detail/330884.html查询所有客户端与服务端证书的序列号

DescribeCloudResourceStatus

API 版本:2020-04-07

命令描述

您可通过本接口获取通过多云部署任务,部署证书到三方云产品的资源数

语法

aliyun cas DescribeCloudResourceStatus --version 2020-04-07
    [--SecretId <string>]
    [options]

参数

参数

类型

必填

说明

--SecretId

String

否

云资源集访问的密钥ID。
此ID可通过调用https://help.aliyun.com/document_detail/2712219.html获取

示例

aliyun cas DescribeCloudResourceStatus --region cn-hangzhou --SecretId 'AKID9AHG6iCZlncN7yPmOsQ1X******'

DescribeDeploymentJob

API 版本:2020-04-07

命令描述

通过CreateDeploymentJob创建部署任务后会获取任务ID,您可以通过该任务ID调用本接口获取部署任务详情

语法

aliyun cas DescribeDeploymentJob --version 2020-04-07
    --JobId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

示例

aliyun cas DescribeDeploymentJob --region cn-hangzhou --JobId 8888

DescribeDeploymentJobStatus

API 版本:2020-04-07

命令描述

获取部署任务下的Worker任务数

语法

aliyun cas DescribeDeploymentJobStatus --version 2020-04-07
    [--JobId <int>]
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

否

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

示例

aliyun cas DescribeDeploymentJobStatus --region cn-hangzhou --JobId 8888

DescribePackageState

API 版本:2020-04-07

命令描述

查询已经购买的DV证书总数和使用情况

语法

aliyun cas DescribePackageState --version 2020-04-07
    [--ProductCode <string>]
    [options]

参数

参数

类型

必填

说明

--ProductCode

String

否

要查询的证书资源包的规格(即证书规格)。取值:
digicert-free-1-free(默认):表示3个月个人测试证书(免费版)。仅中国站。
symantec-free-1-free:表示12个月的个人测试证书(pro)。仅中国站。
symantec-dv-1-starter:表示DigiCert DV通配符域名证书。
symantec-ov-1-personal:表示DigiCert OV单域名证书。
symantec-ov-w-personal:表示DigiCert OV通配符域名证书。
geotrust-dv-1-starter:表示GeoTrust DV单域名证书。
geotrust-dv-w-starter:表示GeoTrust DV通配符域名证书。
geotrust-ov-1-personal:表示GeoTrust OV单域名证书。
geotrust-ov-w-personal:表示GeoTrust OV通配符域名证书。
globalsign-dv-1-personal:表示GlobalSign DV单域名证书。
globalsign-dv-w-advanced:表示GlobalSign DV通配符域名证书。
globalsign-ov-1-personal:表示GlobalSign OV单域名证书。
globalsign-ov-w-advanced:表示GlobalSign OV通配符域名证书。
cfca-ov-1-personal:表示CFCA OV单域名证书(仅中国站)。
cfca-ev-w-advanced:表示CFCA OV通配符域名证书(仅中国站)














示例

aliyun cas DescribePackageState --region cn-hangzhou --ProductCode 'digicert-free-1-free'

DescribePcaAndExternalCACertificateList

API 版本:2020-06-30

命令描述

返回用户所有CaCertificate,包括PCA内部产生的与导入的外部证书

语法

aliyun cas DescribePcaAndExternalCACertificateList --version 2020-06-30
    [--CurrentPage <int>]
    [--Identifiers <string>]
    [--KeyWord <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

当前页码

--Identifiers

String

否

证书标识。多个标识间英文逗号间隔

--KeyWord

String

否

查询关键字。支持通过名称、域名、SANS模糊查询

--ShowSize

Integer

否

指定每页显示多少条记录。默认值为50

DescribeWarehouseCert

API 版本:2020-04-07

命令描述

查询仓库证书详情

语法

aliyun cas DescribeWarehouseCert --version 2020-04-07
    [--CertIdentifier <string>]
    [options]

参数

参数

类型

必填

说明

--CertIdentifier

String

否

证书唯一标识

示例

aliyun cas DescribeWarehouseCert --region cn-hangzhou --CertIdentifier '1ef1da5f-38ed-69b3-****-037781890265'

Encrypt

API 版本:2020-04-07

命令描述

本接口一般用于证书仓库中证书加密

语法

aliyun cas Encrypt --version 2020-04-07
    --Algorithm <string>
    [--CertIdentifier <string>]
    [--CustomIdentifier <string>]
    [--MessageType <string>]
    --Plaintext <string>
    [--WarehouseId <int>]
    [options]

参数

参数

类型

必填

说明

--Algorithm

String

是

加密算法,取值:
RSAES_OAEP_SHA_1
RSAES_OAEP_SHA_256
SM2PKE


--CertIdentifier

String

否

证书唯一识别码。该参数可通过调用https://help.aliyun.com/document_detail/455806.html获取。
SSL证书识别码一般为{证书ID}-cn-hangzhou。
PCA证书为对应私有证书的Identifier字段

--CustomIdentifier

String

否

用户自定义标识,唯一键

--MessageType

String

否

消息类型。取值:
RAW(默认值):将会对Plaintext直接加密操作。
Base64:Plaintext为base64编码格式,将会对Plaintext base64解密之后再进行加密操作

  • 约束:

    • 允许值:["Base64", "RAW"]

--Plaintext

String

是

待加密数据。
可以是原文,也可以对原文进行Base64。具体参考MessageType字段。
如果使用Base64编码,例如:待加密数据的十六进制内容为[0x31, 0x32, 0x33, 0x34],则对应的Base64编码为MTIzNA==。
Plaintext数据大小限制根据Algorithm的取值有所不同,具体如下:
RSAES_OAEP_SHA_1:214字节。
RSAES_OAEP_SHA_256:190字节。
SM2PKE:6047字节





--WarehouseId

Integer

否

仓库ID。
此ID可通过调用https://help.aliyun.com/document_detail/455805.html获取

示例

aliyun cas Encrypt --region cn-hangzhou --Plaintext '1234***' --Algorithm RSAESOAEPSHA_1

GetAssetCount

API 版本:2020-04-07

命令描述

统计资产数量

语法

aliyun cas GetAssetCount --version 2020-04-07
    [options]

参数

该命令没有专属参数。CLI 通用选项见“全局选项”。

示例

aliyun cas GetAssetCount --region cn-hangzhou

GetCAInstanceStatus

API 版本:2020-06-30

命令描述

查询您通过SSL证书服务控制台购买的私有根CA实例或私有子CA实例的状态信息

语法

aliyun cas GetCAInstanceStatus --version 2020-06-30
    [--Identifier <string>]
    [--InstanceId <string>]
    [options]

参数

参数

类型

必填

说明

--Identifier

String

否

要查询的客户端证书或服务端证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/330884.html查询所有客户端证书和服务端证书的唯一识别码。
「注意:InstanceId 与 Identifier 至少须提供一个,未同时指定时 API 返回 400 MissingParameter.instanceId/identifier。」
「通过传入客户端证书或服务端证书的 Identifier,可查询签发该证书的私有 CA 实例的状态信息。」


--InstanceId

String

否

要查询的私有CA实例的ID。
您在数字证书管理服务控制台 (https://yundun.console.aliyun.com/?p=cas#/pca/rootlist)购买私有CA实例后,可以在私有证书页面,通过查看私有CA实例的详情,获取私有CA实例的ID。
「注意:InstanceId 与 Identifier 至少须提供一个,未同时指定时 API 返回 400 MissingParameter.instanceId/identifier。」

GetCaInstanceCrlAddress

API 版本:2020-06-30

命令描述

获取ca的crl地址

语法

aliyun cas GetCaInstanceCrlAddress --version 2020-06-30
    [--CaIdentifier <string>]
    [--Uuid <string>]
    [options]

参数

参数

类型

必填

说明

--CaIdentifier

String

否

CA证书标识

--Uuid

String

否

cas实例所在的可用区id

GetCertWarehouseQuota

API 版本:2020-04-07

命令描述

调用证书应用仓库签名、验签、加密和解密API时,会消耗API调用次数,API调用次数消耗完时,您将无法再调用相应的API。本接口一般用于查询证书仓库额度

语法

aliyun cas GetCertWarehouseQuota --version 2020-04-07
    [options]

参数

该命令没有专属参数。CLI 通用选项见“全局选项”。

示例

aliyun cas GetCertWarehouseQuota --region cn-hangzhou

GetCertificateDetail

API 版本:2020-04-07

命令描述

查询证书详情,不返回证书内容和私钥内容

语法

aliyun cas GetCertificateDetail --version 2020-04-07
    --CertificateId <int>
    [options]

参数

参数

类型

必填

说明

--CertificateId

Integer

是

证书ID

示例

aliyun cas GetCertificateDetail --region cn-hangzhou --CertificateId 18594156

GetCertificatePackageCount

API 版本:2020-04-07

命令描述

获取证书资源包数量

语法

aliyun cas GetCertificatePackageCount --version 2020-04-07
    [options]

参数

该命令没有专属参数。CLI 通用选项见“全局选项”。

示例

aliyun cas GetCertificatePackageCount --region cn-hangzhou

GetCompany

API 版本:2020-04-07

命令描述

获取Company

语法

aliyun cas GetCompany --version 2020-04-07
    --CompanyId <int>
    [options]

参数

参数

类型

必填

说明

--CompanyId

Integer

是

公司 ID

示例

aliyun cas GetCompany --region cn-hangzhou --CompanyId 51001

GetContact

API 版本:2020-04-07

命令描述

获取Contact

语法

aliyun cas GetContact --version 2020-04-07
    --ContactId <int>
    [options]

参数

参数

类型

必填

说明

--ContactId

Integer

是

联系人 ID。
该参数实际必填,缺失时返回 MissingParameter(400)

示例

aliyun cas GetContact --region cn-hangzhou --ContactId 1397591

GetCsrDetail

API 版本:2020-04-07

命令描述

通过CreateCsr接口创建CSR后会返回CsrId,您可以通过CsrId直接获取CSR内容

语法

aliyun cas GetCsrDetail --version 2020-04-07
    --CsrId <int>
    [options]

参数

参数

类型

必填

说明

--CsrId

Integer

是

CSR唯一标识。通过CreateCsr接口创建CSR或使用UploadCsr接口上传CSR后会自动生成CsrId。您可以通过ListCsr接口查询CSR列表获取CsrId,ListCsr接口说明,请参见https://help.aliyun.com/document_detail/2709717.html

示例

aliyun cas GetCsrDetail --region cn-hangzhou --CsrId 3924

GetInstanceDetail

API 版本:2020-04-07

命令描述

查询实例详情

语法

aliyun cas GetInstanceDetail --version 2020-04-07
    --InstanceId <string>
    [options]

参数

参数

类型

必填

说明

--InstanceId

String

是

实例的ID

示例

aliyun cas GetInstanceDetail --region cn-hangzhou --InstanceId 'cas_dv-cn-123'

GetInstanceSummary

API 版本:2020-04-07

命令描述

实例统计

语法

aliyun cas GetInstanceSummary --version 2020-04-07
    [--InstanceType <string>]
    [options]

参数

参数

类型

必填

说明

--InstanceType

String

否

实例类型,BUY:正式证书;TEST:测试证书

示例

aliyun cas GetInstanceSummary --region cn-hangzhou --InstanceType TEST

GetMatchedResources

API 版本:2020-04-07

命令描述

获取匹配的资源

语法

aliyun cas GetMatchedResources --version 2020-04-07
    --CertIds <string>
    [--MaxResults <int>]
    [--NextToken <string>]
    [--ResourceScope <string>]
    [options]

参数

参数

类型

必填

说明

--CertIds

String

是

证书IDs

--MaxResults

Integer

否

由于资源匹配数过于庞大,后端采用聚合形式,所以暂时不支持分页,此参数为预留参数。当前默认最多返回2000条

--NextToken

String

否

由于资源匹配数过于庞大,后端采用聚合形式,所以暂时不支持分页,此参数为预留参数

--ResourceScope

String

否

资源匹配范围,可为空

示例

aliyun cas GetMatchedResources --region cn-hangzhou --CertIds 19736665

GetRiskCount

API 版本:2020-04-07

命令描述

统计风险资产数量

语法

aliyun cas GetRiskCount --version 2020-04-07
    [options]

参数

该命令没有专属参数。CLI 通用选项见“全局选项”。

示例

aliyun cas GetRiskCount --region cn-hangzhou

GetTaskAttribute

API 版本:2020-04-07

命令描述

申请证书提交结果查询

语法

aliyun cas GetTaskAttribute --version 2020-04-07
    --TaskId <string>
    [--TaskType <string>]
    [options]

参数

参数

类型

必填

说明

--TaskId

String

是

实例id。
此参数为 ApplyCertificate 异步任务返回的任务标识符(调用 ApplyCertificate 后从响应 TaskId 字段获取)

--TaskType

String

否

ApplyCertificate异步任务提交结果查询,默认入参ApplyCertificate

示例

aliyun cas GetTaskAttribute --region cn-hangzhou --TaskId 123

GetUserCertificateDetail

API 版本:2020-04-07

命令描述

本接口一般用于获取证书详情,包含基本信息和公私钥内容。可以通过该接口下载证书内容和私钥

语法

aliyun cas GetUserCertificateDetail --version 2020-04-07
    [--CertFilter <bool>]
    --CertId <int>
    [options]

参数

参数

类型

必填

说明

--CertFilter

Boolean

否

值为true时,Cert、Key、EncryptCert、EncryptPrivateKey、SignCert、SignPrivateKey信息不返回,false时则返回,默认是false

--CertId

Integer

是

证书ID。
此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取

示例

aliyun cas GetUserCertificateDetail --region cn-hangzhou --CertId 6055048

ListAllEndEntityInstance

API 版本:2020-06-30

命令描述

查询终端实例

语法

aliyun cas ListAllEndEntityInstance --version 2020-06-30
    [--CurrentPage <int>]
    [--MaxResults <int>]
    [--NextToken <string>]
    [--ParentId <int>]
    [--RecursiveChildren <int>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

实例列表的页码

--MaxResults

Integer

否

本次读取的最大数据量

  • 约束:

    • 最大值:1000

    • 最小值:0

--NextToken

String

否

下一个查询开始Token,NextToken为空说明没有下一个

--ParentId

Integer

否

父实例id。
该参数实际为必填项,未提供时 API 返回 MissingParameter.ParentId(400)。
该整数 ID 对应的资源类型及获取方式(控制台列表)

--RecursiveChildren

Integer

否

指定显示返回结果中的收费类型信息,取值:-0:不返回。-1:返回

--ShowSize

Integer

否

分页查询时,显示的每页数据的最大条数

ListAssetCount

API 版本:2020-04-07

命令描述

查询云产品资源统计列表

语法

aliyun cas ListAssetCount --version 2020-04-07
    [--CurrentPage <int>]
    [--EndDate <int>]
    [--ShowSize <int>]
    [--StartDate <int>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页,当前页,默认1

--EndDate

Integer

否

证书到期日期(秒,时间戳格式)

--ShowSize

Integer

否

分页,每页展示数据量

--StartDate

Integer

否

证书签发日期(秒,时间戳格式)

示例

aliyun cas ListAssetCount --region cn-hangzhou --StartDate 1767202200000 --CurrentPage 1 --ShowSize 1 --EndDate 1767807000000

ListCACertificateLog

API 版本:2020-06-30

命令描述

查询CA证书的操作日志

语法

aliyun cas ListCACertificateLog --version 2020-06-30
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

要查询的CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/328095.html查询所有CA证书的唯一识别码

ListCert

2020-06-30

命令描述

获取证书列表

语法
aliyun cas ListCert --version 2020-06-30
    [--AfterDate <string>]
    [--BeforeDate <string>]
    [--CurrentPage <int>]
    [--InstanceUuid <string>]
    [--MaxResults <int>]
    [--NextToken <string>]
    [--ParentIdentifier <string>]
    [--ShowSize <int>]
    [--Status <string>]
    [--Type <string>]
    [options]
参数

参数

类型

必填

说明

--AfterDate

String

否

证书绑定的主机记录(YYYY-MM-DD)

--BeforeDate

String

否

证书的修改时间(YYYY-MM-DD)

--CurrentPage

Integer

否

当前页的页码

--InstanceUuid

String

否

实例的uuid

--MaxResults

Integer

否

本次读取的最大数据量

--NextToken

String

否

下一个查询开始Token,NextToken为空说明没有下一个

--ParentIdentifier

String

否

签发证书的中间CA标识。您可以调用https://help.aliyun.com/document_detail/465957.html查询CA证书的唯一识别码。
该参数实际为必填项,未提供时 API 返回 MissingParameter.CaIdentifier(400),其中 CaIdentifier 即对应 ParentIdentifier。
需要先调用 DescribeCACertificateList 获取 CA 标识,并将其作为 ParentIdentifier 传入

--ShowSize

Integer

否

证书的总大小。单位:字节

--Status

String

否

证书状态。取值:
ISSUE:正常。
REVOKE:已吊销

--Type

String

否

证书类型。取值:
SERVER:服务端证书。
CLIENT:客户端证书。
END_ENTITY:终端证书


2020-04-07

命令描述

本接口一般用于查询证书仓库中的证书

语法
aliyun cas ListCert --version 2020-04-07
    [--CertType <string>]
    [--CurrentPage <int>]
    [--Identifiers <string>]
    [--KeyWord <string>]
    [--ShowSize <int>]
    [--SourceType <string>]
    [--Status <string>]
    [--WarehouseId <int>]
    [options]
参数

参数

类型

必填

说明

--CertType

String

否

证书的类型 。取值:
CA:表示CA证书。
CERT:表示签发的证书

--CurrentPage

Integer

否

分页。当前页,默认1

--Identifiers

String

否

证书标识,多个标识之间英文逗号间隔

--KeyWord

String

否

查询关键字。支持通过名称、域名、SANS模糊查询

--ShowSize

Integer

否

分页,每页展示数据大小,默认50条

--SourceType

String

否

证书来源,取值:
upload:上传证书
aliyun:阿里云证书

--Status

String

否

证书状态,取值:
ISSUE: 已签发
REVOKE: 吊销

--WarehouseId

Integer

否

仓库ID。可通过https://help.aliyun.com/document_detail/453246.html接口查询

示例
aliyun cas ListCert --region cn-hangzhou --Status ISSUE --CurrentPage 1 --KeyWord test_name --SourceType aliyun --CertType CERT --ShowSize 50 --WarehouseId 12 --Identifiers 'aaa,bbb'

ListCertWarehouse

API 版本:2020-04-07

命令描述

本接口一般用于查询证书仓库列表

语法

aliyun cas ListCertWarehouse --version 2020-04-07
    [--CurrentPage <int>]
    [--InstanceId <string>]
    [--Name <string>]
    [--ShowSize <int>]
    [--Type <string>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页,当前页,默认1

--InstanceId

String

否

仓库实例

--Name

String

否

仓库名称,支持模糊查询

--ShowSize

Integer

否

分页,每页展示数据大小,默认50

--Type

String

否

仓库类型,取值:
**uploadCA **:上传的CA证书,即包含完整证书链的CA证书。
**uploadPCA **:上传的证书,包括自签证书、第三方签发的证书或阿里云签发的证书等。
**aliyunPCA **:阿里云PCA证书


示例

aliyun cas ListCertWarehouse --region cn-hangzhou --Type aliyunPCA --InstanceId 14dcc8afc7578e1f --CurrentPage 1 --ShowSize 50 --Name name

ListCertificates

API 版本:2020-04-07

命令描述

获取证书列表

语法

aliyun cas ListCertificates --version 2020-04-07
    [--CertificateSource <string>]
    [--CertificateStatus <string>]
    [--CurrentPage <int>]
    [--InstanceId <string>]
    [--Keyword <string>]
    [--ResourceGroupId <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CertificateSource

String

否

证书来源。
BUY 正式证书。
TEST 测试证书。
UPLOAD 上传证书


--CertificateStatus

String

否

证书的状态
issued:已签发
revoked:已吊销
willExpire:即将过期
expired:已过期



--CurrentPage

Integer

否

当前页的页码

--InstanceId

String

否

实例的 ID

--Keyword

String

否

模糊查询,匹配域名、名称和对应的资源ID

--ResourceGroupId

String

否

资源组id

--ShowSize

Integer

否

分页数据,默认为10,最大为100

示例

aliyun cas ListCertificates --region cn-hangzhou --CertificateSource BUY --Keyword test --ResourceGroupId 'rg-aek****wia' --InstanceId 'cas-ivauto-hqito6' --CurrentPage 1 --CertificateStatus issued --ShowSize 10

ListClientCertificate

API 版本:2020-06-30

命令描述

查询所有客户端证书和服务端证书的详细信息

语法

aliyun cas ListClientCertificate --version 2020-06-30
    [--CurrentPage <int>]
    [--Identifier <string>]
    [--ResourceGroupId <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页查询时,设置当前页面的页码。默认值为1

--Identifier

String

否

要查询的客户端证书或服务端证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/330884.html查询所有客户端证书和服务端证书的唯一识别码

--ResourceGroupId

String

否

资源组ID。此ID可通过调用https://help.aliyun.com/document_detail/2716559.html接口获取

--ShowSize

Integer

否

分页查询时,设置每页显示证书的数量。默认值为20

ListCloudAccess

API 版本:2020-04-07

命令描述

多云部署获取AK列表

语法

aliyun cas ListCloudAccess --version 2020-04-07
    [--CloudName <string>]
    [--CurrentPage <int>]
    [--SecretId <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CloudName

String

否

云服务供应商。目前仅支持腾讯云(Tencent)

--CurrentPage

Integer

否

分页,当前页,默认1

--SecretId

String

否

云资源集访问的密钥ID

--ShowSize

Integer

否

分页查询时,设置每页显示证书的数量。可选10、20、50

示例

aliyun cas ListCloudAccess --region cn-hangzhou --CurrentPage 1 --SecretId 276 --CloudName Tencent --ShowSize 20

ListCloudResources

API 版本:2020-04-07

命令描述

您可以通过本接口获取云厂商及对应云产品的资源列表

语法

aliyun cas ListCloudResources --version 2020-04-07
    [--CertIds <array>]
    [--CloudName <string>]
    [--CloudProduct <string>]
    [--CurrentPage <int>]
    [--Keyword <string>]
    [--SecretId <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CertIds

List

否

根据证书ID过滤

--CloudName

String

否

根据云厂商过滤

  • 约束:

    • 允许值:["Aws", "Huawei", "Tencent", "aliyun"]

--CloudProduct

String

否

根据云产品过滤。
阿里云:
SLB:传统型负载均衡 CLB(仅中国站)
LIVE:视频直播(仅中国站)
webHosting:云虚拟主机(仅中国站)
VOD:视频点播(仅中国站)
CR:容器镜像服务(仅中国站)
DCDN:全站加速
DDoS:DDos 防护
CDN:内容分发网络
ALB:应用负载均衡
APIGateway:API 网关
FC:函数计算
GA:全球加速
MSE:微服务引擎
NLB:网络型负载均衡
OSS:对象存储
SAE:Serverless 应用引擎
WAF:Web 应用防火墙
腾讯云:
TencentCDN:腾讯云 CDN
TencentCLB:腾讯云 负载均衡
TencentWAF:腾讯云 Web应用防火墙
华为云:
HuaweiCDN:华为云 CDN
亚马逊:
AwsCloudFront:亚马逊 CloudFront
AwsCLB:亚马逊 CLB
AwsALB:亚马逊 ALB
AwsNLB:亚马逊 NLB




























--CurrentPage

Integer

否

分页查询时,设置当前页面的页码。默认值为1

--Keyword

String

否

根据云资源绑定域名或实例ID关键字过滤

--SecretId

String

否

根据云资源访问密钥ID过滤

--ShowSize

Integer

否

分页查询时,设置每页包含的资源数量。默认值为20

示例

aliyun cas ListCloudResources --region cn-hangzhou --CertIds '[14440149]' --Keyword 'cert-instanceId' --CurrentPage 1 --SecretId 'AK96*******6M' --CloudName aliyun --ShowSize 20 --CloudProduct SLB

ListCompanies

API 版本:2020-04-07

命令描述

获取公司列表

语法

aliyun cas ListCompanies --version 2020-04-07
    [--CompanyId <int>]
    [--CurrentPage <int>]
    [--Keyword <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CompanyId

Integer

否

公司 ID

--CurrentPage

Integer

否

分页,当前页,默认 1

--Keyword

String

否

搜索关键词。例如公司名称、省份和国家代码以及城市的关键字

--ShowSize

Integer

否

分页查询时,设置每页显示联系人的个数

示例

aliyun cas ListCompanies --region cn-hangzhou --Keyword test --CompanyId 51001 --CurrentPage 1 --ShowSize 20

ListContact

API 版本:2020-04-07

命令描述

获取联系人列表

语法

aliyun cas ListContact --version 2020-04-07
    [--CurrentPage <int>]
    [--Keyword <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页,当前页,默认1

--Keyword

String

否

搜索关键词。例如姓名、邮箱和电话中的关键字

--ShowSize

Integer

否

分页查询时,设置每页显示联系人的个数

示例

aliyun cas ListContact --region cn-hangzhou --Keyword 186 --CurrentPage 1 --ShowSize 20

ListCsr

API 版本:2020-04-07

命令描述

查询CSR列表信息及CSR详细信息

语法

aliyun cas ListCsr --version 2020-04-07
    [--Algorithm <string>]
    [--CurrentPage <int>]
    [--KeyWord <string>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--Algorithm

String

否

CSR使用的密钥算法,取值:RSA、ECC、SM2

  • 约束:

    • 允许值:["ECC", "RSA", "SM2"]

--CurrentPage

Integer

否

当前页码

--KeyWord

String

否

主域名或者CSR名称关键字

--ShowSize

Integer

否

分页,每页展示数据量

示例

aliyun cas ListCsr --region cn-hangzhou --CurrentPage 1 --KeyWord test_name --ShowSize 10 --Algorithm RSA

ListDeploymentJob

API 版本:2020-04-07

命令描述

创建部署任务后,您可以通过该接口获取部署任务列表

语法

aliyun cas ListDeploymentJob --version 2020-04-07
    [--CertId <int>]
    [--CurrentPage <int>]
    [--InstanceId <string>]
    [--JobType <string>]
    [--ShowSize <int>]
    [--Status <string>]
    [options]

参数

参数

类型

必填

说明

--CertId

Integer

否

证书ID。
此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取

--CurrentPage

Integer

否

分页。当前页,默认1

--InstanceId

String

否

实例的ID

--JobType

String

否

任务类型

  • 约束:

    • 允许值:["cloud", "user"]

--ShowSize

Integer

否

分页查询时,设置每页显示证书的数量。默认值为50

--Status

String

否

部署任务状态

  • 约束:

    • 允许值:["editing", "error", "pending", "processing", "scheduling", "success"]

示例

aliyun cas ListDeploymentJob --region cn-hangzhou --Status pending --JobType user --CurrentPage 1 --InstanceId 'cas-ivauto-hqito6' --CertId 23982365 --ShowSize 50

ListDeploymentJobCert

API 版本:2020-04-07

命令描述

创建部署任务后,可通过本接口获取部署到云产品的证书基本信息,例如证书实例ID、证书类型、证书名称等

语法

aliyun cas ListDeploymentJobCert --version 2020-04-07
    --JobId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

示例

aliyun cas ListDeploymentJobCert --region cn-hangzhou --JobId 8888

ListDeploymentJobResource

API 版本:2020-04-07

命令描述

任务在未完成执行状态时,获取部署任务关联的云产品资源列表。返回空列表表示关联的资源列表已经失效,需要重新关联。任务已经完成状态,资源发生变化时该列表返回空

语法

aliyun cas ListDeploymentJobResource --version 2020-04-07
    --JobId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID

示例

aliyun cas ListDeploymentJobResource --region cn-hangzhou --JobId 8888

ListInstances

API 版本:2020-04-07

命令描述

获取实例列表

语法

aliyun cas ListInstances --version 2020-04-07
    [--AutoReissueFlag <int>]
    [--Brand <string>]
    [--CertificateStatus <string>]
    [--CertificateType <string>]
    [--CurrentPage <int>]
    [--InstanceType <string>]
    [--Keyword <string>]
    [--ResourceGroupId <string>]
    [--ServerDeployFlag <int>]
    [--ShowSize <int>]
    [--Status <string>]
    [--VersionType <string>]
    [options]

参数

参数

类型

必填

说明

--AutoReissueFlag

Integer

否

1:已托管
0:未托管

--Brand

String

否

CA品牌。WoSign、CFCA、DigiCert、GeoTrust、GlobalSign、vTrus、Alibaba

  • 约束:

    • 允许值:["Aliyun", "CFCA", "DigiCert", "GeoTrust", "Geotrust", "GlobalSign", "Rapid", "SHECA", "WoSign", "vTrus"]

--CertificateStatus

String

否

证书的状态。
issued:已签发
revoked:已吊销
willExpire:即将过期
expired:已过期



  • 约束:

    • 允许值:["expired", "issued", "revoked", "willExpire"]

--CertificateType

String

否

证书的类型。取值:DV、OV、EV

  • 约束:

    • 允许值:["DV", "EV", "OV"]

--CurrentPage

Integer

否

分页查询时,设置当前页面的页码。默认值为1

--InstanceType

String

否

实例类型,BUY:正式证书;TEST:测试证书

  • 约束:

    • 允许值:["BUY", "TEST"]

--Keyword

String

否

模糊查询,匹配域名、名称实例或对应的资源ID

--ResourceGroupId

String

否

资源组id

--ServerDeployFlag

Integer

否

是否返回仅符合服务器部署条件实例。
1:是
0:否

--ShowSize

Integer

否

分页查询时,设置每页显示实例的数量。默认值为10,最大为100

--Status

String

否

实例状态。
inactive:待使用
pending:审核中,最新证书提交审核中
willExpire:实例即将过期
expired:实例已经过期
refund:已退款
normal:正常
closed:已关闭,不可使用






--VersionType

String

否

版本类型,取值有: 基础版basic、标准版standard、专业版professional、旗舰版ultimate

示例

aliyun cas ListInstances --region cn-hangzhou --Status inactive --Brand Digicert --CertificateType DV --AutoReissueFlag 1 --Keyword test --ResourceGroupId 'rg-ae******4wia' --CurrentPage 1 --CertificateStatus issued --ShowSize 10 --ServerDeployFlag 1 --InstanceType BUY --VersionType professional

ListPcaCaCertificate

API 版本:2020-06-30

命令描述

查询私有CA机构证书

语法

aliyun cas ListPcaCaCertificate --version 2020-06-30
    [--MaxResults <int>]
    [--NextToken <string>]
    [options]

参数

参数

类型

必填

说明

--MaxResults

Integer

否

分页参数:结果集的最大数量,默认值为20。
取值范围:1~2000

--NextToken

String

否

分页参数:页面令牌。请求置空表示从头开始。返回为空时表示最后一页

ListRevokeCertificate

API 版本:2020-06-30

命令描述

查询所有已被吊销的客户端证书和服务端证书的详细信息

语法

aliyun cas ListRevokeCertificate --version 2020-06-30
    [--CurrentPage <int>]
    [--ShowSize <int>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页查询时,设置当前页面的页码。默认值为1

--ShowSize

Integer

否

分页查询时,设置每页包含已被吊销证书的数量。默认值为20

ListTagKeys

API 版本:2020-04-07

命令描述

获取标签键值列表

语法

aliyun cas ListTagKeys --version 2020-04-07
    [--CurrentPage <int>]
    [--MaxResults <int>]
    [--NextToken <string>]
    [--PageSize <int>]
    --RegionId <string>
    [--ResourceGroupId <string>]
    --ResourceType <string>
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页查询时,显示的当前页的页码

--MaxResults

Integer

否

分页参数:结果集的最大数量,默认值为20

--NextToken

String

否

下一个查询开始Token,NextToken为空说明没有下一个

--PageSize

Integer

否

分页查询时,显示每页数据的最大条数

--RegionId

String

是

地域id

--ResourceGroupId

String

否

资源组id

--ResourceType

String

是

资源类型定义。取值固定为instance

示例

aliyun cas ListTagKeys --region cn-hangzhou --ResourceType 'vpc,0' --RegionId 'cn-hangzhou'

ListTagResources

2020-06-30

命令描述

查询资源(SSL证书实例)和标签的对应关系

语法
aliyun cas ListTagResources --version 2020-06-30
    [--MaxResults <int>]
    [--NextToken <string>]
    --RegionId <string>
    [--ResourceId <array>]
    --ResourceType <string>
    [--Tag.#.Key <string>]
    [--Tag.#.Value <string>]
    [options]
参数

参数

类型

必填

说明

--MaxResults

Integer

否

本次读取的最大数据量

  • 约束:

    • 最大值:1000

    • 最小值:1

--NextToken

String

否

下一个查询开始token,nexttoken为空说明没有下一个

--RegionId

String

是

地域id

--ResourceId

List

否

资源id

--ResourceType

String

是

资源类型。默认值:instance

--Tag

List

否

查询到的实例和标签的信息

  • 列表项:

    • 类型:object

--Tag.#.Key

String

否

要查询的标签的key,可有多个。n为正整数

--Tag.#.Value

String

否

标签值。n的取值范围:1~20

2020-04-07

命令描述

获取资源对应的标签

语法
aliyun cas ListTagResources --version 2020-04-07
    [--MaxResults <int>]
    [--NextToken <string>]
    --RegionId <string>
    [--ResourceId <array>]
    --ResourceType <string>
    [--Tag.#.Key <string>]
    [--Tag.#.Value <string>]
    [options]
参数

参数

类型

必填

说明

--MaxResults

Integer

否

分页参数:结果集的最大数量,默认值为20

--NextToken

String

否

下一个查询开始token,nexttoken为空说明没有下一个

--RegionId

String

是

地域id

--ResourceId

List

否

资源id。ResourceId和Tag不能同时为空(ResourceId.N 及 (Tag.N.Key,Tag.N.Value) 至少存在一个)

--ResourceType

String

是

资源类型。默认值:instance

--Tag

List

否

查询到的实例和标签的信息。ResourceId和Tag不能同时为空(ResourceId.N 及 (Tag.N.Key,Tag.N.Value) 至少存在一个)

  • 列表项:

    • 类型:object

--Tag.#.Key

String

否

要查询的标签的key,可有多个。n为正整数

--Tag.#.Value

String

否

标签值。n的取值范围:1~20

示例
aliyun cas ListTagResources --region cn-hangzhou --ResourceType instance --RegionId 'cn-hangzhou'

ListTrusteeOrder

API 版本:2020-04-07

命令描述

获取托管订单列表

语法

aliyun cas ListTrusteeOrder --version 2020-04-07
    [--CertificateId <int>]
    [--MaxResults <int>]
    [--NextToken <string>]
    [--OrderId <int>]
    [options]

参数

参数

类型

必填

说明

--CertificateId

Integer

否

证书id。CertificateId和OrderId二选一,不能同时为空

--MaxResults

Integer

否

本次读取的最大数据量

--NextToken

String

否

下一个查询开始Token,NextToken为空说明没有下一个

--OrderId

Integer

否

订单号。CertificateId和OrderId二选一,不能同时为空

示例

aliyun cas ListTrusteeOrder --region cn-hangzhou --NextToken 1d2db86sca4384811e0b5e8707e68181f --CertificateId 23787679 --MaxResults 20 --OrderId 14933279

ListUserCertificateOrder

API 版本:2020-04-07

命令描述

查询用户证书或者订单列表

语法

aliyun cas ListUserCertificateOrder --version 2020-04-07
    [--CurrentPage <int>]
    [--Keyword <string>]
    [--OrderType <string>]
    [--ResourceGroupId <string>]
    [--ShowSize <int>]
    [--Status <string>]
    [options]

参数

参数

类型

必填

说明

--CurrentPage

Integer

否

分页,当前页

--Keyword

String

否

模糊查询,匹配域名或对应的资源ID

--OrderType

String

否

资源类型。 默认为CPACK。取值:
CPACK:资源虚拟订单,只返回额度生成的订单信息。
BUY:售卖订单,只返回售卖生成的订单信息(大部分可以忽略该类型)。
UPLOAD:上传证书,只返回上传证书。
CERT: 证书,同时返回签发证书和上传证书



--ResourceGroupId

String

否

资源组ID。此ID可通过调用https://help.aliyun.com/document_detail/2716559.html接口获取

--ShowSize

Integer

否

分页,每页展示数据条数,默认50

--Status

String

否

订单状态。 状态取值:
PAYED:待申请,当OrderType=CPACK或者BUY有效。
CHECKING:审核中,当OrderType=CPACK或者BUY有效。
CHECKED_FAIL:审核失败,当OrderType=CPACK或者BUY有效。
ISSUED:已签发。
WILLEXPIRED:即将过期。
EXPIRED:已过期。
NOTACTIVATED:未激活,当OrderType=CPACK或者BUY有效。
REVOKED:吊销完成,当OrderType=CPACK或者BUY有效。
当OrderType=CERT或者UPLOAD,Status为空时,将默认返回有效证书,包含已签发和即将过期证书。当OrderType=CPACK或者BUY,Status为空时,将默认返回全量订单








示例

aliyun cas ListUserCertificateOrder --region cn-hangzhou --Status ISSUED --OrderType CPACK --Keyword 'cert-instanceId' --ResourceGroupId 'rg-ae******4wia' --CurrentPage 1 --ShowSize 10

ListWarehouse

API 版本:2020-04-07

命令描述

查询证书仓库列表

语法

aliyun cas ListWarehouse --version 2020-04-07
    [--MaxResults <int>]
    [--NextToken <string>]
    [--WarehouseInstanceIds <array>]
    [--WarehouseTypes <array>]
    [options]

参数

参数

类型

必填

说明

--MaxResults

Integer

否

本次读取的最大数据量

--NextToken

String

否

下一个查询开始Token,NextToken为空说明没有下一个

--WarehouseInstanceIds

List

否

证书仓库实例ID列表

--WarehouseTypes

List

否

证书仓库类型列表

示例

aliyun cas ListWarehouse --region cn-hangzhou --WarehouseTypes '["pcaCaCert"]' --NextToken 1d2db86sca4384811e0b5e8707e68181f --MaxResults 20 --WarehouseInstanceIds '["cas-wh-uc-gl2bsq"]'

ListWorkerResource

API 版本:2020-04-07

命令描述

阿里云支持批量部署证书,因此一个部署任务中可能对应多个云产品子任务(Worker),对应每个产品中的资源实例,您可通过该接口查看Worker任务详细信息

语法

aliyun cas ListWorkerResource --version 2020-04-07
    [--CloudProduct <string>]
    [--CurrentPage <int>]
    --JobId <int>
    [--ShowSize <int>]
    [--Status <string>]
    [options]

参数

参数

类型

必填

说明

--CloudProduct

String

否

部署任务中对应的云产品

--CurrentPage

Integer

否

分页查询时,设置当前页面的页码。默认值为1

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

--ShowSize

Integer

否

分页,设置每页展示的任务个数,默认50

--Status

String

否

Worker任务状态

  • 约束:

    • 允许值:["editing", "error", "pending", "processing", "rollback", "rollback_error", "rollback_success", "scheduling", "success"]

示例

aliyun cas ListWorkerResource --region cn-hangzhou --JobId 8888

MoveResourceGroup

2020-06-30

命令描述

修改资源所属的资源组

语法
aliyun cas MoveResourceGroup --version 2020-06-30
    [--RegionId <string>]
    --ResourceGroupId <string>
    --ResourceId <string>
    --ResourceType <string>
    [options]
参数

参数

类型

必填

说明

--RegionId

String

否

地域id

--ResourceGroupId

String

是

资源组id

--ResourceId

String

是

要迁移的资源组所属的资源id

--ResourceType

String

是

资源类型,取值:instance

2020-04-07

命令描述

修改证书或证书订单资源所属的资源组

语法
aliyun cas MoveResourceGroup --version 2020-04-07
    [--RegionId <string>]
    --ResourceGroupId <string>
    --ResourceId <string>
    --ResourceType <string>
    [options]
参数

参数

类型

必填

说明

--RegionId

String

否

证书所有者所属组织的地域。目前仅支持ap-southeast-1(新加坡)和cn-hangzhou(杭州)

--ResourceGroupId

String

是

资源分组ID

--ResourceId

String

是

资源ID

--ResourceType

String

是

资源的类型。 默认值:instance

  • 约束:

    • 允许值:["Certificate", "instance"]

示例
aliyun cas MoveResourceGroup --region cn-hangzhou --ResourceGroupId 'rg-acfmykgxu5d46ey' --ResourceId 'cas-cn-4591d3xa****' --ResourceType instance --RegionId 'cn-hangzhou'

RefundInstance

API 版本:2020-04-07

命令描述

实例7天内退款

语法

aliyun cas RefundInstance --version 2020-04-07
    --InstanceId <string>
    [options]

参数

参数

类型

必填

说明

--InstanceId

String

是

实例ID。
需先通过控制台购买订阅实例再调用 ListInstances 获取 InstanceId

示例

aliyun cas RefundInstance --region cn-hangzhou --InstanceId 'cas-ivauto-hqito6'

RenewCertificateOrderForPackageRequest

API 版本:2020-04-07

命令描述

为已签发的证书申请订单续费

语法

aliyun cas RenewCertificateOrderForPackageRequest --version 2020-04-07
    [--Csr <string>]
    --OrderId <int>
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [options]

参数

参数

类型

必填

说明

--Csr

String

否

您使用OpenSSL或Keytool工具为域名手动生成的CSR文件的内容。CSR文件的密钥类型必须是RSA、ECC算法,且RSA算法的密钥长度必须大于等于2048。关于CSR文件的制作方法,请参见https://help.aliyun.com/document_detail/42218.html。
如果不设置该参数,表示使用待续费证书申请订单中的域名,由SSL证书服务自动为您生成新的CSR。
CSR(Certificate Signing Request)是证书签名请求文件,包含了您的服务器信息和公司信息。申请证书时需要将您证书的CSR文件提交给CA认证中心审核,CA中心对CSR文件进行根证书私钥签名后,会生成证书公钥文件(即签发给您的SSL证书)。
CSR中的CN字段表示证书绑定的域名


--OrderId

Integer

是

要续费的证书申请订单的ID。
证书订单ID一般是通过调用https://help.aliyun.com/document_detail/455296.html、https://help.aliyun.com/document_detail/455292.html或https://help.aliyun.com/document_detail/455801.html接口返回的证书申请订单ID(即**OrderId**)。此ID可通过调用https://help.aliyun.com/document_detail/455804.html获取

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

示例

aliyun cas RenewCertificateOrderForPackageRequest --region cn-hangzhou --OrderId 123451222

RevokeCertificate

API 版本:2020-04-07

命令描述

吊销证书

语法

aliyun cas RevokeCertificate --version 2020-04-07
    [--CertificateId <int>]
    --InstanceId <string>
    [options]

参数

参数

类型

必填

说明

--CertificateId

Integer

否

指定证书id吊销

--InstanceId

String

是

实例的 ID。该参数仅接受V2.0的订阅证书实例(从 CA 如 DigiCert/GeoTrust 购买的证书,InstanceId 格式 cas-cn-),不支持上传证书(cas-upload-)

示例

aliyun cas RevokeCertificate --region cn-hangzhou --InstanceId 'cas-cn-68n1mm16****'

RevokeWHClientCertificate

API 版本:2020-04-07

命令描述

一般用于吊销证书仓库中客户端证书

语法

aliyun cas RevokeWHClientCertificate --version 2020-04-07
    --Identifier <string>
    [options]

参数

参数

类型

必填

说明

--Identifier

String

是

要吊销的客户端证书或服务端证书的唯一识别码

示例

aliyun cas RevokeWHClientCertificate --region cn-hangzhou --Identifier '160ae6bb538d538c70c01f81dcf2****'

ShareCertificate

API 版本:2020-04-07

命令描述

共享证书。
说明:1)公司实体的含义及配置方式(如通过企业财务管理或资源目录);
2)源账号和目标账号必须在同一公司实体下的约束;
3)如何通过 ListCompanies API 查看当前账号的公司实体关联


语法

aliyun cas ShareCertificate --version 2020-04-07
    --CertificateId <int>
    --TargetUserId <int>
    [options]

参数

参数

类型

必填

说明

--CertificateId

Integer

是

证书ID

--TargetUserId

Integer

是

接受分享证书的用户uid。
uid 是阿里云主账号 ID(非 RAM 用户 PrincipalId),
目标账号必须与源账号在同一公司实体下

示例

aliyun cas ShareCertificate --region cn-hangzhou --CertificateId 23279004 --TargetUserId 1622883344556677

Sign

API 版本:2020-04-07

命令描述

本接口一般用于证书仓库中的PCA证书签名

语法

aliyun cas Sign --version 2020-04-07
    [--CertIdentifier <string>]
    [--CustomIdentifier <string>]
    --Message <string>
    --MessageType <string>
    --SigningAlgorithm <string>
    [--WarehouseId <int>]
    [options]

参数

参数

类型

必填

说明

--CertIdentifier

String

否

证书唯一识别码。该参数可通过调用https://help.aliyun.com/document_detail/455806.html获取。
SSL证书识别码一般为{证书ID}-cn-hangzhou。
PCA证书为对应私有证书的Identifier字段

--CustomIdentifier

String

否

用户自定义标识,唯一键

--Message

String

是

待签名数据。可以使用原文、Base64、哈希值三种格式进行传输。
当MessageType取值为RAW时,Message传原文字符串。
当MessageType取值为BASE64时,Message传原文的base64值。
当MessageType取值为DIGEST时,Message传哈希值,对消息摘要进行签名。
当MessageType取值为BLIND时,Message传盲化消息的base64值



--MessageType

String

是

消息类型。取值:
RAW(默认值):原始数据。
DIGEST:原始数据的消息摘要(哈希值)。
BASE64:原文base64。
BLIND:盲签,目前仅支持使用RSA算法的证书进行盲签



--SigningAlgorithm

String

是

签名算法。取值:
SHA256withRSA
SHA256withRSA/PSS
SHA256withECDSA
SM3withSM2
SHA256withRSA/P7




--WarehouseId

Integer

否

仓库ID。
此ID可通过调用https://help.aliyun.com/document_detail/455805.html获取

示例

aliyun cas Sign --region cn-hangzhou --Message 'MTIzNA==' --SigningAlgorithm SHA256withRSA --MessageType RAW

TagResources

2020-06-30

命令描述

为指定资源(SSL证书实例)绑定标签

语法
aliyun cas TagResources --version 2020-06-30
    --RegionId <string>
    --ResourceId <array>
    --ResourceType <string>
    [--Tag.#.Key <string>]
    [--Tag.#.Value <string>]
    [options]
参数

参数

类型

必填

说明

--RegionId

String

是

证书所有者所属组织的区域

--ResourceId

List

是

资源id

--ResourceType

String

是

资源类型。默认值:instance

--Tag

List

否

资源的标签信息

  • 列表项:

    • 类型:object

--Tag.#.Key

String

否

标签键。n的取值范围为[1,20],用于指定多个标签键,最多20个。例如:tag.1.key,tag.2.key,...,tag.20.key

  • 约束:

    • 最大长度:128

--Tag.#.Value

String

否

标签值。n的取值范围:1~20

  • 约束:

    • 最大长度:256

2020-04-07

命令描述

新增资源标签

语法
aliyun cas TagResources --version 2020-04-07
    --RegionId <string>
    --ResourceId <array>
    --ResourceType <string>
    [--Tag.#.Key <string>]
    [--Tag.#.Value <string>]
    [options]
参数

参数

类型

必填

说明

--RegionId

String

是

证书所有者所属组织的区域

  • 约束:

    • 允许值:["cn-hangzhou"]

--ResourceId

List

是

资源id

--ResourceType

String

是

资源类型。默认值:instance

  • 约束:

    • 允许值:["INSTANCE", "instance"]

--Tag

List

否

资源的标签信息

  • 列表项:

    • 类型:object

--Tag.#.Key

String

否

标签键。n的取值范围为[1,20],用于指定多个标签键,最多20个。例如:tag.1.key,tag.2.key,...,tag.20.key

  • 约束:

    • 最大长度:128

--Tag.#.Value

String

否

标签值。n的取值范围:1~20

  • 约束:

    • 最大长度:256

示例
aliyun cas TagResources --region cn-hangzhou --ResourceId.1 'cas-cn-4591d3xa****' --ResourceType instance --RegionId 'cn-hangzhou'

UntagResources

2020-06-30

命令描述

移除标签

语法
aliyun cas UntagResources --version 2020-06-30
    [--All <bool>]
    --RegionId <string>
    --ResourceId <array>
    --ResourceType <string>
    [--TagKey <array>]
    [options]
参数

参数

类型

必填

说明

--All

Boolean

否

是否全部删除,仅当tagkey.n为空时有效。取值范围:-true-false默认值:false

--RegionId

String

是

地域id

--ResourceId

List

是

资源id

--ResourceType

String

是

资源类型定义。取值固定为instance

--TagKey

List

否

标签键

2020-04-07

命令描述

移除标签

语法
aliyun cas UntagResources --version 2020-04-07
    [--All <bool>]
    --RegionId <string>
    --ResourceId <array>
    --ResourceType <string>
    [--TagKey <array>]
    [options]
参数

参数

类型

必填

说明

--All

Boolean

否

是否全部删除,仅当tagkey.n为空时有效。取值范围:-true-false默认值:false

--RegionId

String

是

地域id

--ResourceId

List

是

资源id

--ResourceType

String

是

资源类型定义。取值固定为instance

--TagKey

List

否

标签键

示例
aliyun cas UntagResources --region cn-hangzhou --ResourceId.1 'cas-cn-4591d3xa****' --ResourceType instance --RegionId 'cn-hangzhou'

UpdateCACertificateStatus

API 版本:2020-06-30

命令描述

将根CA证书或子CA证书的状态由正常签发修改为吊销

语法

aliyun cas UpdateCACertificateStatus --version 2020-06-30
    [--ClientToken <string>]
    --Identifier <string>
    [--Status <string>]
    [options]

参数

参数

类型

必填

说明

--ClientToken

String

否

客户端Token,用于保证请求的幂等性。
从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符。
若您未指定,则系统自动使用API请求的RequestId作为ClientToken标识。每次API请求的RequestId不一样

--Identifier

String

是

要修改状态的CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/465957.html查询所有CA证书的唯一识别码

--Status

String

否

对该CA证书执行的操作。取值固定为REVOKE,表示吊销CA证书,即将CA证书的状态修改为REVOKE。
只有当CA证书的当前状态为ISSUE时,才支持该操作。您可以调用https://help.aliyun.com/document_detail/465954.html查询CA证书的当前状态

UpdateCompany

API 版本:2020-04-07

命令描述

更新公司信息

语法

aliyun cas UpdateCompany --version 2020-04-07
    --City <string>
    --CompanyAddress <string>
    --CompanyCode <string>
    [--CompanyEmail <string>]
    --CompanyId <int>
    --CompanyName <string>
    --CompanyPhone <string>
    --CompanyType <int>
    --CountryCode <string>
    [--Department <string>]
    [--Lang <string>]
    --PostCode <string>
    --Province <string>
    [options]

参数

参数

类型

必填

说明

--City

String

是

城市

--CompanyAddress

String

是

公司地址

--CompanyCode

String

是

公司代码

--CompanyEmail

String

否

公司邮箱

--CompanyId

Integer

是

公司ID

--CompanyName

String

是

公司或者组织机构名称

--CompanyPhone

String

是

公司电话

--CompanyType

Integer

是

公司类型

--CountryCode

String

是

国家代码

--Department

String

否

部门

--Lang

String

否

语言

--PostCode

String

是

邮编

--Province

String

是

省份

示例

aliyun cas UpdateCompany --region cn-hangzhou --CompanyAddress test --CompanyName testYanwen045 --CompanyId 51001 --CompanyType 0 --City Beijing --PostCode 100000 --CountryCode CN --CompanyCode xxx --CompanyPhone 1511 --Province Beijing

UpdateContact

API 版本:2020-04-07

命令描述

更新联系人

语法

aliyun cas UpdateContact --version 2020-04-07
    --ContactId <int>
    [--Email <string>]
    [--Idcard <string>]
    [--Mobile <string>]
    [--Name <string>]
    [--Webhooks <string>]
    [options]

参数

参数

类型

必填

说明

--ContactId

Integer

是

联系人ID

--Email

String

否

联系人邮箱

--Idcard

String

否

联系人身份证号码,CFCA 证书品牌需要,其他品牌不需要

--Mobile

String

否

联系人电话

--Name

String

否

证书联系人名称

--Webhooks

String

否

钉钉、企业微信或飞书机器人的 webhook 地址,list 格式的字符串

示例

aliyun cas UpdateContact --region cn-hangzhou --ContactId 1397591

UpdateCsr

API 版本:2020-04-07

命令描述

如果您在上传本地CSR时未传入CSR私钥,您可以通过该接口上传CSR对应的私钥

语法

aliyun cas UpdateCsr --version 2020-04-07
    --CsrId <int>
    --Key <string>
    [options]

参数

参数

类型

必填

说明

--CsrId

Integer

是

CSR唯一标识。上传CSR时会生成CsrId。您可以通过查询CSR列表获取该值,接口详情,请参见https://help.aliyun.com/document_detail/2709717.html

--Key

String

是

PEM格式的证书私钥内容。此私钥必须与 CsrId 所引用的 CSR 中包含的公钥密码学匹配,否则 API 将返回 NotMatch.CsrAndPrivateKey 错误

示例

aliyun cas UpdateCsr --region cn-hangzhou --CsrId 5209 --Key='-----BEGIN RSA PRIVATE KEY----- MII.... -----END RSA PRIVATE KEY-----'

UpdateDeploymentJob

API 版本:2020-04-07

命令描述

更新部署任务

语法

aliyun cas UpdateDeploymentJob --version 2020-04-07
    [--CertIds <string>]
    [--ContactIds <string>]
    --JobId <int>
    [--Name <string>]
    [--ResourceIds <string>]
    [--ScheduleTime <int>]
    [options]

参数

参数

类型

必填

说明

--CertIds

String

否

证书ID,多个证书ID用半角逗号(,)分隔。此处ID为https://help.aliyun.com/document_detail/455804.html返回的**CertificateId**

--ContactIds

String

否

联系人ID。多个联系人ID用半角逗号(,)分隔。此处ID为https://help.aliyun.com/document_detail/2712221.html返回的主键**Id**

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务ID。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

--Name

String

否

部署任务名称

--ResourceIds

String

否

云产品资源ID。多个资源ID用半角逗号(,)分隔。此处ID为https://help.aliyun.com/document_detail/2712230.html返回的主键**Id**

--ScheduleTime

Integer

否

设置任务开始调度的时间(Unix时间戳)。如果不设置,默认创建任务后立即执行部署

示例

aliyun cas UpdateDeploymentJob --region cn-hangzhou --JobId 8888

UpdateDeploymentJobStatus

API 版本:2020-04-07

命令描述

更新部署任务状态

语法

aliyun cas UpdateDeploymentJobStatus --version 2020-04-07
    --JobId <int>
    --Status <string>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

--Status

String

是

目标状态。部署任务状态为部署失败或部署成功,任务状态则不允许变更。查看部署任务状态,请参见https://help.aliyun.com/document_detail/2712225.html

  • 约束:

    • 允许值:["editing", "pending", "scheduling"]

示例

aliyun cas UpdateDeploymentJobStatus --region cn-hangzhou --Status editing --JobId 8888

UpdateInstance

API 版本:2020-04-07

命令描述

更新实例

语法

aliyun cas UpdateInstance --version 2020-04-07
    [--AutoReissue <string>]
    [--AutoRenewalStatus <string>]
    [--CertificateName <string>]
    [--City <string>]
    [--CompanyId <int>]
    [--ContactIdList <array>]
    [--CountryCode <string>]
    [--Csr <string>]
    [--Domain <string>]
    [--GenerateCsrMethod <string>]
    --InstanceId <string>
    [--KeyAlgorithm <string>]
    [--Province <string>]
    [--ResourceGroupId <string>]
    [--Tags.#.TagKey <string>]
    [--Tags.#.TagValue <string>]
    [--ValidationMethod <string>]
    [options]

参数

参数

类型

必填

说明

--AutoReissue

String

否

是否开启自动托管。
enable:开启
disable:未开启

--AutoRenewalStatus

String

否

自动续费状态,取值说明:
enable:自动续费。
disable:手动续费,实例到期前通过站内信提醒

--CertificateName

String

否

实例的名称,签发证书时则为作为证书的默认名称

--City

String

否

购买证书的用户所属的公司或组织所在的城市。DV证书生成CSR时需要该字段,默认为Beijing

--CompanyId

Integer

否

公司信息ID,OV和EV要求必填,否则无法调用ApplyCertificate申请证书

--ContactIdList

List

否

联系人ID列表。如果已有联系人,可以不传,如果之前没有设置,则要求至少传一个,否则后续无法调用ApplyCertificate申请证书

--CountryCode

String

否

设置证书组织机构所在国家或地区的代码。例如,CN 表示中国,US 表示美国。DV证书生成 CSR 时需要该字段,默认为 CN

--Csr

String

否

CSR内容。您可以通过OpenSSL工具或者Keytool工具生成CSR。更多信息,请参见https://help.aliyun.com/document_detail/42218.html

--Domain

String

否

证书要绑定的域名。具体要求如下:
支持设置单域名或者通配符域名(例如,*.aliyundoc.com)。
支持设置多个域名。多个域名间使用英文逗号(,)分隔。是否赠送域名以第一个域名判断为准。
<notice>
证书绑定多个域名时,该参数为必填项。该参数与Csr参数不允许同时为空。如果您同时设置了该参数和Csr参数,则取Csr中的CN字段值作为证书绑定的域名。
</notice>




--GenerateCsrMethod

String

否

CSR生成方式。默认为online。
online:系统生成,则会忽略Csr字段。
upload:用户上传,则要求Csr为必填

--InstanceId

String

是

实例的ID。
实例需通过阿里云控制台购买订阅实例获取。格式为cas_dv-cn-XXX

--KeyAlgorithm

String

否

证书算法,默认为RSA_2048。
RSA_2048
RSA_3072
RSA_4096
ECC_256
SM2




--Province

String

否

公司所在省份或者地区。DV证书生成 CSR 时需要该字段,默认为 Beijing

--ResourceGroupId

String

否

资源分组ID

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.TagKey

String

否

实例的标签键。N的取值范围:1~20。一旦输入该值,则不允许为空字符串。
最多支持64个字符,不能以aliyun和acs:开头,不能包含http://或者https://

--Tags.#.TagValue

String

否

实例的标签值。N的取值范围:1~20。一旦输入该值,可以为空字符串。
最多支持128个字符,不能以aliyun和acs:开头,不能包含http://或者https://

--ValidationMethod

String

否

申请证书验证方式。
DNS:DNS验证方式,TXT或者CNAME。
HTTP:文件验证方式

示例

aliyun cas UpdateInstance --region cn-hangzhou --InstanceId 'cas-cn-68n1mm16****'

UpdatePcaCertificate

API 版本:2020-06-30

命令描述

更新证书属性

语法

aliyun cas UpdatePcaCertificate --version 2020-06-30
    [--AliasName <string>]
    [--ClientToken <string>]
    [--Identifier <string>]
    [--ResourceGroupId <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [options]

参数

参数

类型

必填

说明

--AliasName

String

否

设置签发证书的名称

--ClientToken

String

否

用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符

--Identifier

String

否

要查询的CA证书的唯一识别码。
您可以调用https://help.aliyun.com/document_detail/328095.html查询所有CA证书的唯一识别码

--ResourceGroupId

String

否

资源分组ID

--Tags

List

否

标签列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

UpdateWorkerResourceStatus

API 版本:2020-04-07

命令描述

更新部署任务下的Worker任务状态

语法

aliyun cas UpdateWorkerResourceStatus --version 2020-04-07
    --JobId <int>
    --Status <string>
    --WorkerId <int>
    [options]

参数

参数

类型

必填

说明

--JobId

Integer

是

部署任务ID。此处ID为https://help.aliyun.com/document_detail/2712234.html返回的任务**ID**。也可通过https://help.aliyun.com/document_detail/2712223.html接口获取

--Status

String

是

目标状态: "editing"、 "pending"、"success"、 "rollback"、"rollback_success"、 "rollback_error"

--WorkerId

Integer

是

部署任务Worker ID。此处ID可通过https://help.aliyun.com/document_detail/2712224.html接口获取

示例

aliyun cas UpdateWorkerResourceStatus --region cn-hangzhou --Status rollback --WorkerId 1234 --JobId 8888

UploadCsr

API 版本:2020-04-07

命令描述

阿里云数字证书管理服务支持上传已有的CSR,以便申请证书时使用,同时也可对上传的CSR进行统一管理

语法

aliyun cas UploadCsr --version 2020-04-07
    --Csr <string>
    [--Key <string>]
    [--Name <string>]
    [options]

参数

参数

类型

必填

说明

--Csr

String

是

CSR内容

--Key

String

否

PEM格式的证书私钥内容

--Name

String

否

CSR名称。支持使用英文大小写字母(a~z和A~Z)、阿拉伯数字(0~9)、下划线(_)、短划线(-)。长度不超过50个字符

示例

aliyun cas UploadCsr --region cn-hangzhou --Csr='-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST-----'

UploadPCACert

API 版本:2020-04-07

命令描述

本接口一般用于在证书仓库中上传PCA证书

语法

aliyun cas UploadPCACert --version 2020-04-07
    --Cert <string>
    [--Name <string>]
    [--PrivateKey <string>]
    --WarehouseId <int>
    [options]

参数

参数

类型

必填

说明

--Cert

String

是

证书

--Name

String

否

证书名称

--PrivateKey

String

否

证书私钥

--WarehouseId

Integer

是

仓库ID。
此ID可通过调用https://help.aliyun.com/document_detail/455805.html获取

示例

aliyun cas UploadPCACert --region cn-hangzhou --WarehouseId 1 --Cert='-----BEGIN CERTIFICATE----- MIIEJDCCAwygAwIBAgIQITRHItTLTQizTyd3K7AMRTANBgkqhkiG9w0BAQsFADBe **************** 5/akmr2GK/Y= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIDuzCCAqOgAwIBAgIQSEIWDPfWTDKZcWNyL2O+fjANBgkqhkiG9w0BAQsFADBf **************** URUHyMW5Qd5Q9g6Y4sDOIm6It9TF7EjpwMs42R30agcRYzuUsN72ZFBYFJwnBX8= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIDizCCAnOgAwIBAgIRAMfjPkDKfELTo07l3A3cUSYwDQYJKoZIhvcNAQELBQAw ********* CjWTnYPhCcO2uIcnqMt7zCVs5LXBK/XSwlAXKMvKT0uuzw9VxeMfEabflKu0By8= -----END CERTIFICATE-----'

UploadPcaCertToCas

API 版本:2020-06-30

命令描述

上传PCA证书到SSL上传证书

语法

aliyun cas UploadPcaCertToCas --version 2020-06-30
    --Ids <string>
    [options]

参数

参数

类型

必填

说明

--Ids

String

是

待同步到证书服务的主键标识列表。多个ID使用半角逗号(,)间隔。
前置依赖说明:Ids 取值需通过 ListClientCertificate API 获取,使用响应 CertificateList 中的 Id 字段(integer/int64,证书主键 ID)

UploadUserCertificate

API 版本:2020-04-07

命令描述

本接口一般用于上传证书,包括标准国密证书或非国密证书

语法

aliyun cas UploadUserCertificate --version 2020-04-07
    [--Cert <string>]
    [--ClientToken <string>]
    [--EncryptCert <string>]
    [--EncryptPrivateKey <string>]
    [--Key <string>]
    --Name <string>
    [--ResourceGroupId <string>]
    [--SignCert <string>]
    [--SignPrivateKey <string>]
    [--Tags.#.Key <string>]
    [--Tags.#.Value <string>]
    [options]

参数

参数

类型

必填

说明

--Cert

String

否

非国密证书,PEM格式证书内容

--ClientToken

String

否

用于保证请求的幂等性

--EncryptCert

String

否

国密证书,PEM格式加密证书内容。当Cert和Key不为空时,此字段无效

--EncryptPrivateKey

String

否

国密证书,PEM格式加密证书私钥内容。当Cert和Key不为空时,此字段无效

--Key

String

否

非国密证书 ,PEM格式证书的私钥内容

--Name

String

是

自定义的证书名称。支持的最大字符长度:63。支持所有字符类型,包括字母、数字、下划线等。
同一个用户下的证书名称不能重复

--ResourceGroupId

String

否

资源分组ID

--SignCert

String

否

国密证书,PEM格式签名证书内容。当Cert和Key不为空时,此字段无效

--SignPrivateKey

String

否

国密证书,PEM格式签名证书私钥内容。当Cert和Key不为空时,此字段无效

--Tags

List

否

Tag列表

  • 列表项:

    • 类型:object

--Tags.#.Key

String

否

标签键

--Tags.#.Value

String

否

标签值

示例

aliyun cas UploadUserCertificate --region cn-hangzhou --Name 'cert-1'

Verify

API 版本:2020-04-07

命令描述

本接口一般用于证书仓库中PCA证书的签名校验

语法

aliyun cas Verify --version 2020-04-07
    [--CertIdentifier <string>]
    [--CustomIdentifier <string>]
    --Message <string>
    --MessageType <string>
    --SignatureValue <string>
    --SigningAlgorithm <string>
    [--WarehouseId <string>]
    [options]

参数

参数

类型

必填

说明

--CertIdentifier

String

否

证书唯一识别码。该参数可通过调用https://help.aliyun.com/document_detail/455806.html获取。
SSL证书识别码一般为{证书ID}-cn-hangzhou。
PCA证书为对应私有证书的Identifier字段

--CustomIdentifier

String

否

用户自定义标识,唯一键

--Message

String

是

待验证数据,使用Base64编码。
例如:待签名数据的十六进制内容为[0x31, 0x32, 0x33, 0x34],则对应的Base64编码为MTIzNA==。
当MessageType取值为RAW时,数据内容需小于4KB。
如果待签名数据内容大于4KB,您可以将MessageType指定为DIGEST,将Message指定为本地计算的消息摘要(又称哈希值)。证书仓库将使用您自己的证书应用系统计算消息摘要,使用的消息摘要算法须与指定签名算法需要的消息摘要算法保持一致。具体如下:
SHA256withRSA、SHA256withRSA/PSS、SHA256withECDSA对应的消息摘要算法为SHA-256。
SM3withSM2对应的消息摘要算法为SM3




--MessageType

String

是

消息类型。取值:
RAW(默认值):原始数据。
DIGEST:原始数据的消息摘要(哈希值)

--SignatureValue

String

是

签名值。使用Base64编码

--SigningAlgorithm

String

是

签名算法。取值:
SHA256withRSA
SHA256withRSA/PSS
SHA256withECDSA
SM3withSM2



--WarehouseId

String

否

仓库ID。可通过https://help.aliyun.com/document_detail/453246.html接口查询

示例

aliyun cas Verify --region cn-hangzhou --Message 'MTIzNA==' --SignatureValue 'eyaC0w3ROK5b3QcHmUtAhMY/sQjKu2t3uBfnf6J/gn7JfZtyxwcCUjzXbw5jmqJQRbj1te670Bshg9kUdanKhtHFhJjU5jX+ZMMBr6pH0gqQDJxR0K0yHXRc0Q5OQoUZ6BfpbI4Wt4jJvJSdCstz1vSg12CfEHS8Kd5qfhItK7Y=' --SigningAlgorithm SHA256withRSA --MessageType RAW

全局选项

以下为 CLI 通用选项,各选项的适用范围以说明为准。

选项

说明

--cli-dry-run

使用 --cli-dry-run 在执行校验后以人类可读格式输出请求详情,跳过实际运行

--cli-input-json

使用 --cli-input-json foo.json 从 JSON 对象读取产品 API 参数,命令行显式参数覆盖文件值

--cli-output

设置宿主 CLI Help、本地错误和更新检查的输出格式(json)

--cli-query

使用 --cli-query <jmespath> 通过 JMESPath 表达式过滤输出结果

--cli-sign-version

短横线命令的 OpenAPI 签名版本:当前仅支持 v4;设为空值可清空并恢复默认签名(aliyun configure set 可写入 Profile)

--language

使用 --language [en|zh] 来指定语言

--output -o

使用 --output cols=Field1,Field1 [rows=jmesPath] 使用表格方式打印输出

--profile -p

使用 --profile <profileName> 指定操作的配置集

--region

使用 --region <regionId> 来指定访问大区

--version --api-version

使用 --version <YYYY-MM-DD> 来指定访问的API版本

--yes -y

跳过安全策略的确认提示(用于非交互式/Agent 场景)