Certificates - Create Or Update
建立或更新憑證的描述。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}?api-version=2025-05-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
name
|
path | True |
string |
憑證的名稱。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
要求本文
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| location | True |
string |
資源所在的地理位置 |
| kind |
string |
資源種類。 如果資源是應用程式,您可以參考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 以取得種類支援的詳細值。 |
|
| properties.canonicalName |
string |
要透過免費憑證發行之憑證的 CNAME |
|
| properties.domainValidationMethod |
string |
免費憑證的網域驗證方法 |
|
| properties.hostNames |
string[] |
憑證適用的主機名。 |
|
| properties.keyVaultId |
string (arm-id) |
Azure Key Vault Csm 資源 ID。 |
|
| properties.keyVaultSecretName |
string |
Azure Key Vault 秘密名稱。 |
|
| properties.password |
string |
憑證密碼。 |
|
| properties.pfxBlob |
string (byte) |
Pfx Blob。 |
|
| properties.serverFarmId |
string (arm-id) |
關聯的應用服務計劃的資源ID。 |
|
| tags |
object |
資源標籤。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
資源「憑證」更新操作成功 |
|
| Other Status Codes |
未預期的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
Create Or Update Certificate
範例要求
範例回覆
{
"name": "testc6282",
"type": "Microsoft.Web/certificates",
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282",
"location": "East US",
"properties": {
"expirationDate": "2039-12-31T23:59:59+00:00",
"friendlyName": "",
"hostNames": [
"ServerCert"
],
"issueDate": "2015-11-12T23:40:25+00:00",
"issuer": "CACert",
"subjectName": "ServerCert",
"thumbprint": "FE703D7411A44163B6D32B3AD9B03E175886EBFE"
}
}
定義
| 名稱 | Description |
|---|---|
| Certificate |
應用程式的 SSL 憑證。 |
|
created |
建立資源的身分識別類型。 |
|
Default |
App Service 錯誤回應。 |
|
Default |
錯誤模型。 |
|
Default |
詳細的錯誤。 |
|
Hosting |
要用於此資源的 App Service 環境規格。 |
|
Key |
金鑰保存庫秘密的狀態。 |
|
system |
與建立和上次修改資源相關的元數據。 |
Certificate
應用程式的 SSL 憑證。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string (arm-id) |
資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| kind |
string |
資源種類。 如果資源是應用程式,您可以參考 https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference 以取得種類支援的詳細值。 |
| location |
string |
資源所在的地理位置 |
| name |
string |
資源的名稱 |
| properties.canonicalName |
string |
要透過免費憑證發行之憑證的 CNAME |
| properties.cerBlob |
string (byte) |
.cer檔案的原始位元組 |
| properties.domainValidationMethod |
string |
免費憑證的網域驗證方法 |
| properties.expirationDate |
string (date-time) |
憑證到期日。 |
| properties.friendlyName |
string |
憑證的易記名稱。 |
| properties.hostNames |
string[] |
憑證適用的主機名。 |
| properties.hostingEnvironmentProfile |
要用於憑證的 App Service 環境規格。 |
|
| properties.issueDate |
string (date-time) |
憑證發行日期。 |
| properties.issuer |
string |
憑證簽發者。 |
| properties.keyVaultId |
string (arm-id) |
Azure Key Vault Csm 資源 ID。 |
| properties.keyVaultSecretName |
string |
Azure Key Vault 秘密名稱。 |
| properties.keyVaultSecretStatus |
金鑰保存庫秘密的狀態。 |
|
| properties.password |
string |
憑證密碼。 |
| properties.pfxBlob |
string (byte) |
Pfx Blob。 |
| properties.publicKeyHash |
string |
公鑰哈希。 |
| properties.selfLink |
string |
自我連結。 |
| properties.serverFarmId |
string (arm-id) |
關聯的應用服務計劃的資源ID。 |
| properties.siteName |
string |
應用程式名稱。 |
| properties.subjectName |
string |
憑證的主體名稱。 |
| properties.thumbprint |
string |
憑證指紋。 |
| properties.valid |
boolean |
憑證是否有效?。 |
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 中繼資料。 |
|
| tags |
object |
資源標籤。 |
| type |
string |
資源的類型。 例如「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DefaultErrorResponse
App Service 錯誤回應。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤模型。 |
DefaultErrorResponseError
錯誤模型。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
標準化字串,以程式設計方式識別錯誤。 |
| details |
詳細的錯誤。 |
|
| innererror |
string |
偵錯錯誤的詳細資訊。 |
| message |
string |
詳細的錯誤描述和偵錯資訊。 |
| target |
string |
詳細的錯誤描述和偵錯資訊。 |
DefaultErrorResponseErrorDetailsItem
詳細的錯誤。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
標準化字串,以程式設計方式識別錯誤。 |
| message |
string |
詳細的錯誤描述和偵錯資訊。 |
| target |
string |
詳細的錯誤描述和偵錯資訊。 |
HostingEnvironmentProfile
要用於此資源的 App Service 環境規格。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string |
App Service 環境的資源標識符。 |
| name |
string |
App Service 環境的名稱。 |
| type |
string |
App Service 環境的資源類型。 |
KeyVaultSecretStatus
金鑰保存庫秘密的狀態。
| 值 | Description |
|---|---|
| Initialized | |
| WaitingOnCertificateOrder | |
| Succeeded | |
| CertificateOrderFailed | |
| OperationNotPermittedOnKeyVault | |
| AzureServiceUnauthorizedToAccessKeyVault | |
| KeyVaultDoesNotExist | |
| KeyVaultSecretDoesNotExist | |
| UnknownError | |
| ExternalPrivateKey | |
| Unknown |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |