DisassociateEnclaveCertificateIamRoleCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, DisassociateEnclaveCertificateIamRoleCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, DisassociateEnclaveCertificateIamRoleCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // DisassociateEnclaveCertificateIamRoleRequest
  CertificateArn: "STRING_VALUE", // required
  RoleArn: "STRING_VALUE", // required
  DryRun: true || false,
};
const command = new DisassociateEnclaveCertificateIamRoleCommand(input);
const response = await client.send(command);
// { // DisassociateEnclaveCertificateIamRoleResult
//   Return: true || false,
// };

DisassociateEnclaveCertificateIamRoleCommand Input

Parameter
Type
Description
CertificateArn
Required
string | undefined

The ARN of the ACM certificate from which to disassociate the IAM role.

RoleArn
Required
string | undefined

The ARN of the IAM role to disassociate.

DryRun
boolean | undefined

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.

DisassociateEnclaveCertificateIamRoleCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Return
boolean | undefined

Returns true if the request succeeds; otherwise, it returns an error.

Throws

Name
Fault
Details
EC2ServiceException
Base exception class for all service exceptions from EC2 service.