Certificates - Create Or Update
Description for Create or update a certificate.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}?api-version=2024-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
name
|
path | True |
string |
Name of the certificate. |
resource
|
path | True |
string |
Name of the resource group to which the resource belongs. Regex pattern: |
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
api-version
|
query | True |
string |
API Version |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
Resource Location. |
kind |
string |
Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. |
|
properties.canonicalName |
string |
CNAME of the certificate to be issued via free certificate |
|
properties.domainValidationMethod |
string |
Method of domain validation for free cert |
|
properties.hostNames |
string[] |
Host names the certificate applies to. |
|
properties.keyVaultId |
string |
Key Vault Csm resource Id. |
|
properties.keyVaultSecretName |
string |
Key Vault secret name. |
|
properties.password |
string |
Certificate password. |
|
properties.pfxBlob |
string |
Pfx blob. |
|
properties.serverFarmId |
string |
Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". |
|
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. |
|
Other Status Codes |
App Service error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create Or Update Certificate
Sample request
PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282?api-version=2024-04-01
{
"location": "East US",
"properties": {
"hostNames": [
"ServerCert"
],
"password": "<password>"
}
}
Sample response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282",
"name": "testc6282",
"type": "Microsoft.Web/certificates",
"location": "East US",
"properties": {
"friendlyName": "",
"subjectName": "ServerCert",
"hostNames": [
"ServerCert"
],
"issuer": "CACert",
"issueDate": "2015-11-12T23:40:25+00:00",
"expirationDate": "2039-12-31T23:59:59+00:00",
"thumbprint": "FE703D7411A44163B6D32B3AD9B03E175886EBFE"
}
}
Definitions
Name | Description |
---|---|
Certificate |
SSL certificate for an app. |
Default |
App Service error response. |
Details | |
Error |
Error model. |
Hosting |
Specification for an App Service Environment to use for this resource. |
Key |
Status of the Key Vault secret. |
Certificate
SSL certificate for an app.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
kind |
string |
Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. |
location |
string |
Resource Location. |
name |
string |
Resource Name. |
properties.canonicalName |
string |
CNAME of the certificate to be issued via free certificate |
properties.cerBlob |
string |
Raw bytes of .cer file |
properties.domainValidationMethod |
string |
Method of domain validation for free cert |
properties.expirationDate |
string |
Certificate expiration date. |
properties.friendlyName |
string |
Friendly name of the certificate. |
properties.hostNames |
string[] |
Host names the certificate applies to. |
properties.hostingEnvironmentProfile |
Specification for the App Service Environment to use for the certificate. |
|
properties.issueDate |
string |
Certificate issue Date. |
properties.issuer |
string |
Certificate issuer. |
properties.keyVaultId |
string |
Key Vault Csm resource Id. |
properties.keyVaultSecretName |
string |
Key Vault secret name. |
properties.keyVaultSecretStatus |
Status of the Key Vault secret. |
|
properties.password |
string |
Certificate password. |
properties.pfxBlob |
string |
Pfx blob. |
properties.publicKeyHash |
string |
Public key hash. |
properties.selfLink |
string |
Self link. |
properties.serverFarmId |
string |
Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". |
properties.siteName |
string |
App name. |
properties.subjectName |
string |
Subject name of the certificate. |
properties.thumbprint |
string |
Certificate thumbprint. |
properties.valid |
boolean |
Is the certificate valid?. |
tags |
object |
Resource tags. |
type |
string |
Resource type. |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Detailed errors. |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
HostingEnvironmentProfile
Specification for an App Service Environment to use for this resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID of the App Service Environment. |
name |
string |
Name of the App Service Environment. |
type |
string |
Resource type of the App Service Environment. |
KeyVaultSecretStatus
Status of the Key Vault secret.
Name | Type | Description |
---|---|---|
AzureServiceUnauthorizedToAccessKeyVault |
string |
|
CertificateOrderFailed |
string |
|
ExternalPrivateKey |
string |
|
Initialized |
string |
|
KeyVaultDoesNotExist |
string |
|
KeyVaultSecretDoesNotExist |
string |
|
OperationNotPermittedOnKeyVault |
string |
|
Succeeded |
string |
|
Unknown |
string |
|
UnknownError |
string |
|
WaitingOnCertificateOrder |
string |