enclave_certificate_iam_roles
Creates, updates, deletes, gets or lists an enclave_certificate_iam_roles resource.
Overview
| Name | enclave_certificate_iam_roles |
| Type | Resource |
| Id | aws.ec2.enclave_certificate_iam_roles |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
associate_enclave_certificate_iam_role | update | CertificateArn, RoleArn, region | DryRun | Associates an Identity and Access Management (IAM) role with an Certificate Manager (ACM) certificate. This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more information, see Certificate Manager for Nitro Enclaves in the Amazon Web Services Nitro Enclaves User Guide. When the IAM role is associated with the ACM certificate, the certificate, certificate chain, and encrypted private key are placed in an Amazon S3 location that only the associated IAM role can access. The private key of the certificate is encrypted with an Amazon Web Services managed key that has an attached attestation-based key policy. To enable the IAM role to access the Amazon S3 object, you must grant it permission to call s3:GetObject on the Amazon S3 bucket returned by the command. To enable the IAM role to access the KMS key, you must grant it permission to call kms:Decrypt on the KMS key returned by the command. For more information, see Grant the role permission to access the certificate and encryption key in the Amazon Web Services Nitro Enclaves User Guide. |
disassociate_enclave_certificate_iam_role | exec | CertificateArn, RoleArn, region | DryRun | Disassociates an IAM role from an Certificate Manager (ACM) certificate. Disassociating an IAM role from an ACM certificate removes the Amazon S3 object that contains the certificate, certificate chain, and encrypted private key from the Amazon S3 bucket. It also revokes the IAM role's permission to use the KMS key used to encrypt the private key. This effectively revokes the role's permission to use the certificate. |
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 |
|---|---|---|
CertificateArn | string | The ARN of the ACM certificate from which to disassociate the IAM role. |
RoleArn | string | The ARN of the IAM role to disassociate. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
UPDATE examples
- associate_enclave_certificate_iam_role
Associates an Identity and Access Management (IAM) role with an Certificate Manager (ACM) certificate. This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more information, see Certificate Manager for Nitro Enclaves in the Amazon Web Services Nitro Enclaves User Guide. When the IAM role is associated with the ACM certificate, the certificate, certificate chain, and encrypted private key are placed in an Amazon S3 location that only the associated IAM role can access. The private key of the certificate is encrypted with an Amazon Web Services managed key that has an attached attestation-based key policy. To enable the IAM role to access the Amazon S3 object, you must grant it permission to call s3:GetObject on the Amazon S3 bucket returned by the command. To enable the IAM role to access the KMS key, you must grant it permission to call kms:Decrypt on the KMS key returned by the command. For more information, see Grant the role permission to access the certificate and encryption key in the Amazon Web Services Nitro Enclaves User Guide.
UPDATE aws.ec2.enclave_certificate_iam_roles
SET
-- No updatable properties
WHERE
CertificateArn = '{{ CertificateArn }}' --required
AND RoleArn = '{{ RoleArn }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
RETURNING
certificate_s3_bucket_name,
certificate_s3_object_key,
encryption_kms_key_id;
Lifecycle Methods
- disassociate_enclave_certificate_iam_role
Disassociates an IAM role from an Certificate Manager (ACM) certificate. Disassociating an IAM role from an ACM certificate removes the Amazon S3 object that contains the certificate, certificate chain, and encrypted private key from the Amazon S3 bucket. It also revokes the IAM role's permission to use the KMS key used to encrypt the private key. This effectively revokes the role's permission to use the certificate.
EXEC aws.ec2.enclave_certificate_iam_roles.disassociate_enclave_certificate_iam_role
@CertificateArn='{{ CertificateArn }}' --required,
@RoleArn='{{ RoleArn }}' --required,
@region='{{ region }}' --required,
@DryRun={{ DryRun }}
;