WebService::Fastly::TlsCertificatesApi

Load the API package

use WebService::Fastly::Object::TlsCertificatesApi;

[!NOTE] All URIs are relative to https://api.fastly.com

Method | HTTP request | Description ------ | ------------ | ----------- create_tls_cert | POST /tls/certificates | Create a TLS certificate delete_tls_cert | DELETE /tls/certificates/{tls_certificate_id} | Delete a TLS certificate get_tls_cert | GET /tls/certificates/{tls_certificate_id} | Get a TLS certificate get_tls_cert_blob | GET /tls/certificates/{tls_certificate_id}/blob | Get a TLS certificate blob (Limited Availability) list_tls_certs | GET /tls/certificates | List TLS certificates update_tls_cert | PATCH /tls/certificates/{tls_certificate_id} | Update a TLS certificate

create_tls_cert

object create_tls_cert(tls_certificate => $tls_certificate)

Create a TLS certificate

Create a TLS certificate.

Example

use Data::Dumper;
use WebService::Fastly::TlsCertificatesApi;
my $api_instance = WebService::Fastly::TlsCertificatesApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $tls_certificate = WebService::Fastly::Object::TlsCertificate->new(); # TlsCertificate | 

eval {
    my $result = $api_instance->create_tls_cert(tls_certificate => $tls_certificate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TlsCertificatesApi->create_tls_cert: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_certificate | TlsCertificate| | [optional]

Return type

object

Authorization

token

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_tls_cert

delete_tls_cert(tls_certificate_id => $tls_certificate_id)

Delete a TLS certificate

Destroy a TLS certificate. TLS certificates already enabled for a domain cannot be destroyed.

Example

use Data::Dumper;
use WebService::Fastly::TlsCertificatesApi;
my $api_instance = WebService::Fastly::TlsCertificatesApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $tls_certificate_id = "tls_certificate_id_example"; # string | Alphanumeric string identifying a TLS certificate.

eval {
    $api_instance->delete_tls_cert(tls_certificate_id => $tls_certificate_id);
};
if ($@) {
    warn "Exception when calling TlsCertificatesApi->delete_tls_cert: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_certificate_id | string| Alphanumeric string identifying a TLS certificate. |

Return type

void (empty response body)

Authorization

token

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_tls_cert

TlsCertificateResponse get_tls_cert(tls_certificate_id => $tls_certificate_id)

Get a TLS certificate

Show a TLS certificate.

Example

use Data::Dumper;
use WebService::Fastly::TlsCertificatesApi;
my $api_instance = WebService::Fastly::TlsCertificatesApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $tls_certificate_id = "tls_certificate_id_example"; # string | Alphanumeric string identifying a TLS certificate.

eval {
    my $result = $api_instance->get_tls_cert(tls_certificate_id => $tls_certificate_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TlsCertificatesApi->get_tls_cert: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_certificate_id | string| Alphanumeric string identifying a TLS certificate. |

Return type

TlsCertificateResponse

Authorization

token

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_tls_cert_blob

TlsCertificateBlobResponse get_tls_cert_blob(tls_certificate_id => $tls_certificate_id)

Get a TLS certificate blob (Limited Availability)

Retrieve a TLS certificate blob. This feature is part of a limited availability release.

Example

use Data::Dumper;
use WebService::Fastly::TlsCertificatesApi;
my $api_instance = WebService::Fastly::TlsCertificatesApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $tls_certificate_id = "tls_certificate_id_example"; # string | Alphanumeric string identifying a TLS certificate.

eval {
    my $result = $api_instance->get_tls_cert_blob(tls_certificate_id => $tls_certificate_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TlsCertificatesApi->get_tls_cert_blob: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_certificate_id | string| Alphanumeric string identifying a TLS certificate. |

Return type

TlsCertificateBlobResponse

Authorization

token

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_tls_certs

TlsCertificatesResponse list_tls_certs(filter[in_use] => $filter[in_use], filter[not_after] => $filter[not_after], filter[tls_domains/id] => $filter[tls_domains/id], include => $include, sort => $sort, page[number] => $page[number], page[size] => $page[size])

List TLS certificates

List all TLS certificates.

Example

use Data::Dumper;
use WebService::Fastly::TlsCertificatesApi;
my $api_instance = WebService::Fastly::TlsCertificatesApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $filter[in_use] = "filter[in_use]_example"; # string | Optional. Limit the returned certificates to those currently using Fastly to terminate TLS (that is, certificates associated with an activation). Permitted values: true, false.
my $filter[not_after] = "filter[not_after]_example"; # string | Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05). 
my $filter[tls_domains/id] = "filter[tls_domains/id]_example"; # string | Limit the returned certificates to those that include the specific domain.
my $include = "include_example"; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`. 
my $sort = '-created_at'; # string | The order in which to list the results.
my $page[number] = 1; # int | Current page.
my $page[size] = 20; # int | Number of records per page.

eval {
    my $result = $api_instance->list_tls_certs(filter[in_use] => $filter[in_use], filter[not_after] => $filter[not_after], filter[tls_domains/id] => $filter[tls_domains/id], include => $include, sort => $sort, page[number] => $page[number], page[size] => $page[size]);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TlsCertificatesApi->list_tls_certs: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- filter[in_use] | string| Optional. Limit the returned certificates to those currently using Fastly to terminate TLS (that is, certificates associated with an activation). Permitted values: true, false. | [optional] filter[not_after] | string| Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05). | [optional] filter[tls_domains/id] | string| Limit the returned certificates to those that include the specific domain. | [optional] include | string| Include related objects. Optional, comma-separated values. Permitted values: tls_activations. | [optional] sort | string| The order in which to list the results. | [optional] [default to '-created_at'] page[number] | int| Current page. | [optional] page[size] | int| Number of records per page. | [optional] [default to 20]

Return type

TlsCertificatesResponse

Authorization

token

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_tls_cert

TlsCertificateResponse update_tls_cert(tls_certificate_id => $tls_certificate_id, tls_certificate => $tls_certificate)

Update a TLS certificate

Replace a TLS certificate with a newly reissued TLS certificate, or update a TLS certificate's name. If replacing a TLS certificate, the new TLS certificate must contain all SAN entries as the current TLS certificate. It must either have an exact matching list or contain a superset.

Example

use Data::Dumper;
use WebService::Fastly::TlsCertificatesApi;
my $api_instance = WebService::Fastly::TlsCertificatesApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $tls_certificate_id = "tls_certificate_id_example"; # string | Alphanumeric string identifying a TLS certificate.
my $tls_certificate = WebService::Fastly::Object::TlsCertificate->new(); # TlsCertificate | 

eval {
    my $result = $api_instance->update_tls_cert(tls_certificate_id => $tls_certificate_id, tls_certificate => $tls_certificate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TlsCertificatesApi->update_tls_cert: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_certificate_id | string| Alphanumeric string identifying a TLS certificate. | tls_certificate | TlsCertificate| | [optional]

Return type

TlsCertificateResponse

Authorization

token

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]