Skip to content

get_associated_enclave_certificate_iam_roles

get_associated_enclave_certificate_iam_roles(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    certificate_arn: Optional[CertificateId] = None,
    dry_run: Optional[Boolean] = None,
) -> GetAssociatedEnclaveCertificateIamRolesResult

Returns the IAM roles that are associated with the specified ACM (ACM) certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored, and the ARN of the KMS key that's used to encrypt the private key.

Parameters:

  • certificate_arn (Optional[CertificateId], default: None ) –

    The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon S3 object information.

  • dry_run (Optional[Boolean], default: None ) –

    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.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def get_associated_enclave_certificate_iam_roles(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    certificate_arn: Optional["capo_ec2.types.certificate_id.CertificateId"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.get_associated_enclave_certificate_iam_roles_result.GetAssociatedEnclaveCertificateIamRolesResult":
    """<p>Returns the IAM roles that are associated with the specified ACM (ACM) certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored, and the ARN of the KMS key that's used to encrypt the private key.</p>

    Args:
        certificate_arn: <p>The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon S3 object information.</p>
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.get_associated_enclave_certificate_iam_roles_request.GetAssociatedEnclaveCertificateIamRolesRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.get_associated_enclave_certificate_iam_roles_result.GetAssociatedEnclaveCertificateIamRolesResult"
    ]:
        import capo_ec2._operations.amazon_ec2.get_associated_enclave_certificate_iam_roles

        output, http_response = (
            capo_ec2._operations.amazon_ec2.get_associated_enclave_certificate_iam_roles.get_associated_enclave_certificate_iam_roles(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetAssociatedEnclaveCertificateIamRoles"),
    )
    input_: capo_ec2.types.get_associated_enclave_certificate_iam_roles_request.GetAssociatedEnclaveCertificateIamRolesRequest = {}
    if certificate_arn is not None:
        input_["certificate_arn"] = certificate_arn
    if dry_run is not None:
        input_["dry_run"] = dry_run

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output