Skip to main content

workspace_certificates

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

Overview

Nameworkspace_certificates
TypeResource
Idazure.api_management.workspace_certificates

Fields

The following fields are returned by SELECT queries:

The response body contains the specified Certificate entity.

NameDatatypeDescription
propertiesobjectCertificate properties details.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, workspaceId, certificateId, subscriptionIdGets the details of the certificate specified by its identifier.
list_by_workspaceselectresourceGroupName, serviceName, workspaceId, subscriptionId$filter, $top, $skip, isKeyVaultRefreshFailedLists a collection of all certificates in the specified workspace.
create_or_updateinsertresourceGroupName, serviceName, workspaceId, certificateId, subscriptionIdIf-MatchCreates or updates the certificate being used for authentication with the backend.
deletedeleteresourceGroupName, serviceName, workspaceId, certificateId, If-Match, subscriptionIdDeletes specific certificate.
refresh_secretexecresourceGroupName, serviceName, workspaceId, certificateId, subscriptionIdFrom KeyVault, Refresh the certificate being used for authentication with the backend.

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
If-MatchstringETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
certificateIdstringIdentifier of the certificate entity. Must be unique in the current API Management service instance.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
workspaceIdstringWorkspace identifier. Must be unique in the current API Management service instance.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.
isKeyVaultRefreshFailedbooleanWhen set to true, the response contains only certificates entities which failed refresh.

SELECT examples

Gets the details of the certificate specified by its identifier.

SELECT
properties
FROM azure.api_management.workspace_certificates
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND workspaceId = '{{ workspaceId }}' -- required
AND certificateId = '{{ certificateId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates the certificate being used for authentication with the backend.

INSERT INTO azure.api_management.workspace_certificates (
data__properties,
resourceGroupName,
serviceName,
workspaceId,
certificateId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ workspaceId }}',
'{{ certificateId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;

DELETE examples

Deletes specific certificate.

DELETE FROM azure.api_management.workspace_certificates
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND workspaceId = '{{ workspaceId }}' --required
AND certificateId = '{{ certificateId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

From KeyVault, Refresh the certificate being used for authentication with the backend.

EXEC azure.api_management.workspace_certificates.refresh_secret 
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@workspaceId='{{ workspaceId }}' --required,
@certificateId='{{ certificateId }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;