Skip to main content

templates

Creates, updates, deletes or gets a template resource or lists templates in a region

Overview

Nametemplates
TypeResource
DescriptionRepresents a template that defines certificate configurations, both for issuance and client handling
Idawscc.pcaconnectorad.templates

Fields

NameDatatypeDescription
connector_arnstring
definitionobject
namestring
reenroll_all_certificate_holdersboolean
tagsobject
template_arnstring
regionstringAWS region.

For more information, see AWS::PCAConnectorAD::Template.

Methods

NameResourceAccessible byRequired Params
create_resourcetemplatesINSERTConnectorArn, Definition, Name, region
delete_resourcetemplatesDELETEIdentifier, region
update_resourcetemplatesUPDATEIdentifier, PatchDocument, region
list_resourcestemplates_list_onlySELECTregion
get_resourcetemplatesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual template.

SELECT
region,
connector_arn,
definition,
name,
reenroll_all_certificate_holders,
tags,
template_arn
FROM awscc.pcaconnectorad.templates
WHERE
region = '{{ region }}' AND
Identifier = '{{ template_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new template resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.pcaconnectorad.templates (
ConnectorArn,
Definition,
Name,
region
)
SELECT
'{{ connector_arn }}',
'{{ definition }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a template resource, using stack-deploy.

/*+ update */
UPDATE awscc.pcaconnectorad.templates
SET PatchDocument = string('{{ {
"Definition": definition,
"ReenrollAllCertificateHolders": reenroll_all_certificate_holders,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ template_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.pcaconnectorad.templates
WHERE
Identifier = '{{ template_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the templates resource, the following permissions are required:

pca-connector-ad:CreateTemplate,
pca-connector-ad:TagResource