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
Idawscc.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.

For more information, see AWS::IAM::ServerCertificate.

Methods

NameResourceAccessible byRequired Params
create_resourceserver_certificatesINSERTregion
delete_resourceserver_certificatesDELETEIdentifier, region
update_resourceserver_certificatesUPDATEIdentifier, PatchDocument, region
list_resourcesserver_certificates_list_onlySELECTregion
get_resourceserver_certificatesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual server_certificate.

SELECT
region,
certificate_body,
certificate_chain,
server_certificate_name,
path,
private_key,
arn,
tags
FROM awscc.iam.server_certificates
WHERE
region = 'us-east-1' AND
Identifier = '{{ server_certificate_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.iam.server_certificates (
CertificateBody,
CertificateChain,
ServerCertificateName,
Path,
PrivateKey,
Tags,
region
)
SELECT
'{{ certificate_body }}',
'{{ certificate_chain }}',
'{{ server_certificate_name }}',
'{{ path }}',
'{{ private_key }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.iam.server_certificates
SET PatchDocument = string('{{ {
"Path": path,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ server_certificate_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iam.server_certificates
WHERE
Identifier = '{{ server_certificate_name }}' AND
region = 'us-east-1'
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:

ParameterDescription
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 server_certificates resource, the following permissions are required:

iam:UploadServerCertificate,
iam:TagServerCertificate,
iam:GetServerCertificate