certificates
Creates, updates, deletes or gets a certificate resource or lists certificates in a region
Overview
| Name | certificates |
| Type | Resource |
| Description | Resource Type definition for AWS::Transfer::Certificate |
| Id | awscc.transfer.certificates |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
usage | string | Specifies the usage type for the certificate. |
certificate | string | Specifies the certificate body to be imported. |
certificate_chain | string | Specifies the certificate chain to be imported. |
private_key | string | Specifies the private key for the certificate. |
active_date | string | Specifies the active date for the certificate. |
inactive_date | string | Specifies the inactive date for the certificate. |
description | string | A textual description for the certificate. |
tags | array | Key-value pairs that can be used to group and search for certificates. Tags are metadata attached to certificates for any purpose. |
arn | string | Specifies the unique Amazon Resource Name (ARN) for the agreement. |
certificate_id | string | A unique identifier for the certificate. |
status | string | A status description for the certificate. |
type | string | Describing the type of certificate. With or without a private key. |
serial | string | Specifies Certificate's serial. |
not_before_date | string | Specifies the not before date for the certificate. |
not_after_date | string | Specifies the not after date for the certificate. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
certificate | string | Specifies the certificate body to be imported. |
certificate_id | string | A unique identifier for the certificate. |
region | string | AWS region. |
For more information, see AWS::Transfer::Certificate.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | certificates | INSERT | Certificate, Usage, region |
delete_resource | certificates | DELETE | Identifier, region |
update_resource | certificates | UPDATE | Identifier, PatchDocument, region |
list_resources | certificates_list_only | SELECT | region |
get_resource | certificates | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual certificate.
SELECT
region,
usage,
certificate,
certificate_chain,
private_key,
active_date,
inactive_date,
description,
tags,
arn,
certificate_id,
status,
type,
serial,
not_before_date,
not_after_date
FROM awscc.transfer.certificates
WHERE
region = '{{ region }}' AND
Identifier = '{{ certificate_id }}';
Lists all certificates in a region.
SELECT
region,
certificate_id
FROM awscc.transfer.certificates_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new certificate resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.transfer.certificates (
Usage,
Certificate,
region
)
SELECT
'{{ usage }}',
'{{ certificate }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.transfer.certificates (
Usage,
Certificate,
CertificateChain,
PrivateKey,
ActiveDate,
InactiveDate,
Description,
Tags,
region
)
SELECT
'{{ usage }}',
'{{ certificate }}',
'{{ certificate_chain }}',
'{{ private_key }}',
'{{ active_date }}',
'{{ inactive_date }}',
'{{ description }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: certificate
props:
- name: usage
value: '{{ usage }}'
- name: certificate
value: '{{ certificate }}'
- name: certificate_chain
value: '{{ certificate_chain }}'
- name: private_key
value: '{{ private_key }}'
- name: active_date
value: '{{ active_date }}'
- name: inactive_date
value: '{{ inactive_date }}'
- name: description
value: '{{ description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a certificate resource, using stack-deploy.
/*+ update */
UPDATE awscc.transfer.certificates
SET PatchDocument = string('{{ {
"Usage": usage,
"ActiveDate": active_date,
"InactiveDate": inactive_date,
"Description": description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ certificate_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.transfer.certificates
WHERE
Identifier = '{{ certificate_id }}' 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:
| Parameter | Description |
|---|---|
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 certificates resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
transfer:ImportCertificate,
transfer:TagResource
transfer:DescribeCertificate
transfer:UpdateCertificate,
transfer:UnTagResource,
transfer:TagResource
transfer:DeleteCertificate
transfer:ListCertificates