App Service Certificate Orders - Create Or Update Certificate

Description for Creates or updates a certificate and associates with key vault secret.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}?api-version=2023-01-01

URI Parameters

Name In Required Type Description
certificateOrderName
path True

string

Name of the certificate order.

name
path True

string

Name of the certificate.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

subscriptionId
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.

properties.keyVaultId

string

Key Vault resource Id.

properties.keyVaultSecretName

string

Key Vault secret name.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

AppServiceCertificateResource

App Service Certificate is created.

201 Created

AppServiceCertificateResource

App Service Certificate creation operation is in progress

Other Status Codes

DefaultErrorResponse

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 Certificate

Sample Request

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1?api-version=2023-01-01

{
  "location": "Global",
  "properties": {
    "keyVaultId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName",
    "keyVaultSecretName": "SampleSecretName1"
  }
}

Sample Response

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1",
  "name": "SampleCertName1",
  "type": "Microsoft.CertificateRegistration/certificateOrders/certificates",
  "location": "Global",
  "properties": {
    "keyVaultId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName",
    "keyVaultSecretName": "SampleSecretName1",
    "provisioningState": "Succeeded"
  }
}
{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1",
  "name": "SampleCertName1",
  "type": "Microsoft.CertificateRegistration/certificateOrders/certificates",
  "location": "Global",
  "properties": {
    "keyVaultId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName",
    "keyVaultSecretName": "SampleSecretName1",
    "provisioningState": "Succeeded"
  }
}

Definitions

Name Description
AppServiceCertificateResource

Key Vault container ARM resource for a certificate that is purchased through Azure.

DefaultErrorResponse

App Service error response.

Details
Error

Error model.

KeyVaultSecretStatus

Status of the Key Vault secret.

AppServiceCertificateResource

Key Vault container ARM resource for a certificate that is purchased through Azure.

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource.

location

string

Resource Location.

name

string

Resource Name.

properties.keyVaultId

string

Key Vault resource Id.

properties.keyVaultSecretName

string

Key Vault secret name.

properties.provisioningState

KeyVaultSecretStatus

Status of the Key Vault secret.

tags

object

Resource tags.

type

string

Resource type.

DefaultErrorResponse

App Service error response.

Name Type Description
error

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.

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