TLS v5.1.1 published on Saturday, Mar 15, 2025 by Pulumi
tls.getCertificate
Explore with Pulumi AI
Using getCertificate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCertificate(args: GetCertificateArgs, opts?: InvokeOptions): Promise<GetCertificateResult>
function getCertificateOutput(args: GetCertificateOutputArgs, opts?: InvokeOptions): Output<GetCertificateResult>
def get_certificate(content: Optional[str] = None,
url: Optional[str] = None,
verify_chain: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetCertificateResult
def get_certificate_output(content: Optional[pulumi.Input[str]] = None,
url: Optional[pulumi.Input[str]] = None,
verify_chain: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCertificateResult]
func GetCertificate(ctx *Context, args *GetCertificateArgs, opts ...InvokeOption) (*GetCertificateResult, error)
func GetCertificateOutput(ctx *Context, args *GetCertificateOutputArgs, opts ...InvokeOption) GetCertificateResultOutput
> Note: This function is named GetCertificate
in the Go SDK.
public static class GetCertificate
{
public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? opts = null)
public static Output<GetCertificateResult> Invoke(GetCertificateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCertificateResult> getCertificate(GetCertificateArgs args, InvokeOptions options)
public static Output<GetCertificateResult> getCertificate(GetCertificateArgs args, InvokeOptions options)
fn::invoke:
function: tls:index/getCertificate:getCertificate
arguments:
# arguments dictionary
The following arguments are supported:
- Content string
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - Url string
- The URL of the website to get the certificates from. Cannot be used with
content
. - Verify
Chain bool - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- Content string
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - Url string
- The URL of the website to get the certificates from. Cannot be used with
content
. - Verify
Chain bool - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- content String
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url String
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify
Chain Boolean - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- content string
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url string
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify
Chain boolean - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- content str
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url str
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify_
chain bool - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- content String
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url String
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify
Chain Boolean - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
getCertificate Result
The following output properties are available:
- Certificates
List<Get
Certificate Certificate> - The certificates protecting the site, with the root of the chain first.
- Id string
- Unique identifier of this data source: hashing of the certificates in the chain.
- Content string
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - Url string
- The URL of the website to get the certificates from. Cannot be used with
content
. - Verify
Chain bool - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- Certificates
[]Get
Certificate Certificate - The certificates protecting the site, with the root of the chain first.
- Id string
- Unique identifier of this data source: hashing of the certificates in the chain.
- Content string
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - Url string
- The URL of the website to get the certificates from. Cannot be used with
content
. - Verify
Chain bool - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- certificates
List<Get
Certificate Certificate> - The certificates protecting the site, with the root of the chain first.
- id String
- Unique identifier of this data source: hashing of the certificates in the chain.
- content String
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url String
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify
Chain Boolean - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- certificates
Get
Certificate Certificate[] - The certificates protecting the site, with the root of the chain first.
- id string
- Unique identifier of this data source: hashing of the certificates in the chain.
- content string
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url string
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify
Chain boolean - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- certificates
Sequence[Get
Certificate Certificate] - The certificates protecting the site, with the root of the chain first.
- id str
- Unique identifier of this data source: hashing of the certificates in the chain.
- content str
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url str
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify_
chain bool - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
- certificates List<Property Map>
- The certificates protecting the site, with the root of the chain first.
- id String
- Unique identifier of this data source: hashing of the certificates in the chain.
- content String
- The content of the certificate in PEM (RFC 1421) format. Cannot be used with
url
. - url String
- The URL of the website to get the certificates from. Cannot be used with
content
. - verify
Chain Boolean - Whether to verify the certificate chain while parsing it or not (default:
true
). Cannot be used withcontent
.
Supporting Types
GetCertificateCertificate
- Cert
Pem This property is required. string - Certificate data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a
\n
at the end of the PEM. In case this disrupts your use case, we recommend usingtrimspace()
. - Is
Ca This property is required. bool true
if the certificate is of a CA (Certificate Authority).- Issuer
This property is required. string - Who verified and signed the certificate, roughly following RFC2253.
- Not
After This property is required. string - The time until which the certificate is invalid, as an RFC3339 timestamp.
- Not
Before This property is required. string - The time after which the certificate is valid, as an RFC3339 timestamp.
- Public
Key Algorithm This property is required. string - The key algorithm used to create the certificate.
- Serial
Number This property is required. string - Number that uniquely identifies the certificate with the CA's system.
The
format
function can be used to convert this base 10 number into other bases, such as hex. - Sha1Fingerprint
This property is required. string - The SHA1 fingerprint of the public key of the certificate.
- Signature
Algorithm This property is required. string - The algorithm used to sign the certificate.
- Subject
This property is required. string - The entity the certificate belongs to, roughly following RFC2253.
- Version
This property is required. int - The version the certificate is in.
- Cert
Pem This property is required. string - Certificate data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a
\n
at the end of the PEM. In case this disrupts your use case, we recommend usingtrimspace()
. - Is
Ca This property is required. bool true
if the certificate is of a CA (Certificate Authority).- Issuer
This property is required. string - Who verified and signed the certificate, roughly following RFC2253.
- Not
After This property is required. string - The time until which the certificate is invalid, as an RFC3339 timestamp.
- Not
Before This property is required. string - The time after which the certificate is valid, as an RFC3339 timestamp.
- Public
Key Algorithm This property is required. string - The key algorithm used to create the certificate.
- Serial
Number This property is required. string - Number that uniquely identifies the certificate with the CA's system.
The
format
function can be used to convert this base 10 number into other bases, such as hex. - Sha1Fingerprint
This property is required. string - The SHA1 fingerprint of the public key of the certificate.
- Signature
Algorithm This property is required. string - The algorithm used to sign the certificate.
- Subject
This property is required. string - The entity the certificate belongs to, roughly following RFC2253.
- Version
This property is required. int - The version the certificate is in.
- cert
Pem This property is required. String - Certificate data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a
\n
at the end of the PEM. In case this disrupts your use case, we recommend usingtrimspace()
. - is
Ca This property is required. Boolean true
if the certificate is of a CA (Certificate Authority).- issuer
This property is required. String - Who verified and signed the certificate, roughly following RFC2253.
- not
After This property is required. String - The time until which the certificate is invalid, as an RFC3339 timestamp.
- not
Before This property is required. String - The time after which the certificate is valid, as an RFC3339 timestamp.
- public
Key Algorithm This property is required. String - The key algorithm used to create the certificate.
- serial
Number This property is required. String - Number that uniquely identifies the certificate with the CA's system.
The
format
function can be used to convert this base 10 number into other bases, such as hex. - sha1Fingerprint
This property is required. String - The SHA1 fingerprint of the public key of the certificate.
- signature
Algorithm This property is required. String - The algorithm used to sign the certificate.
- subject
This property is required. String - The entity the certificate belongs to, roughly following RFC2253.
- version
This property is required. Integer - The version the certificate is in.
- cert
Pem This property is required. string - Certificate data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a
\n
at the end of the PEM. In case this disrupts your use case, we recommend usingtrimspace()
. - is
Ca This property is required. boolean true
if the certificate is of a CA (Certificate Authority).- issuer
This property is required. string - Who verified and signed the certificate, roughly following RFC2253.
- not
After This property is required. string - The time until which the certificate is invalid, as an RFC3339 timestamp.
- not
Before This property is required. string - The time after which the certificate is valid, as an RFC3339 timestamp.
- public
Key Algorithm This property is required. string - The key algorithm used to create the certificate.
- serial
Number This property is required. string - Number that uniquely identifies the certificate with the CA's system.
The
format
function can be used to convert this base 10 number into other bases, such as hex. - sha1Fingerprint
This property is required. string - The SHA1 fingerprint of the public key of the certificate.
- signature
Algorithm This property is required. string - The algorithm used to sign the certificate.
- subject
This property is required. string - The entity the certificate belongs to, roughly following RFC2253.
- version
This property is required. number - The version the certificate is in.
- cert_
pem This property is required. str - Certificate data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a
\n
at the end of the PEM. In case this disrupts your use case, we recommend usingtrimspace()
. - is_
ca This property is required. bool true
if the certificate is of a CA (Certificate Authority).- issuer
This property is required. str - Who verified and signed the certificate, roughly following RFC2253.
- not_
after This property is required. str - The time until which the certificate is invalid, as an RFC3339 timestamp.
- not_
before This property is required. str - The time after which the certificate is valid, as an RFC3339 timestamp.
- public_
key_ algorithm This property is required. str - The key algorithm used to create the certificate.
- serial_
number This property is required. str - Number that uniquely identifies the certificate with the CA's system.
The
format
function can be used to convert this base 10 number into other bases, such as hex. - sha1_
fingerprint This property is required. str - The SHA1 fingerprint of the public key of the certificate.
- signature_
algorithm This property is required. str - The algorithm used to sign the certificate.
- subject
This property is required. str - The entity the certificate belongs to, roughly following RFC2253.
- version
This property is required. int - The version the certificate is in.
- cert
Pem This property is required. String - Certificate data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a
\n
at the end of the PEM. In case this disrupts your use case, we recommend usingtrimspace()
. - is
Ca This property is required. Boolean true
if the certificate is of a CA (Certificate Authority).- issuer
This property is required. String - Who verified and signed the certificate, roughly following RFC2253.
- not
After This property is required. String - The time until which the certificate is invalid, as an RFC3339 timestamp.
- not
Before This property is required. String - The time after which the certificate is valid, as an RFC3339 timestamp.
- public
Key Algorithm This property is required. String - The key algorithm used to create the certificate.
- serial
Number This property is required. String - Number that uniquely identifies the certificate with the CA's system.
The
format
function can be used to convert this base 10 number into other bases, such as hex. - sha1Fingerprint
This property is required. String - The SHA1 fingerprint of the public key of the certificate.
- signature
Algorithm This property is required. String - The algorithm used to sign the certificate.
- subject
This property is required. String - The entity the certificate belongs to, roughly following RFC2253.
- version
This property is required. Number - The version the certificate is in.
Package Details
- Repository
- TLS pulumi/pulumi-tls
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
tls
Terraform Provider.