certificates
Creates, updates, deletes, gets or lists a certificates resource.
Overview
| Name | certificates |
| Type | Resource |
| Id | aws.transfer.certificates |
Fields
The following fields are returned by SELECT queries:
- describe_certificate
- list_certificates
| Name | Datatype | Description |
|---|---|---|
active_date | string (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. |
arn | string | The unique Amazon Resource Name (ARN) for the certificate. (pattern: <code>arn:\S+</code>) |
certificate | string | The file name for the certificate. (pattern: <code>[\t\n\r\u0020-\u00FF]+</code>) |
certificate_chain | string | The list of certificates that make up the chain for the certificate. (pattern: <code>[\t\n\r\u0020-\u00FF]+</code>) |
certificate_id | string | An 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>) |
description | string | The name or description that's used to identity the certificate. (pattern: <code>[\u0021-\u007E]+</code>) |
inactive_date | string (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_date | string (date-time) | The final date that the certificate is valid. |
not_before_date | string (date-time) | The earliest date that the certificate is valid. |
serial | string | The serial number for the certificate. (pattern: <code>[0-9a-fA-F{}:?]*</code>) |
status | string | A 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) |
tags | array | Key-value pairs that can be used to group and search for certificates. |
type | string | If 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) |
usage | string | Specifies 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) |
| Name | Datatype | Description |
|---|---|---|
active_date | string (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. |
arn | string | The Amazon Resource Name (ARN) of the specified certificate. (pattern: <code>arn:\S+</code>) |
certificate_id | string | An 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>) |
description | string | The name or short description that's used to identify the certificate. (pattern: <code>[\u0021-\u007E]+</code>) |
inactive_date | string (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. |
status | string | The certificate can be either ACTIVE, PENDING_ROTATION, or INACTIVE. PENDING_ROTATION means that this certificate will replace the current certificate when it expires. (ACTIVE, PENDING_ROTATION, INACTIVE) |
type | string | The type for the certificate. If 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) |
usage | string | Specifies 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_certificate | select | region | 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. | |
list_certificates | select | region | Returns 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_certificate | update | region, CertificateId | Updates the active and inactive dates for a certificate. | |
delete_certificate | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_certificate
- list_certificates
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
;
Returns 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.
SELECT
active_date,
arn,
certificate_id,
description,
inactive_date,
status,
type,
usage
FROM aws.transfer.certificates
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_certificate
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
- delete_certificate
Deletes the certificate that's specified in the CertificateId parameter.
DELETE FROM aws.transfer.certificates
WHERE region = '{{ region }}' --required
;