Struct dnsimple::dnsimple::certificates::Certificates[][src]

pub struct Certificates<'a> {
    pub client: &'a Client,
}
Expand description

The Certificates Service handles the certificates endpoint of the DNSimple API.

See API Documentation: certificates

Fields

client: &'a Client

Implementations

List the certificates for a domain in the account.

Examples
use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let certificates = client.certificates().list_certificates(1010, "example.com", None).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id options: The RequestOptions. - Sorting: id, common_name, expiration

Get the details of a certificate

Examples
use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let certificate = client.certificates().get_certificate(1010, "example.com", 42).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id certificate_id: The certificate id

Download a certificate

Examples
use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let certificate = client.certificates().download_certificate(1010, "example.com", 42).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id certificate_id: The certificate id

Get the PEM-encoded certificate private key

Examples
use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let private_key = client.certificates().get_certificate_private_key(1010, "example.com", 42).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id certificate_id: The certificate id

Purchase a Let’s Encrypt certificate with DNSimple.

Examples
use dnsimple::dnsimple::{Client, new_client};
use dnsimple::dnsimple::certificates::LetsEncryptPurchasePayload;

let client = new_client(true, String::from("AUTH_TOKEN"));
let payload = LetsEncryptPurchasePayload {
    contact_id: 42,
    auto_renew: true,
    name: String::from("secret"),
    alternate_names: vec![],
};
let purchase = client.certificates().purchase_letsencrypt_certificate(1010, "example.com", payload).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id payload: The LetsEncryptPurchasePayload containing the information to purchase the certificate

Issue a Let’s Encrypt certificate for a domain in the account

Examples
use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let issued = client.certificates().issue_letsencrypt_certificate(1010, "example.com", 42).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id certificate_id: The id of the certificate to be issued

Purchase a Let’s Encrypt certificate renewal

Examples
use dnsimple::dnsimple::{Client, new_client};
use dnsimple::dnsimple::certificates::LetsEncryptPurchaseRenewalPayload;

let client = new_client(true, String::from("AUTH_TOKEN"));
let payload = LetsEncryptPurchaseRenewalPayload {
    auto_renew: false,
};
let issued = client.certificates().purchase_letsencrypt_certificate_renewal(1010, "example.com", 42, payload).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id payload: The LetsEncryptPurchaseRenewalPayload containing the information to purchase the certificate

Issue a Let’s Encrypt certificate for a domain in the account

Examples
use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let issued = client.certificates().issue_letsencrypt_certificate_renewal(1010, "example.com", 41, 42).unwrap().data.unwrap();
Arguments

account_id: The id of the account domain: The domain name or id certificate_id: The id of the certificate to be issued certificate_renewal_id: The certificate renewal id

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.