Skip to main content

certificates

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

Overview

Namecertificates
TypeResource
Idazure.api_management.certificates

Fields

NameDatatypeDescription
certificateIdtextfield from the properties object
expiration_datetextfield from the properties object
key_vaulttextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subjecttextfield from the properties object
subscriptionIdtextfield from the properties object
thumbprinttextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcertificateId, resourceGroupName, serviceName, subscriptionIdGets the details of the certificate specified by its identifier.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists a collection of all certificates in the specified service instance.
create_or_updateINSERTcertificateId, resourceGroupName, serviceName, subscriptionIdCreates or updates the certificate being used for authentication with the backend.
deleteDELETEIf-Match, certificateId, resourceGroupName, serviceName, subscriptionIdDeletes specific certificate.
refresh_secretEXECcertificateId, resourceGroupName, serviceName, subscriptionIdFrom KeyVault, Refresh the certificate being used for authentication with the backend.

SELECT examples

Lists a collection of all certificates in the specified service instance.

SELECT
certificateId,
expiration_date,
key_vault,
resourceGroupName,
serviceName,
subject,
subscriptionId,
thumbprint
FROM azure.api_management.vw_certificates
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new certificates resource.

/*+ create */
INSERT INTO azure.api_management.certificates (
certificateId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ certificateId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified certificates resource.

/*+ delete */
DELETE FROM azure.api_management.certificates
WHERE If-Match = '{{ If-Match }}'
AND certificateId = '{{ certificateId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';