Hetzner Cloud

v1.10.1 published on Wednesday, Aug 3, 2022 by Pulumi

getCertificate

Provides details about a specific Hetzner Cloud Certificate.

import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const sampleCertificate1 = pulumi.output(hcloud.getCertificate({
    name: "sample-certificate-1",
}));
const sampleCertificate2 = pulumi.output(hcloud.getCertificate({
    id: 4711,
}));
import pulumi
import pulumi_hcloud as hcloud

sample_certificate1 = hcloud.get_certificate(name="sample-certificate-1")
sample_certificate2 = hcloud.get_certificate(id=4711)
using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var sampleCertificate1 = Output.Create(HCloud.GetCertificate.InvokeAsync(new HCloud.GetCertificateArgs
        {
            Name = "sample-certificate-1",
        }));
        var sampleCertificate2 = Output.Create(HCloud.GetCertificate.InvokeAsync(new HCloud.GetCertificateArgs
        {
            Id = 4711,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcloud.LookupCertificate(ctx, &GetCertificateArgs{
			Name: pulumi.StringRef("sample-certificate-1"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = hcloud.LookupCertificate(ctx, &GetCertificateArgs{
			Id: pulumi.IntRef(4711),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var sampleCertificate1 = Output.of(HcloudFunctions.getCertificate(GetCertificateArgs.builder()
            .name("sample-certificate-1")
            .build()));

        final var sampleCertificate2 = Output.of(HcloudFunctions.getCertificate(GetCertificateArgs.builder()
            .id("4711")
            .build()));

    }
}
variables:
  sampleCertificate1:
    Fn::Invoke:
      Function: hcloud:getCertificate
      Arguments:
        name: sample-certificate-1
  sampleCertificate2:
    Fn::Invoke:
      Function: hcloud:getCertificate
      Arguments:
        id: 4711

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(id: Optional[int] = None,
                    name: Optional[str] = None,
                    with_selector: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetCertificateResult
def get_certificate_output(id: Optional[pulumi.Input[int]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    with_selector: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetCertificateResult]
func LookupCertificate(ctx *Context, args *LookupCertificateArgs, opts ...InvokeOption) (*LookupCertificateResult, error)
func LookupCertificateOutput(ctx *Context, args *LookupCertificateOutputArgs, opts ...InvokeOption) LookupCertificateResultOutput

> Note: This function is named LookupCertificate 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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: hcloud:index/getCertificate:getCertificate
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Id int

ID of the certificate.

Name string

Name of the certificate.

WithSelector string

Label selector

Id int

ID of the certificate.

Name string

Name of the certificate.

WithSelector string

Label selector

id Integer

ID of the certificate.

name String

Name of the certificate.

withSelector String

Label selector

id number

ID of the certificate.

name string

Name of the certificate.

withSelector string

Label selector

id int

ID of the certificate.

name str

Name of the certificate.

with_selector str

Label selector

id Number

ID of the certificate.

name String

Name of the certificate.

withSelector String

Label selector

getCertificate Result

The following output properties are available:

Certificate string

(string) PEM encoded TLS certificate.

Created string

(string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).

DomainNames List<string>

(list) Domains and subdomains covered by the certificate.

Fingerprint string

(string) Fingerprint of the certificate.

Id int

(int) Unique ID of the certificate.

Labels Dictionary<string, object>

(map) User-defined labels (key-value pairs) assigned to the certificate.

NotValidAfter string

(string) Point in time when the Certificate stops being valid (in ISO-8601 format).

NotValidBefore string

(string) Point in time when the Certificate becomes valid (in ISO-8601 format).

Type string
Name string

(string) Name of the Certificate.

WithSelector string
Certificate string

(string) PEM encoded TLS certificate.

Created string

(string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).

DomainNames []string

(list) Domains and subdomains covered by the certificate.

Fingerprint string

(string) Fingerprint of the certificate.

Id int

(int) Unique ID of the certificate.

Labels map[string]interface{}

(map) User-defined labels (key-value pairs) assigned to the certificate.

NotValidAfter string

(string) Point in time when the Certificate stops being valid (in ISO-8601 format).

NotValidBefore string

(string) Point in time when the Certificate becomes valid (in ISO-8601 format).

Type string
Name string

(string) Name of the Certificate.

WithSelector string
certificate String

(string) PEM encoded TLS certificate.

created String

(string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).

domainNames List<String>

(list) Domains and subdomains covered by the certificate.

fingerprint String

(string) Fingerprint of the certificate.

id Integer

(int) Unique ID of the certificate.

labels Map<String,Object>

(map) User-defined labels (key-value pairs) assigned to the certificate.

notValidAfter String

(string) Point in time when the Certificate stops being valid (in ISO-8601 format).

notValidBefore String

(string) Point in time when the Certificate becomes valid (in ISO-8601 format).

type String
name String

(string) Name of the Certificate.

withSelector String
certificate string

(string) PEM encoded TLS certificate.

created string

(string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).

domainNames string[]

(list) Domains and subdomains covered by the certificate.

fingerprint string

(string) Fingerprint of the certificate.

id number

(int) Unique ID of the certificate.

labels {[key: string]: any}

(map) User-defined labels (key-value pairs) assigned to the certificate.

notValidAfter string

(string) Point in time when the Certificate stops being valid (in ISO-8601 format).

notValidBefore string

(string) Point in time when the Certificate becomes valid (in ISO-8601 format).

type string
name string

(string) Name of the Certificate.

withSelector string
certificate str

(string) PEM encoded TLS certificate.

created str

(string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).

domain_names Sequence[str]

(list) Domains and subdomains covered by the certificate.

fingerprint str

(string) Fingerprint of the certificate.

id int

(int) Unique ID of the certificate.

labels Mapping[str, Any]

(map) User-defined labels (key-value pairs) assigned to the certificate.

not_valid_after str

(string) Point in time when the Certificate stops being valid (in ISO-8601 format).

not_valid_before str

(string) Point in time when the Certificate becomes valid (in ISO-8601 format).

type str
name str

(string) Name of the Certificate.

with_selector str
certificate String

(string) PEM encoded TLS certificate.

created String

(string) Point in time when the Certificate was created at Hetzner Cloud (in ISO-8601 format).

domainNames List<String>

(list) Domains and subdomains covered by the certificate.

fingerprint String

(string) Fingerprint of the certificate.

id Number

(int) Unique ID of the certificate.

labels Map<Any>

(map) User-defined labels (key-value pairs) assigned to the certificate.

notValidAfter String

(string) Point in time when the Certificate stops being valid (in ISO-8601 format).

notValidBefore String

(string) Point in time when the Certificate becomes valid (in ISO-8601 format).

type String
name String

(string) Name of the Certificate.

withSelector String

Package Details

Repository
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes

This Pulumi package is based on the hcloud Terraform Provider.