WebService::Fastly::TlsSubscriptionsApi
Load the API package
use WebService::Fastly::Object::TlsSubscriptionsApi;
[!NOTE]
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description ------ | ------------ | ----------- create_globalsign_email_challenge | POST /tls/subscriptions/{tls_subscription_id}/authorizations/{tls_authorization_id}/globalsign_email_challenges | Creates a GlobalSign email challenge. create_tls_sub | POST /tls/subscriptions | Create a TLS subscription delete_globalsign_email_challenge | DELETE /tls/subscriptions/{tls_subscription_id}/authorizations/{tls_authorization_id}/globalsign_email_challenges/{globalsign_email_challenge_id} | Delete a GlobalSign email challenge delete_tls_sub | DELETE /tls/subscriptions/{tls_subscription_id} | Delete a TLS subscription get_tls_sub | GET /tls/subscriptions/{tls_subscription_id} | Get a TLS subscription list_tls_subs | GET /tls/subscriptions | List TLS subscriptions patch_tls_sub | PATCH /tls/subscriptions/{tls_subscription_id} | Update a TLS subscription
create_globalsign_email_challenge
object create_globalsign_email_challenge(tls_subscription_id => $tls_subscription_id, tls_authorization_id => $tls_authorization_id, request_body => $request_body)
Creates a GlobalSign email challenge.
Creates an email challenge for a domain on a GlobalSign subscription. An email challenge will generate an email that can be used to validate domain ownership. If this challenge is created, then the domain can only be validated using email for the given subscription.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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_subscription_id = "tls_subscription_id_example"; # string | Alphanumeric string identifying a TLS subscription.
my $tls_authorization_id = "tls_authorization_id_example"; # string | Alphanumeric string identifying a TLS subscription.
my $request_body = WebService::Fastly::Object::HASH[string,object]->new(); # HASH[string,object] |
eval {
my $result = $api_instance->create_globalsign_email_challenge(tls_subscription_id => $tls_subscription_id, tls_authorization_id => $tls_authorization_id, request_body => $request_body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->create_globalsign_email_challenge: $@\n";
}
Parameters
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_subscription_id | string| Alphanumeric string identifying a TLS subscription. | tls_authorization_id | string| Alphanumeric string identifying a TLS subscription. | request_body | HASH[string,object]| | [optional]
Return type
object
Authorization
HTTP request headers
- Content-Type: application/vnd.api+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
create_tls_sub
TlsSubscriptionResponse create_tls_sub(tls_subscription => $tls_subscription)
Create a TLS subscription
Create a new TLS subscription. This response includes a list of possible challenges to verify domain ownership.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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_subscription = WebService::Fastly::Object::TlsSubscription->new(); # TlsSubscription |
eval {
my $result = $api_instance->create_tls_sub(tls_subscription => $tls_subscription);
print Dumper($result);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->create_tls_sub: $@\n";
}
Parameters
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_subscription | TlsSubscription| | [optional]
Return type
Authorization
HTTP request headers
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_globalsign_email_challenge
delete_globalsign_email_challenge(tls_subscription_id => $tls_subscription_id, tls_authorization_id => $tls_authorization_id, globalsign_email_challenge_id => $globalsign_email_challenge_id)
Delete a GlobalSign email challenge
Deletes a GlobalSign email challenge. After a GlobalSign email challenge is deleted, the domain can use HTTP and DNS validation methods again.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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_subscription_id = "tls_subscription_id_example"; # string | Alphanumeric string identifying a TLS subscription.
my $tls_authorization_id = "tls_authorization_id_example"; # string | Alphanumeric string identifying a TLS subscription.
my $globalsign_email_challenge_id = gU3guUGZzb2W9Euo4Mo0r; # string | Alphanumeric string identifying a GlobalSign email challenge.
eval {
$api_instance->delete_globalsign_email_challenge(tls_subscription_id => $tls_subscription_id, tls_authorization_id => $tls_authorization_id, globalsign_email_challenge_id => $globalsign_email_challenge_id);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->delete_globalsign_email_challenge: $@\n";
}
Parameters
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_subscription_id | string| Alphanumeric string identifying a TLS subscription. | tls_authorization_id | string| Alphanumeric string identifying a TLS subscription. | globalsign_email_challenge_id | string| Alphanumeric string identifying a GlobalSign email challenge. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_tls_sub
delete_tls_sub(tls_subscription_id => $tls_subscription_id)
Delete a TLS subscription
Destroy a TLS subscription. A subscription cannot be destroyed if there are domains in the TLS enabled state.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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_subscription_id = "tls_subscription_id_example"; # string | Alphanumeric string identifying a TLS subscription.
eval {
$api_instance->delete_tls_sub(tls_subscription_id => $tls_subscription_id);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->delete_tls_sub: $@\n";
}
Parameters
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_subscription_id | string| Alphanumeric string identifying a TLS subscription. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_tls_sub
TlsSubscriptionResponse get_tls_sub(tls_subscription_id => $tls_subscription_id, include => $include)
Get a TLS subscription
Show a TLS subscription.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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_subscription_id = "tls_subscription_id_example"; # string | Alphanumeric string identifying a TLS subscription.
my $include = tls_authorizations; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, `tls_authorizations.self_managed_http_challenge`, and `tls_certificates`.
eval {
my $result = $api_instance->get_tls_sub(tls_subscription_id => $tls_subscription_id, include => $include);
print Dumper($result);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->get_tls_sub: $@\n";
}
Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
tls_subscription_id | string| Alphanumeric string identifying a TLS subscription. |
include | string| Include related objects. Optional, comma-separated values. Permitted values: tls_authorizations, tls_authorizations.globalsign_email_challenge, tls_authorizations.self_managed_http_challenge, and tls_certificates. | [optional]
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list_tls_subs
TlsSubscriptionsResponse list_tls_subs(filter[state] => $filter[state], filter[tls_domains/id] => $filter[tls_domains/id], filter[has_active_order] => $filter[has_active_order], filter[certificate_authority] => $filter[certificate_authority], sort => $sort, include => $include, page[number] => $page[number], page[size] => $page[size])
List TLS subscriptions
List all TLS subscriptions.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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[state] = "filter[state]_example"; # string | Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, `renewing`, and `failed`. Accepts parameters: `not` (e.g., `filter[state][not]=renewing`).
my $filter[tls_domains/id] = "filter[tls_domains/id]_example"; # string | Limit the returned subscriptions to those that include the specific domain.
my $filter[has_active_order] = null; # boolean | Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`.
my $filter[certificate_authority] = "filter[certificate_authority]_example"; # string | Limit the returned subscriptions to a specific certification authority. Values may include `certainly`, `lets-encrypt`, or `globalsign`.
my $sort = '-created_at'; # string | The order in which to list the results.
my $include = tls_authorizations; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, `tls_authorizations.self_managed_http_challenge`, and `tls_certificates`.
my $page[number] = 1; # int | Current page.
my $page[size] = 20; # int | Number of records per page.
eval {
my $result = $api_instance->list_tls_subs(filter[state] => $filter[state], filter[tls_domains/id] => $filter[tls_domains/id], filter[has_active_order] => $filter[has_active_order], filter[certificate_authority] => $filter[certificate_authority], sort => $sort, include => $include, page[number] => $page[number], page[size] => $page[size]);
print Dumper($result);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->list_tls_subs: $@\n";
}
Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
filter[state] | string| Limit the returned subscriptions by state. Valid values are pending, processing, issued, renewing, and failed. Accepts parameters: not (e.g., filter[state][not]=renewing). | [optional]
filter[tls_domains/id] | string| Limit the returned subscriptions to those that include the specific domain. | [optional]
filter[has_active_order] | boolean| Limit the returned subscriptions to those that have currently active orders. Permitted values: true. | [optional]
filter[certificate_authority] | string| Limit the returned subscriptions to a specific certification authority. Values may include certainly, lets-encrypt, or globalsign. | [optional]
sort | string| The order in which to list the results. | [optional] [default to '-created_at']
include | string| Include related objects. Optional, comma-separated values. Permitted values: tls_authorizations, tls_authorizations.globalsign_email_challenge, tls_authorizations.self_managed_http_challenge, and tls_certificates. | [optional]
page[number] | int| Current page. | [optional]
page[size] | int| Number of records per page. | [optional] [default to 20]
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
patch_tls_sub
TlsSubscriptionResponse patch_tls_sub(tls_subscription_id => $tls_subscription_id, force => $force, tls_subscription => $tls_subscription)
Update a TLS subscription
Change the TLS domains or common name associated with this subscription, update the TLS configuration for this set of domains, or retry a subscription with state failed by setting the state to retry.
Example
use Data::Dumper;
use WebService::Fastly::TlsSubscriptionsApi;
my $api_instance = WebService::Fastly::TlsSubscriptionsApi->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_subscription_id = "tls_subscription_id_example"; # string | Alphanumeric string identifying a TLS subscription.
my $force = true; # boolean | A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain.
my $tls_subscription = WebService::Fastly::Object::TlsSubscription->new(); # TlsSubscription |
eval {
my $result = $api_instance->patch_tls_sub(tls_subscription_id => $tls_subscription_id, force => $force, tls_subscription => $tls_subscription);
print Dumper($result);
};
if ($@) {
warn "Exception when calling TlsSubscriptionsApi->patch_tls_sub: $@\n";
}
Parameters
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- tls_subscription_id | string| Alphanumeric string identifying a TLS subscription. | force | boolean| A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. | [optional] tls_subscription | TlsSubscription| | [optional]
Return type
Authorization
HTTP request headers
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]