require 'fastly'
api_instance = Fastly::AutomationTokensApi.new
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 |
create_automation_token(opts): <AutomationTokenCreateResponse> # Create Automation Token
Creates a new automation token.
api_instance = Fastly::AutomationTokensApi.new
opts = {
automation_token_create_request: Fastly::AutomationTokenCreateRequest.new, # AutomationTokenCreateRequest |
}
begin
# Create Automation Token
result = api_instance.create_automation_token(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling AutomationTokensApi->create_automation_token: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
automation_token_create_request | AutomationTokenCreateRequest | [optional] |
[Back to top] [Back to API list] [Back to README]
get_automation_token_id(opts): <AutomationTokenResponse> # Retrieve an Automation Token by ID
Retrieves an automation token by ID.
api_instance = Fastly::AutomationTokensApi.new
opts = {
id: 'id_example', # String |
}
begin
# Retrieve an Automation Token by ID
result = api_instance.get_automation_token_id(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling AutomationTokensApi->get_automation_token_id: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String |
[Back to top] [Back to API list] [Back to README]
get_automation_tokens_id_services(opts): <InlineResponse2001> # List Automation Token Services
List of services associated with the automation token.
api_instance = Fastly::AutomationTokensApi.new
opts = {
id: 'id_example', # String |
per_page: 56, # Integer |
page: 56, # Integer |
}
begin
# List Automation Token Services
result = api_instance.get_automation_tokens_id_services(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling AutomationTokensApi->get_automation_tokens_id_services: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | ||
per_page | Integer | [optional] | |
page | Integer | [optional] |
[Back to top] [Back to API list] [Back to README]
list_automation_tokens(opts): <Array<AutomationTokenResponse>> # List Customer Automation Tokens
Lists all automation tokens for a customer.
api_instance = Fastly::AutomationTokensApi.new
opts = {
per_page: 56, # Integer |
page: 56, # Integer |
}
begin
# List Customer Automation Tokens
result = api_instance.list_automation_tokens(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling AutomationTokensApi->list_automation_tokens: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
per_page | Integer | [optional] | |
page | Integer | [optional] |
Array<AutomationTokenResponse>
[Back to top] [Back to API list] [Back to README]
revoke_automation_token_id(opts): <AutomationTokenErrorResponse> # Revoke an Automation Token by ID
Revoke an automation token by ID.
api_instance = Fastly::AutomationTokensApi.new
opts = {
id: 'id_example', # String |
}
begin
# Revoke an Automation Token by ID
result = api_instance.revoke_automation_token_id(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling AutomationTokensApi->revoke_automation_token_id: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String |