Skip to content

Latest commit

 

History

History
172 lines (125 loc) · 4.44 KB

TlsPrivateKeysApi.md

File metadata and controls

172 lines (125 loc) · 4.44 KB

Fastly::TlsPrivateKeysApi

require 'fastly'
api_instance = Fastly::TlsPrivateKeysApi.new

Methods

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()

create_tls_key(opts): <TlsPrivateKeyResponse> # Create a TLS private key

Create a TLS private key.

Examples

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

Options

Name Type Description Notes
tls_private_key TlsPrivateKey [optional]

Return type

TlsPrivateKeyResponse

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

delete_tls_key()

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.

Examples

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

Options

Name Type Description Notes
tls_private_key_id String Alphanumeric string identifying a private Key.

Return type

nil (empty response body)

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

get_tls_key()

get_tls_key(opts): <TlsPrivateKeyResponse> # Get a TLS private key

Show a TLS private key.

Examples

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

Options

Name Type Description Notes
tls_private_key_id String Alphanumeric string identifying a private Key.

Return type

TlsPrivateKeyResponse

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

list_tls_keys()

list_tls_keys(opts): <TlsPrivateKeysResponse> # List TLS private keys

List all TLS private keys.

Examples

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

Options

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]

Return type

TlsPrivateKeysResponse

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