Skip to main content

certificates

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

Overview

Namecertificates
TypeResource
Idaws.transfer.certificates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
active_datestring (date-time)An optional date that specifies when the certificate becomes active. If you do not specify a value, ActiveDate takes the same value as NotBeforeDate, which is specified by the CA.
arnstringThe unique Amazon Resource Name (ARN) for the certificate. (pattern: <code>arn:\S+</code>)
certificatestringThe file name for the certificate. (pattern: <code>[\t\n\r\u0020-\u00FF]+</code>)
certificate_chainstringThe list of certificates that make up the chain for the certificate. (pattern: <code>[\t\n\r\u0020-\u00FF]+</code>)
certificate_idstringAn array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles. (pattern: <code>cert-([0-9a-f]{17})</code>)
descriptionstringThe name or description that's used to identity the certificate. (pattern: <code>[\u0021-\u007E]+</code>)
inactive_datestring (date-time)An optional date that specifies when the certificate becomes inactive. If you do not specify a value, InactiveDate takes the same value as NotAfterDate, which is specified by the CA.
not_after_datestring (date-time)The final date that the certificate is valid.
not_before_datestring (date-time)The earliest date that the certificate is valid.
serialstringThe serial number for the certificate. (pattern: <code>[0-9a-fA-F{}:?]*</code>)
statusstringA certificate's status can be either ACTIVE or INACTIVE. You can set ActiveDate and InactiveDate in the UpdateCertificate call. If you set values for these parameters, those values are used to determine whether the certificate has a status of ACTIVE or INACTIVE. If you don't set values for ActiveDate and InactiveDate, we use the NotBefore and NotAfter date as specified on the X509 certificate to determine when a certificate is active and when it is inactive. (ACTIVE, PENDING_ROTATION, INACTIVE)
tagsarrayKey-value pairs that can be used to group and search for certificates.
typestringIf a private key has been specified for the certificate, its type is CERTIFICATE_WITH_PRIVATE_KEY. If there is no private key, the type is CERTIFICATE. (CERTIFICATE, CERTIFICATE_WITH_PRIVATE_KEY)
usagestringSpecifies how this certificate is used. It can be used in the following ways: SIGNING: For signing AS2 messages ENCRYPTION: For encrypting AS2 messages TLS: For securing AS2 communications sent over HTTPS (SIGNING, ENCRYPTION, TLS)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_certificateselectregionDescribes the certificate that's identified by the CertificateId. Transfer Family automatically publishes a Amazon CloudWatch metric called DaysUntilExpiry for imported certificates. This metric tracks the number of days until the certificate expires based on the InactiveDate. The metric is available in the AWS/Transfer namespace and includes the CertificateId as a dimension.
list_certificatesselectregionReturns a list of the current certificates that have been imported into Transfer Family. If you want to limit the results to a certain number, supply a value for the MaxResults parameter. If you ran the command previously and received a value for the NextToken parameter, you can supply that value to continue listing certificates from where you left off.
update_certificateupdateregion, CertificateIdUpdates the active and inactive dates for a certificate.
delete_certificatedeleteregionDeletes the certificate that's specified in the CertificateId parameter.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the certificate that's identified by the CertificateId. Transfer Family automatically publishes a Amazon CloudWatch metric called DaysUntilExpiry for imported certificates. This metric tracks the number of days until the certificate expires based on the InactiveDate. The metric is available in the AWS/Transfer namespace and includes the CertificateId as a dimension.

SELECT
active_date,
arn,
certificate,
certificate_chain,
certificate_id,
description,
inactive_date,
not_after_date,
not_before_date,
serial,
status,
tags,
type,
usage
FROM aws.transfer.certificates
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Updates the active and inactive dates for a certificate.

UPDATE aws.transfer.certificates
SET
CertificateId = '{{ CertificateId }}',
ActiveDate = '{{ ActiveDate }}',
InactiveDate = '{{ InactiveDate }}',
Description = '{{ Description }}'
WHERE
region = '{{ region }}' --required
AND CertificateId = '{{ CertificateId }}' --required
RETURNING
certificate_id;

DELETE examples

Deletes the certificate that's specified in the CertificateId parameter.

DELETE FROM aws.transfer.certificates
WHERE region = '{{ region }}' --required
;