VM-HetznerCloud

 view release on metacpan or  search on metacpan

lib/VM/HetznerCloud/API/Certificates.pm  view on Meta::CPAN

        label_selector => 'test',
        name => 'test',
        sort => 'test',
        type => 'test',
    );

=head2 create

Creates a new Certificate.

The default type **uploaded** allows for uploading your existing `certificate` and `private_key` in PEM format. You have to monitor its expiration date and handle renewal yourself.

In contrast, type **managed** requests a new Certificate from *Let's Encrypt* for the specified `domain_names`. Only domains managed by *Hetzner DNS* are supported. We handle renewal and timely alert the project owner via email if problems occur.

For type `managed` Certificates the `action` key of the response contains the Action that allows for tracking the issuance process. For type `uploaded` Certificates the `action` is always null.

    $cloud->certificates->create();

=head2 delete

Deletes a Certificate.

lib/VM/HetznerCloud/Schema.pm  view on Meta::CPAN

               },
               "description" : "The `certificates` key contains an array of Certificate objects"
            }
         },
         "summary" : "Get all Certificates",
         "tags" : [
            "Certificates"
         ]
      },
      "post" : {
         "description" : "Creates a new Certificate.\n\nThe default type **uploaded** allows for uploading your existing `certificate` and `private_key` in PEM format. You have to monitor its expiration date and handle renewal yourself.\n\nIn contras...
         "requestBody" : {
            "content" : {
               "application/json" : {
                  "examples" : {
                     "managed" : {
                        "summary" : "Creating a type `managed` Certificate",
                        "value" : {
                           "domain_names" : [
                              "example.com",
                              "webmail.example.com",

lib/VM/HetznerCloud/Schema.pm  view on Meta::CPAN

                           ],
                           "name" : "my website cert",
                           "type" : "managed"
                        }
                     },
                     "uploaded" : {
                        "summary" : "Creating a type `uploaded` Certificate",
                        "value" : {
                           "certificate" : "-----BEGIN CERTIFICATE-----\n...",
                           "name" : "my website cert",
                           "private_key" : "-----BEGIN PRIVATE KEY-----\n...",
                           "type" : "uploaded"
                        }
                     }
                  },
                  "schema" : {
                     "properties" : {
                        "certificate" : {
                           "description" : "Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. Required for type `uploaded` Certificates.",
                           "example" : "-----BEGIN CERTIFICATE-----\n...",
                           "type" : "string"

lib/VM/HetznerCloud/Schema.pm  view on Meta::CPAN

                        },
                        "labels" : {
                           "description" : "User-defined labels (key-value pairs)",
                           "type" : "object"
                        },
                        "name" : {
                           "description" : "Name of the Certificate",
                           "example" : "my website cert",
                           "type" : "string"
                        },
                        "private_key" : {
                           "description" : "Certificate key in PEM format. Required for type `uploaded` Certificates.",
                           "example" : "-----BEGIN PRIVATE KEY-----\n...",
                           "type" : "string"
                        },
                        "type" : {
                           "description" : "Choose between uploading a Certificate in PEM format or requesting a managed *Let's Encrypt* Certificate. If omitted defaults to `uploaded`.",
                           "enum" : [
                              "uploaded",
                              "managed"
                           ],



( run in 0.852 second using v1.01-cache-2.11-cpan-a5abf4f5562 )