Skip to main content

workspace_certificate

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

Overview

Nameworkspace_certificate
TypeResource
Idazure.api_management.workspace_certificate

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.
expirationDatestring (date-time)Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. Required.
keyVaultobjectKeyVault location details of the certificate.
subjectstringSubject attribute of the certificate. Required.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
thumbprintstringThumbprint of the certificate. Required.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, service_name, workspace_id, certificate_id, subscription_idGets the details of the certificate specified by its identifier.
list_by_workspaceselectresource_group_name, service_name, workspace_id, subscription_id$filter, $top, $skip, isKeyVaultRefreshFailedLists a collection of all certificates in the specified workspace.
create_or_updateinsertresource_group_name, service_name, workspace_id, certificate_id, subscription_idCreates or updates the certificate being used for authentication with the backend.
create_or_updatereplaceresource_group_name, service_name, workspace_id, certificate_id, subscription_idCreates or updates the certificate being used for authentication with the backend.
deletedeleteresource_group_name, service_name, workspace_id, certificate_id, subscription_idDeletes specific certificate.
get_entity_tagexecresource_group_name, service_name, workspace_id, certificate_id, subscription_idGets the entity state (Etag) version of the certificate specified by its identifier.
refresh_secretexecresource_group_name, service_name, workspace_id, certificate_id, subscription_idFrom 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
certificate_idstringIdentifier of the certificate entity. Must be unique in the current API Management service instance. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring
workspace_idstringWorkspace identifier. Must be unique in the current API Management service instance. Required.
$filterstring| Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || expirationDate | filter | ge, le, eq, ne, gt, lt | |. Default value is None.
$skipintegerNumber of records to skip. Default value is None.
$topintegerNumber of records to return. Default value is None.
isKeyVaultRefreshFailedbooleanWhen set to true, the response contains only certificates entities which failed refresh. Default value is None.

SELECT examples

Gets the details of the certificate specified by its identifier.

SELECT
id,
name,
expirationDate,
keyVault,
subject,
systemData,
thumbprint,
type
FROM azure.api_management.workspace_certificate
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
AND certificate_id = '{{ certificate_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.api_management.workspace_certificate (
properties,
resource_group_name,
service_name,
workspace_id,
certificate_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ workspace_id }}',
'{{ certificate_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

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

REPLACE azure.api_management.workspace_certificate
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND certificate_id = '{{ certificate_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes specific certificate.

DELETE FROM azure.api_management.workspace_certificate
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND workspace_id = '{{ workspace_id }}' --required
AND certificate_id = '{{ certificate_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the entity state (Etag) version of the certificate specified by its identifier.

EXEC azure.api_management.workspace_certificate.get_entity_tag 
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@workspace_id='{{ workspace_id }}' --required,
@certificate_id='{{ certificate_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;