require 'fastly'
api_instance = Fastly::TlsPrivateKeysApi.new
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
create_tls_key | POST /tls/private_keys | Create a TLS private key |
delete_tls_key | DELETE /tls/private_keys/{tls_private_key_id} | Delete a TLS private key |
get_tls_key | GET /tls/private_keys/{tls_private_key_id} | Get a TLS private key |
list_tls_keys | GET /tls/private_keys | List TLS private keys |
create_tls_key(opts): <TlsPrivateKeyResponse> # Create a TLS private key
Create a TLS private key.
api_instance = Fastly::TlsPrivateKeysApi.new
opts = {
tls_private_key: Fastly::TlsPrivateKey.new, # TlsPrivateKey |
}
begin
# Create a TLS private key
result = api_instance.create_tls_key(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling TlsPrivateKeysApi->create_tls_key: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tls_private_key | TlsPrivateKey | [optional] |
[Back to top] [Back to API list] [Back to README]
delete_tls_key(opts) # Delete a TLS private key
Destroy a TLS private key. Only private keys not already matched to any certificates can be deleted.
api_instance = Fastly::TlsPrivateKeysApi.new
opts = {
tls_private_key_id: 'tls_private_key_id_example', # String | Alphanumeric string identifying a private Key.
}
begin
# Delete a TLS private key
api_instance.delete_tls_key(opts)
rescue Fastly::ApiError => e
puts "Error when calling TlsPrivateKeysApi->delete_tls_key: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tls_private_key_id | String | Alphanumeric string identifying a private Key. |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
get_tls_key(opts): <TlsPrivateKeyResponse> # Get a TLS private key
Show a TLS private key.
api_instance = Fastly::TlsPrivateKeysApi.new
opts = {
tls_private_key_id: 'tls_private_key_id_example', # String | Alphanumeric string identifying a private Key.
}
begin
# Get a TLS private key
result = api_instance.get_tls_key(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling TlsPrivateKeysApi->get_tls_key: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tls_private_key_id | String | Alphanumeric string identifying a private Key. |
[Back to top] [Back to API list] [Back to README]
list_tls_keys(opts): <TlsPrivateKeysResponse> # List TLS private keys
List all TLS private keys.
api_instance = Fastly::TlsPrivateKeysApi.new
opts = {
filter_in_use: 'filter_in_use_example', # String | Limit the returned keys to those without any matching TLS certificates. The only valid value is false.
page_number: 1, # Integer | Current page.
page_size: 20, # Integer | Number of records per page.
}
begin
# List TLS private keys
result = api_instance.list_tls_keys(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling TlsPrivateKeysApi->list_tls_keys: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
filter_in_use | String | Limit the returned keys to those without any matching TLS certificates. The only valid value is false. | [optional] |
page_number | Integer | Current page. | [optional] |
page_size | Integer | Number of records per page. | [optional][default to 20] |