You need to enable JavaScript to run this app.
导航
CreateExternalSAMLIdentityProvider - 创建外部SAML身份提供商信息
最近更新时间:2025.03.21 11:31:24首次发布时间:2025.03.21 11:31:24
我的收藏
有用
有用
无用
无用

创建外部SAML身份提供商信息

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

CreateExternalSAMLIdentityProvider

要执行的操作,取值:CreateExternalSAMLIdentityProvider。

Version
String

2023-01-01

API的版本,取值:2023-01-01。

EncodedMetadataDocument
String

"xxxx"

身份提供商 SAML 元数据

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
EntityId
String

entityId

实体 ID

EncodedMetadataDocument
String

base64(saml metadata)

身份提供商 SAML 元数据

CreatedTime
String

2024-07-22T21:53:54+08:00

创建时间

UpdatedTime
String

2024-07-22T21:53:54+08:00

更新时间

IdpCertificates
Array of Object

[

    {

        "ID": "J4X1",

        "NotAfter": "7"

    }

]

证书信息

请求示例

POST /?Action=CreateExternalSAMLIdentityProvider&Version=2023-01-01 HTTP/1.1
Host: open.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20250310T114820Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250310/cn-beijing/cloudidentity/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
  "EncodedMetadataDocument": "aB"
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202503101948260231091581790EDDAD",
    "Action": "CreateExternalSAMLIdentityProvider",
    "Version": "2023-01-01",
    "Service": "cloudidentity",
    "Region": "cn-beijing"
  },
  "Result": {
    "EntityId": "Ggn5Tp",
    "EncodedMetadataDocument": "AciUbBsoV",
    "CreatedTime": "YHbk",
    "UpdatedTime": "8MI",
    "IdpCertificates": [
      {
        "ID": "J4X1",
        "NotAfter": "7"
      }
    ]
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
SamlMetadataNotEncodeBase64

The metadata is not base64 encoded

SAML 元数据格式不正确

400
MetadataLengthExceeded

Metadata length has exceeded the limit 30kb

SAML 元数据长度不得超过 30kb

400
EntityIdLengthUnacceptable

EntityId length should be greater than 0 and less than 256.

EntityId 长度必须大于 0 并小于 256

400
MissingSingleSignOnLocation

SingleSignOnLocation must have one or more

SingleSignOnLocation 至少需要有一个

400
SingleSignOnLocationLengthUnacceptable

SingleSignOnLocation length should be greater than 0 and less than 256.

SingleSignOnLocation 的长度需要大于 0 且小于 256。

400
ShouldContainOneSigningCertificate

The metadata should contain one signing certificate

最多支持一个有效的签名证书

400
ErrInvalidCertificate

Invalid certificate

证书格式错误

400
CertLengthExceeded

Certificate length has exceeded the limit

证书的长度超出了规定的限制

400
PublicKeyLengthExceeded

PublicKey length has exceeded the limit

证书公钥的长度超出了规定的限制

400
SerialNumberLengthExceeded

SerialNumber length has exceeded the limit

SerialNumber 的长度超出了规定的限制

400
IssuerLengthExceeded

Issuer length has exceeded the limit

证书 Issuer 的长度超出了规定的限制

400
SubjectLengthExceeded

Subject length has exceeded the limit

证书 Subject 的长度超出了规定的限制

400
SignatureAlgorithmLengthExceeded

SignatureAlgorithm name length has exceeded the limit

证书签名算法名称的长度超出了规定的限制

400
NotIdpMetaData

metadata type not a idp

SAML 元数据不是 IDP 类型