enclave_certificate_iam_role_associations
Creates, updates, deletes or gets an enclave_certificate_iam_role_association resource or lists enclave_certificate_iam_role_associations in a region
Overview
| Name | enclave_certificate_iam_role_associations |
| Type | Resource |
| Description | Associates an AWS Identity and Access Management (IAM) role with an AWS Certificate Manager (ACM) certificate. This association is based on Amazon Resource Names and it enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. |
| Id | awscc.ec2.enclave_certificate_iam_role_associations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
certificate_arn | string | The Amazon Resource Name (ARN) of the ACM certificate with which to associate the IAM role. |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM certificate. |
certificate_s3_bucket_name | string | The name of the Amazon S3 bucket to which the certificate was uploaded. |
certificate_s3_object_key | string | The Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored. |
encryption_kms_key_id | string | The ID of the AWS KMS CMK used to encrypt the private key of the certificate. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
certificate_arn | string | The Amazon Resource Name (ARN) of the ACM certificate with which to associate the IAM role. |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM certificate. |
region | string | AWS region. |
For more information, see AWS::EC2::EnclaveCertificateIamRoleAssociation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | enclave_certificate_iam_role_associations | INSERT | CertificateArn, RoleArn, region |
delete_resource | enclave_certificate_iam_role_associations | DELETE | Identifier, region |
list_resources | enclave_certificate_iam_role_associations_list_only | SELECT | region |
get_resource | enclave_certificate_iam_role_associations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual enclave_certificate_iam_role_association.
SELECT
region,
certificate_arn,
role_arn,
certificate_s3_bucket_name,
certificate_s3_object_key,
encryption_kms_key_id
FROM awscc.ec2.enclave_certificate_iam_role_associations
WHERE
region = '{{ region }}' AND
Identifier = '{{ certificate_arn }}|{{ role_arn }}';
Lists all enclave_certificate_iam_role_associations in a region.
SELECT
region,
certificate_arn,
role_arn
FROM awscc.ec2.enclave_certificate_iam_role_associations_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new enclave_certificate_iam_role_association resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ec2.enclave_certificate_iam_role_associations (
CertificateArn,
RoleArn,
region
)
SELECT
'{{ certificate_arn }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.ec2.enclave_certificate_iam_role_associations (
CertificateArn,
RoleArn,
region
)
SELECT
'{{ certificate_arn }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: enclave_certificate_iam_role_association
props:
- name: certificate_arn
value: '{{ certificate_arn }}'
- name: role_arn
value: '{{ role_arn }}'
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.enclave_certificate_iam_role_associations
WHERE
Identifier = '{{ certificate_arn }}|{{ role_arn }}' AND
region = '{{ region }}'
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:
| Parameter | Description |
|---|---|
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 enclave_certificate_iam_role_associations resource, the following permissions are required:
- Create
- Read
- Delete
- List
ec2:AssociateEnclaveCertificateIamRole,
ec2:GetAssociatedEnclaveCertificateIamRoles
ec2:GetAssociatedEnclaveCertificateIamRoles
ec2:DisassociateEnclaveCertificateIamRole,
ec2:GetAssociatedEnclaveCertificateIamRoles
ec2:GetAssociatedEnclaveCertificateIamRoles