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 | aws.transfer.certificates |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Certificate, Usage, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all certificates
in a region.
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 aws.transfer.certificates
WHERE region = 'us-east-1';
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 aws.transfer.certificates
WHERE region = 'us-east-1' AND data__Identifier = '<CertificateId>';
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 aws.transfer.certificates (
Usage,
Certificate,
region
)
SELECT
'{{ Usage }}',
'{{ Certificate }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.transfer.certificates (
Usage,
Certificate,
CertificateChain,
PrivateKey,
ActiveDate,
InactiveDate,
Description,
Tags,
region
)
SELECT
'{{ Usage }}',
'{{ Certificate }}',
'{{ CertificateChain }}',
'{{ PrivateKey }}',
'{{ ActiveDate }}',
'{{ InactiveDate }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}';
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: CertificateChain
value: '{{ CertificateChain }}'
- name: PrivateKey
value: '{{ PrivateKey }}'
- name: ActiveDate
value: '{{ ActiveDate }}'
- name: InactiveDate
value: '{{ InactiveDate }}'
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.transfer.certificates
WHERE data__Identifier = '<CertificateId>'
AND region = 'us-east-1';
Permissions
To operate on the certificates
resource, the following permissions are required:
Create
transfer:ImportCertificate,
transfer:TagResource
Read
transfer:DescribeCertificate
Update
transfer:UpdateCertificate,
transfer:UnTagResource,
transfer:TagResource
Delete
transfer:DeleteCertificate
List
transfer:ListCertificates