site_certificates
Creates, updates, deletes, gets or lists a site_certificates resource.
Overview
| Name | site_certificates |
| Type | Resource |
| Id | azure.web.site_certificates |
Fields
The following fields are returned by SELECT queries:
- get_slot
- get
- list_slot
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
canonicalName | string | CNAME of the certificate to be issued via free certificate. |
cerBlob | string (byte) | Raw bytes of .cer file. |
domainValidationMethod | string | Method of domain validation for free cert. |
expirationDate | string (date-time) | Certificate expiration date. |
friendlyName | string | Friendly name of the certificate. |
hostNames | array | Host names the certificate applies to. |
hostingEnvironmentProfile | object | Specification for the App Service Environment to use for the certificate. |
issueDate | string (date-time) | Certificate issue Date. |
issuer | string | Certificate issuer. |
keyVaultId | string | Azure Key Vault Csm resource Id. |
keyVaultSecretName | string | Azure Key Vault secret name. |
keyVaultSecretStatus | string | Status 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) |
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 | The geo-location where the resource lives. Required. |
password | string | Certificate password. |
pfxBlob | string (byte) | Pfx blob. |
publicKeyHash | string | Public key hash. |
selfLink | string | Self link. |
serverFarmId | string | Resource ID of the associated App Service plan. |
siteName | string | App name. |
subjectName | string | Subject name of the certificate. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
thumbprint | string | Certificate thumbprint. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
valid | boolean | Is the certificate valid?. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
canonicalName | string | CNAME of the certificate to be issued via free certificate. |
cerBlob | string (byte) | Raw bytes of .cer file. |
domainValidationMethod | string | Method of domain validation for free cert. |
expirationDate | string (date-time) | Certificate expiration date. |
friendlyName | string | Friendly name of the certificate. |
hostNames | array | Host names the certificate applies to. |
hostingEnvironmentProfile | object | Specification for the App Service Environment to use for the certificate. |
issueDate | string (date-time) | Certificate issue Date. |
issuer | string | Certificate issuer. |
keyVaultId | string | Azure Key Vault Csm resource Id. |
keyVaultSecretName | string | Azure Key Vault secret name. |
keyVaultSecretStatus | string | Status 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) |
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 | The geo-location where the resource lives. Required. |
password | string | Certificate password. |
pfxBlob | string (byte) | Pfx blob. |
publicKeyHash | string | Public key hash. |
selfLink | string | Self link. |
serverFarmId | string | Resource ID of the associated App Service plan. |
siteName | string | App name. |
subjectName | string | Subject name of the certificate. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
thumbprint | string | Certificate thumbprint. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
valid | boolean | Is the certificate valid?. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
canonicalName | string | CNAME of the certificate to be issued via free certificate. |
cerBlob | string (byte) | Raw bytes of .cer file. |
domainValidationMethod | string | Method of domain validation for free cert. |
expirationDate | string (date-time) | Certificate expiration date. |
friendlyName | string | Friendly name of the certificate. |
hostNames | array | Host names the certificate applies to. |
hostingEnvironmentProfile | object | Specification for the App Service Environment to use for the certificate. |
issueDate | string (date-time) | Certificate issue Date. |
issuer | string | Certificate issuer. |
keyVaultId | string | Azure Key Vault Csm resource Id. |
keyVaultSecretName | string | Azure Key Vault secret name. |
keyVaultSecretStatus | string | Status 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) |
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 | The geo-location where the resource lives. Required. |
password | string | Certificate password. |
pfxBlob | string (byte) | Pfx blob. |
publicKeyHash | string | Public key hash. |
selfLink | string | Self link. |
serverFarmId | string | Resource ID of the associated App Service plan. |
siteName | string | App name. |
subjectName | string | Subject name of the certificate. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
thumbprint | string | Certificate thumbprint. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
valid | boolean | Is the certificate valid?. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
canonicalName | string | CNAME of the certificate to be issued via free certificate. |
cerBlob | string (byte) | Raw bytes of .cer file. |
domainValidationMethod | string | Method of domain validation for free cert. |
expirationDate | string (date-time) | Certificate expiration date. |
friendlyName | string | Friendly name of the certificate. |
hostNames | array | Host names the certificate applies to. |
hostingEnvironmentProfile | object | Specification for the App Service Environment to use for the certificate. |
issueDate | string (date-time) | Certificate issue Date. |
issuer | string | Certificate issuer. |
keyVaultId | string | Azure Key Vault Csm resource Id. |
keyVaultSecretName | string | Azure Key Vault secret name. |
keyVaultSecretStatus | string | Status 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) |
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 | The geo-location where the resource lives. Required. |
password | string | Certificate password. |
pfxBlob | string (byte) | Pfx blob. |
publicKeyHash | string | Public key hash. |
selfLink | string | Self link. |
serverFarmId | string | Resource ID of the associated App Service plan. |
siteName | string | App name. |
subjectName | string | Subject name of the certificate. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
thumbprint | string | Certificate thumbprint. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
valid | boolean | Is the certificate valid?. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_slot | select | resource_group_name, name, slot, certificate_name, subscription_id | Get a certificate for a given site and deployment slot. Get a certificate for a given site and deployment slot. | |
get | select | resource_group_name, name, certificate_name, subscription_id | Get a certificate belonging to a given site. Get a certificate belonging to a given site. | |
list_slot | select | resource_group_name, name, slot, subscription_id | Get 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. | |
list | select | resource_group_name, name, subscription_id | Get all certificates in a resource group under a site. Get all certificates in a resource group under a site. | |
create_or_update | insert | resource_group_name, name, certificate_name, subscription_id, location | Create or update a certificate under a given site. Create or update a certificate under a given site. | |
update | update | resource_group_name, name, certificate_name, subscription_id | Create or update a certificate under a given site. Create or update a certificate under a given site. | |
create_or_update | replace | resource_group_name, name, certificate_name, subscription_id, location | Create or update a certificate under a given site. Create or update a certificate under a given site. | |
delete | delete | resource_group_name, name, certificate_name, subscription_id | Delete a certificate from the site. Delete a certificate from the site. | |
create_or_update_slot | exec | resource_group_name, name, slot, certificate_name, subscription_id, location | Create or update a certificate in a given site and deployment slot. Create or update a certificate in a given site and deployment slot. | |
update_slot | exec | resource_group_name, name, slot, certificate_name, subscription_id | Create or update a certificate for a site and deployment slot. Create or update a certificate for a site and deployment slot. | |
delete_slot | exec | resource_group_name, name, slot, certificate_name, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
certificate_name | string | Name of the certificate. Required. |
name | string | Name of the site. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
slot | string | Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. Required. |
subscription_id | string |
SELECT examples
- get_slot
- get
- list_slot
- list
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
;
Get a certificate belonging to a given site. Get a certificate belonging to a given site.
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 certificate_name = '{{ certificate_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get 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.
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 subscription_id = '{{ subscription_id }}' -- required
;
Get all certificates in a resource group under a site. Get all certificates in a resource group under a site.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: site_certificates
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the site_certificates resource.
- name: name
value: "{{ name }}"
description: Required parameter for the site_certificates resource.
- name: certificate_name
value: "{{ certificate_name }}"
description: Required parameter for the site_certificates resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the site_certificates resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Certificate resource specific properties.
value:
password: "{{ password }}"
friendlyName: "{{ friendlyName }}"
subjectName: "{{ subjectName }}"
hostNames:
- "{{ hostNames }}"
pfxBlob: "{{ pfxBlob }}"
siteName: "{{ siteName }}"
selfLink: "{{ selfLink }}"
issuer: "{{ issuer }}"
issueDate: "{{ issueDate }}"
expirationDate: "{{ expirationDate }}"
thumbprint: "{{ thumbprint }}"
valid: {{ valid }}
cerBlob: "{{ cerBlob }}"
publicKeyHash: "{{ publicKeyHash }}"
hostingEnvironmentProfile:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
keyVaultId: "{{ keyVaultId }}"
keyVaultSecretName: "{{ keyVaultSecretName }}"
keyVaultSecretStatus: "{{ keyVaultSecretStatus }}"
serverFarmId: "{{ serverFarmId }}"
canonicalName: "{{ canonicalName }}"
domainValidationMethod: "{{ domainValidationMethod }}"
- name: kind
value: "{{ kind }}"
description: |
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.
UPDATE examples
- update
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
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
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_slot
- update_slot
- delete_slot
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 }}"
}'
;
Create or update a certificate for a site and deployment slot. Create or update a certificate for a site and deployment slot.
EXEC azure.web.site_certificates.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=
'{
"kind": "{{ kind }}",
"properties": "{{ properties }}"
}'
;
Delete a certificate for a given site and deployment slot. Delete a certificate for a given site and deployment slot.
EXEC azure.web.site_certificates.delete_slot
@resource_group_name='{{ resource_group_name }}' --required,
@name='{{ name }}' --required,
@slot='{{ slot }}' --required,
@certificate_name='{{ certificate_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;