Skip to main content

server_certificates

Creates, updates, deletes or gets a server_certificate resource or lists server_certificates in a region

Overview

Nameserver_certificates
TypeResource
DescriptionResource Type definition for AWS::IAM::ServerCertificate
Idaws.iam.server_certificates

Fields

NameDatatypeDescription
certificate_bodystring
certificate_chainstring
server_certificate_namestring
pathstring
private_keystring
arnstringAmazon Resource Name (ARN) of the server certificate
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all server_certificates in a region.

SELECT
region,
certificate_body,
certificate_chain,
server_certificate_name,
path,
private_key,
arn,
tags
FROM aws.iam.server_certificates
;

Gets all properties from an individual server_certificate.

SELECT
region,
certificate_body,
certificate_chain,
server_certificate_name,
path,
private_key,
arn,
tags
FROM aws.iam.server_certificates
WHERE data__Identifier = '<ServerCertificateName>';

INSERT example

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

/*+ create */
INSERT INTO aws.iam.server_certificates (
CertificateBody,
CertificateChain,
ServerCertificateName,
Path,
PrivateKey,
Tags,
region
)
SELECT
'{{ CertificateBody }}',
'{{ CertificateChain }}',
'{{ ServerCertificateName }}',
'{{ Path }}',
'{{ PrivateKey }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iam.server_certificates
WHERE data__Identifier = '<ServerCertificateName>'
AND region = 'us-east-1';

Permissions

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

Create

iam:UploadServerCertificate,
iam:TagServerCertificate,
iam:GetServerCertificate

Read

iam:GetServerCertificate

Update

iam:TagServerCertificate,
iam:UntagServerCertificate,
iam:ListServerCertificateTags,
iam:GetServerCertificate

Delete

iam:DeleteServerCertificate

List

iam:ListServerCertificates,
iam:GetServerCertificate