Skip to main content

templates

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

Overview

Nametemplates
TypeResource
Idaws.pca_connector_ad.templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateTemplate. (pattern: <code>^arn:[\w-]+:pca-connector-ad:[\w-]+:[0-9]+:connector/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/template/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$</code>)
connector_arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateConnector. (pattern: <code>^arn:[\w-]+:pca-connector-ad:[\w-]+:[0-9]+:connector/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$</code>)
created_atstring (date-time)The date and time that the template was created.
definitionobjectTemplate configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.
namestringName of the template. The template name must be unique. (pattern: <code>^(?!^\s+$)((?![\x5c'\x2b,;<=>#\x22])([\x20-\x7E]))+$</code>)
object_identifierstringObject identifier of a template. (pattern: <code>^([0-2]).([0-9]|([0-3][0-9]))(.([0-9]+)){0,126}$</code>)
policy_schemaintegerThe template schema version. Template schema versions can be v2, v3, or v4. The template configuration options change based on the template schema version.
revisionobjectThe revision version of the template. Template updates will increment the minor revision. Re-enrolling all certificate holders will increment the major revision.
statusstringStatus of the template. Status can be creating, active, deleting, or failed. (ACTIVE, DELETING)
updated_atstring (date-time)The date and time that the template was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_templatesselectConnectorArn, regionMaxResults, NextTokenLists the templates, if any, that are associated with a connector.
get_templateselecttemplate_arn, regionRetrieves a certificate template that the connector uses to issue certificates from a private CA.
create_templateinsertregion, ConnectorArnCreates an Active Directory compatible certificate template. The connectors issues certificates using these templates based on the requester’s Active Directory group membership.
update_templateupdatetemplate_arn, regionUpdate template configuration to define the information included in certificates.
delete_templatedeletetemplate_arn, regionDeletes a template. Certificates issued using the template are still valid until they are revoked or expired.

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
ConnectorArnstringThe Amazon Resource Name (ARN) that was returned when you called CreateConnector.
regionstringAWS region (default: us-east-1)
template_arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateTemplate.
MaxResultsintegerUse this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.
NextTokenstringUse this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

SELECT examples

Lists the templates, if any, that are associated with a connector.

SELECT
arn,
connector_arn,
created_at,
definition,
name,
object_identifier,
policy_schema,
revision,
status,
updated_at
FROM aws.pca_connector_ad.templates
WHERE ConnectorArn = '{{ ConnectorArn }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;

INSERT examples

Creates an Active Directory compatible certificate template. The connectors issues certificates using these templates based on the requester’s Active Directory group membership.

INSERT INTO aws.pca_connector_ad.templates (
ClientToken,
ConnectorArn,
Definition,
Name,
Tags,
region
)
SELECT
'{{ ClientToken }}',
'{{ ConnectorArn }}' /* required */,
'{{ Definition }}',
'{{ Name }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
template_arn
;

UPDATE examples

Update template configuration to define the information included in certificates.

UPDATE aws.pca_connector_ad.templates
SET
Definition = '{{ Definition }}',
ReenrollAllCertificateHolders = {{ ReenrollAllCertificateHolders }}
WHERE
template_arn = '{{ template_arn }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a template. Certificates issued using the template are still valid until they are revoked or expired.

DELETE FROM aws.pca_connector_ad.templates
WHERE template_arn = '{{ template_arn }}' --required
AND region = '{{ region }}' --required
;