workspace_certificate
Creates, updates, deletes, gets or lists a workspace_certificate resource.
Overview
| Name | workspace_certificate |
| Type | Resource |
| Id | azure.api_management.workspace_certificate |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_workspace
| 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. |
expirationDate | string (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. |
keyVault | object | KeyVault location details of the certificate. |
subject | string | Subject attribute of the certificate. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
thumbprint | string | Thumbprint of the certificate. Required. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
expirationDate | string (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. |
keyVault | object | KeyVault location details of the certificate. |
subject | string | Subject attribute of the certificate. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
thumbprint | string | Thumbprint of the certificate. Required. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, service_name, workspace_id, certificate_id, subscription_id | Gets the details of the certificate specified by its identifier. | |
list_by_workspace | select | resource_group_name, service_name, workspace_id, subscription_id | $filter, $top, $skip, isKeyVaultRefreshFailed | Lists a collection of all certificates in the specified workspace. |
create_or_update | insert | resource_group_name, service_name, workspace_id, certificate_id, subscription_id | Creates or updates the certificate being used for authentication with the backend. | |
create_or_update | replace | resource_group_name, service_name, workspace_id, certificate_id, subscription_id | Creates or updates the certificate being used for authentication with the backend. | |
delete | delete | resource_group_name, service_name, workspace_id, certificate_id, subscription_id | Deletes specific certificate. | |
get_entity_tag | exec | resource_group_name, service_name, workspace_id, certificate_id, subscription_id | Gets the entity state (Etag) version of the certificate specified by its identifier. | |
refresh_secret | exec | resource_group_name, service_name, workspace_id, certificate_id, subscription_id | From 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.
| Name | Datatype | Description |
|---|---|---|
certificate_id | string | Identifier of the certificate entity. Must be unique in the current API Management service instance. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
workspace_id | string | Workspace identifier. Must be unique in the current API Management service instance. Required. |
$filter | string | | 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. |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
isKeyVaultRefreshFailed | boolean | When set to true, the response contains only certificates entities which failed refresh. Default value is None. |
SELECT examples
- get
- list_by_workspace
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
;
Lists a collection of all certificates in the specified workspace.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND isKeyVaultRefreshFailed = '{{ isKeyVaultRefreshFailed }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: workspace_certificate
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the workspace_certificate resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the workspace_certificate resource.
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the workspace_certificate resource.
- name: certificate_id
value: "{{ certificate_id }}"
description: Required parameter for the workspace_certificate resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the workspace_certificate resource.
- name: properties
description: |
Certificate create or update properties details.
value:
data: "{{ data }}"
password: "{{ password }}"
keyVault:
secretIdentifier: "{{ secretIdentifier }}"
identityClientId: "{{ identityClientId }}"
REPLACE examples
- create_or_update
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
- delete
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
- get_entity_tag
- refresh_secret
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
;
From KeyVault, Refresh the certificate being used for authentication with the backend.
EXEC azure.api_management.workspace_certificate.refresh_secret
@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
;