get Certificate
Use this data source to get the ARN of a certificate in AWS Certificate Manager (ACM), you can reference it by domain without having to hard code the ARNs as input.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.acm.AcmFunctions;
import com.pulumi.aws.acm.inputs.GetCertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var issued = AcmFunctions.getCertificate(GetCertificateArgs.builder()
.domain("tf.example.com")
.statuses("ISSUED")
.build());
final var amazonIssued = AcmFunctions.getCertificate(GetCertificateArgs.builder()
.domain("tf.example.com")
.mostRecent(true)
.types("AMAZON_ISSUED")
.build());
final var rsa4096 = AcmFunctions.getCertificate(GetCertificateArgs.builder()
.domain("tf.example.com")
.keyTypes("RSA_4096")
.build());
}
}
Return
A collection of values returned by getCertificate.
Parameters
A collection of arguments for invoking getCertificate.
Return
A collection of values returned by getCertificate.
Parameters
Domain of the certificate to look up. If no certificate is found with this name, an error will be returned.
List of key algorithms to filter certificates. By default, ACM does not return all certificate types when searching. See the ACM API Reference for supported key algorithms.
If set to true, it sorts the certificates matched by previous criteria by the NotBefore field, returning only the most recent one. If set to false, it returns an error if more than one certificate is found. Defaults to false.
List of statuses on which to filter the returned list. Valid values are PENDING_VALIDATION
, ISSUED
, INACTIVE
, EXPIRED
, VALIDATION_TIMED_OUT
, REVOKED
and FAILED
. If no value is specified, only certificates in the ISSUED
state are returned.
Mapping of tags for the resource.
List of types on which to filter the returned list. Valid values are AMAZON_ISSUED
, PRIVATE
, and IMPORTED
.
See also
Return
A collection of values returned by getCertificate.
Parameters
Builder for com.pulumi.aws.acm.kotlin.inputs.GetCertificatePlainArgs.