Skip to main content

site_certificates

Creates, updates, deletes, gets or lists a site_certificates resource.

Overview

Namesite_certificates
TypeResource
Idazure.web.site_certificates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
canonicalNamestringCNAME of the certificate to be issued via free certificate.
cerBlobstring (byte)Raw bytes of .cer file.
domainValidationMethodstringMethod of domain validation for free cert.
expirationDatestring (date-time)Certificate expiration date.
friendlyNamestringFriendly name of the certificate.
hostNamesarrayHost names the certificate applies to.
hostingEnvironmentProfileobjectSpecification for the App Service Environment to use for the certificate.
issueDatestring (date-time)Certificate issue Date.
issuerstringCertificate issuer.
keyVaultIdstringAzure Key Vault Csm resource Id.
keyVaultSecretNamestringAzure Key Vault secret name.
keyVaultSecretStatusstringStatus of the Key Vault secret. Known values are: "Initialized", "WaitingOnCertificateOrder", "Succeeded", "CertificateOrderFailed", "OperationNotPermittedOnKeyVault", "AzureServiceUnauthorizedToAccessKeyVault", "KeyVaultDoesNotExist", "KeyVaultSecretDoesNotExist", "UnknownError", "ExternalPrivateKey", and "Unknown". (Initialized, WaitingOnCertificateOrder, Succeeded, CertificateOrderFailed, OperationNotPermittedOnKeyVault, AzureServiceUnauthorizedToAccessKeyVault, KeyVaultDoesNotExist, KeyVaultSecretDoesNotExist, UnknownError, ExternalPrivateKey, Unknown)
kindstringKind 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.
locationstringThe geo-location where the resource lives. Required.
passwordstringCertificate password.
pfxBlobstring (byte)Pfx blob.
publicKeyHashstringPublic key hash.
selfLinkstringSelf link.
serverFarmIdstringResource ID of the associated App Service plan.
siteNamestringApp name.
subjectNamestringSubject name of the certificate.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
thumbprintstringCertificate thumbprint.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
validbooleanIs the certificate valid?.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_slotselectresource_group_name, name, slot, certificate_name, subscription_idGet a certificate for a given site and deployment slot. Get a certificate for a given site and deployment slot.
getselectresource_group_name, name, certificate_name, subscription_idGet a certificate belonging to a given site. Get a certificate belonging to a given site.
list_slotselectresource_group_name, name, slot, subscription_idGet all certificates in a resource group for a given site and a deployment slot. Get all certificates in a resource group for a given site and a deployment slot.
listselectresource_group_name, name, subscription_idGet all certificates in a resource group under a site. Get all certificates in a resource group under a site.
create_or_updateinsertresource_group_name, name, certificate_name, subscription_id, locationCreate or update a certificate under a given site. Create or update a certificate under a given site.
updateupdateresource_group_name, name, certificate_name, subscription_idCreate or update a certificate under a given site. Create or update a certificate under a given site.
create_or_updatereplaceresource_group_name, name, certificate_name, subscription_id, locationCreate or update a certificate under a given site. Create or update a certificate under a given site.
deletedeleteresource_group_name, name, certificate_name, subscription_idDelete a certificate from the site. Delete a certificate from the site.
create_or_update_slotexecresource_group_name, name, slot, certificate_name, subscription_id, locationCreate or update a certificate in a given site and deployment slot. Create or update a certificate in a given site and deployment slot.
update_slotexecresource_group_name, name, slot, certificate_name, subscription_idCreate or update a certificate for a site and deployment slot. Create or update a certificate for a site and deployment slot.
delete_slotexecresource_group_name, name, slot, certificate_name, subscription_idDelete a certificate for a given site and deployment slot. Delete a certificate for a given site and deployment slot.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
certificate_namestringName of the certificate. Required.
namestringName of the site. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
slotstringName of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. Required.
subscription_idstring

SELECT examples

Get a certificate for a given site and deployment slot. Get a certificate for a given site and deployment slot.

SELECT
id,
name,
canonicalName,
cerBlob,
domainValidationMethod,
expirationDate,
friendlyName,
hostNames,
hostingEnvironmentProfile,
issueDate,
issuer,
keyVaultId,
keyVaultSecretName,
keyVaultSecretStatus,
kind,
location,
password,
pfxBlob,
publicKeyHash,
selfLink,
serverFarmId,
siteName,
subjectName,
systemData,
tags,
thumbprint,
type,
valid
FROM azure.web.site_certificates
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND name = '{{ name }}' -- required
AND slot = '{{ slot }}' -- required
AND certificate_name = '{{ certificate_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a certificate under a given site. Create or update a certificate under a given site.

INSERT INTO azure.web.site_certificates (
tags,
location,
properties,
kind,
resource_group_name,
name,
certificate_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ kind }}',
'{{ resource_group_name }}',
'{{ name }}',
'{{ certificate_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Create or update a certificate under a given site. Create or update a certificate under a given site.

UPDATE azure.web.site_certificates
SET
kind = '{{ kind }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND certificate_name = '{{ certificate_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
kind,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update a certificate under a given site. Create or update a certificate under a given site.

REPLACE azure.web.site_certificates
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
kind = '{{ kind }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND certificate_name = '{{ certificate_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a certificate from the site. Delete a certificate from the site.

DELETE FROM azure.web.site_certificates
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND certificate_name = '{{ certificate_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Create or update a certificate in a given site and deployment slot. Create or update a certificate in a given site and deployment slot.

EXEC azure.web.site_certificates.create_or_update_slot 
@resource_group_name='{{ resource_group_name }}' --required,
@name='{{ name }}' --required,
@slot='{{ slot }}' --required,
@certificate_name='{{ certificate_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"tags": "{{ tags }}",
"location": "{{ location }}",
"properties": "{{ properties }}",
"kind": "{{ kind }}"
}'
;