use WebService::Fastly::Object::AutomationTokensApi;
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
create_automation_token | POST /automation-tokens | Create Automation Token |
get_automation_token_id | GET /automation-tokens/{id} | Retrieve an Automation Token by ID |
get_automation_tokens_id_services | GET /automation-tokens/{id}/services | List Automation Token Services |
list_automation_tokens | GET /automation-tokens | List Customer Automation Tokens |
revoke_automation_token_id | DELETE /automation-tokens/{id} | Revoke an Automation Token by ID |
AutomationTokenCreateResponse create_automation_token(automation_token_create_request => $automation_token_create_request)
Create Automation Token
Creates a new automation token.
use Data::Dumper;
use WebService::Fastly::AutomationTokensApi;
my $api_instance = WebService::Fastly::AutomationTokensApi->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 $automation_token_create_request = WebService::Fastly::Object::AutomationTokenCreateRequest->new(); # AutomationTokenCreateRequest |
eval {
my $result = $api_instance->create_automation_token(automation_token_create_request => $automation_token_create_request);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AutomationTokensApi->create_automation_token: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
automation_token_create_request | AutomationTokenCreateRequest | [optional] |
- 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]
AutomationTokenResponse get_automation_token_id(id => $id)
Retrieve an Automation Token by ID
Retrieves an automation token by ID.
use Data::Dumper;
use WebService::Fastly::AutomationTokensApi;
my $api_instance = WebService::Fastly::AutomationTokensApi->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 $id = "id_example"; # string |
eval {
my $result = $api_instance->get_automation_token_id(id => $id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AutomationTokensApi->get_automation_token_id: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
id | string |
- Content-Type: Not defined
- Accept: application/vnd.api+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2001 get_automation_tokens_id_services(id => $id, per_page => $per_page, page => $page)
List Automation Token Services
List of services associated with the automation token.
use Data::Dumper;
use WebService::Fastly::AutomationTokensApi;
my $api_instance = WebService::Fastly::AutomationTokensApi->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 $id = "id_example"; # string |
my $per_page = 56; # int |
my $page = 56; # int |
eval {
my $result = $api_instance->get_automation_tokens_id_services(id => $id, per_page => $per_page, page => $page);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AutomationTokensApi->get_automation_tokens_id_services: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | ||
per_page | int | [optional] | |
page | int | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.api+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ARRAY[AutomationTokenResponse] list_automation_tokens(per_page => $per_page, page => $page)
List Customer Automation Tokens
Lists all automation tokens for a customer.
use Data::Dumper;
use WebService::Fastly::AutomationTokensApi;
my $api_instance = WebService::Fastly::AutomationTokensApi->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 $per_page = 56; # int |
my $page = 56; # int |
eval {
my $result = $api_instance->list_automation_tokens(per_page => $per_page, page => $page);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AutomationTokensApi->list_automation_tokens: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
per_page | int | [optional] | |
page | int | [optional] |
ARRAY[AutomationTokenResponse]
- Content-Type: Not defined
- Accept: application/vnd.api+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AutomationTokenErrorResponse revoke_automation_token_id(id => $id)
Revoke an Automation Token by ID
Revoke an automation token by ID.
use Data::Dumper;
use WebService::Fastly::AutomationTokensApi;
my $api_instance = WebService::Fastly::AutomationTokensApi->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 $id = "id_example"; # string |
eval {
my $result = $api_instance->revoke_automation_token_id(id => $id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AutomationTokensApi->revoke_automation_token_id: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
id | string |
- Content-Type: Not defined
- Accept: application/vnd.api+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]