Connected Environments Certificates - Create Or Update
创建或更新证书。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}?api-version=2024-03-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
certificate
|
path | True |
string |
证书的名称。 |
connected
|
path | True |
string |
连接环境的名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
location | True |
string |
资源所在的地理位置 |
properties |
证书资源特定属性 |
||
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
Other Status Codes |
错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Create or Update Certificate
示例请求
PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificates/certificate-firendly-name?api-version=2024-03-01
{
"location": "East US",
"properties": {
"password": "private key password",
"value": "Y2VydA=="
}
}
示例响应
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/connectedEnvironments/testcontainerenv/certificate-firendly-name",
"type": "Microsoft.App/ConnectedEnvironments/Certificates",
"location": "East US",
"properties": {
"provisioningState": "Succeeded",
"subjectName": "my-subject-name.company.country.net",
"subjectAlternativeNames": [
"CN=my-subject-name.com"
],
"issuer": "Issuer Name",
"issueDate": "2021-11-06T04:00:00Z",
"expirationDate": "2022-11-06T04:00:00Z",
"thumbprint": "CERTIFICATE_THUMBPRINT",
"valid": true
}
}
定义
名称 | 说明 |
---|---|
Certificate |
用于托管环境中的容器应用的自定义域绑定的证书 |
Certificate |
证书的预配状态。 |
created |
创建资源的标识的类型。 |
Default |
应用服务错误响应。 |
Details |
详细信息或错误 |
Error |
错误模型。 |
Properties |
证书资源特定属性 |
system |
与创建和上次修改资源相关的元数据。 |
Certificate
用于托管环境中的容器应用的自定义域绑定的证书
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的完全限定资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
location |
string |
资源所在的地理位置 |
name |
string |
资源的名称 |
properties |
证书资源特定属性 |
|
systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
tags |
object |
资源标记。 |
type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
CertificateProvisioningState
证书的预配状态。
值 | 说明 |
---|---|
Canceled | |
DeleteFailed | |
Failed | |
Pending | |
Succeeded |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DefaultErrorResponse
应用服务错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误模型。 |
Details
详细信息或错误
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,以编程方式标识错误。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
Error
错误模型。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,以编程方式标识错误。 |
details |
Details[] |
详细信息或错误 |
innererror |
string |
调试错误的详细信息。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
Properties
证书资源特定属性
名称 | 类型 | 说明 |
---|---|---|
expirationDate |
string (date-time) |
证书到期日期。 |
issueDate |
string (date-time) |
证书颁发日期。 |
issuer |
string |
证书颁发者。 |
password |
string |
证书密码。 |
provisioningState |
证书的预配状态。 |
|
publicKeyHash |
string |
公钥哈希。 |
subjectAlternativeNames |
string[] |
证书适用的使用者可选名称。 |
subjectName |
string |
证书的使用者名称。 |
thumbprint |
string |
证书指纹。 |
valid |
boolean |
证书是否有效? |
value |
string (byte) |
PFX 或 PEM Blob |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |