Skip to content

Latest commit

 

History

History
238 lines (171 loc) · 5.79 KB

SecretStoreApi.md

File metadata and controls

238 lines (171 loc) · 5.79 KB

Fastly::SecretStoreApi

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

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
client_key POST /resources/stores/secret/client-key Create new client key
create_secret_store POST /resources/stores/secret Create new secret store
delete_secret_store DELETE /resources/stores/secret/{store_id} Delete secret store
get_secret_store GET /resources/stores/secret/{store_id} Get secret store by ID
get_secret_stores GET /resources/stores/secret Get all secret stores
signing_key GET /resources/stores/secret/signing-key Get public key

client_key()

client_key: <ClientKey> # Create new client key

Create a new client key for encrypting secrets locally before uploading.

Examples

api_instance = Fastly::SecretStoreApi.new

begin
  # Create new client key
  result = api_instance.client_key
  p result
rescue Fastly::ApiError => e
  puts "Error when calling SecretStoreApi->client_key: #{e}"
end

Options

This endpoint does not need any parameter.

Return type

ClientKey

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

create_secret_store()

create_secret_store(opts): <SecretStoreResponse> # Create new secret store

Create a new secret store.

Examples

api_instance = Fastly::SecretStoreApi.new
opts = {
    secret_store: Fastly::SecretStore.new, # SecretStore | 
}

begin
  # Create new secret store
  result = api_instance.create_secret_store(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling SecretStoreApi->create_secret_store: #{e}"
end

Options

Name Type Description Notes
secret_store SecretStore [optional]

Return type

SecretStoreResponse

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

delete_secret_store()

delete_secret_store(opts) # Delete secret store

Delete a secret store and all of its contents.

Examples

api_instance = Fastly::SecretStoreApi.new
opts = {
    store_id: 'store_id_example', # String | 
}

begin
  # Delete secret store
  api_instance.delete_secret_store(opts)
rescue Fastly::ApiError => e
  puts "Error when calling SecretStoreApi->delete_secret_store: #{e}"
end

Options

Name Type Description Notes
store_id String

Return type

nil (empty response body)

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

get_secret_store()

get_secret_store(opts): <SecretStoreResponse> # Get secret store by ID

Get a secret store by ID.

Examples

api_instance = Fastly::SecretStoreApi.new
opts = {
    store_id: 'store_id_example', # String | 
}

begin
  # Get secret store by ID
  result = api_instance.get_secret_store(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling SecretStoreApi->get_secret_store: #{e}"
end

Options

Name Type Description Notes
store_id String

Return type

SecretStoreResponse

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

get_secret_stores()

get_secret_stores(opts): <InlineResponse2005> # Get all secret stores

Get all secret stores.

Examples

api_instance = Fastly::SecretStoreApi.new
opts = {
    cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
    limit: 'limit_example', # String | Number of results per page. The maximum is 200.
    name: 'name_example', # String | Returns a one-element array containing the details for the named secret store.
}

begin
  # Get all secret stores
  result = api_instance.get_secret_stores(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling SecretStoreApi->get_secret_stores: #{e}"
end

Options

Name Type Description Notes
cursor String Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty. [optional]
limit String Number of results per page. The maximum is 200. [optional][default to '100']
name String Returns a one-element array containing the details for the named secret store. [optional]

Return type

InlineResponse2005

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

signing_key()

signing_key: <SigningKey> # Get public key

Get the public key used for signing client keys.

Examples

api_instance = Fastly::SecretStoreApi.new

begin
  # Get public key
  result = api_instance.signing_key
  p result
rescue Fastly::ApiError => e
  puts "Error when calling SecretStoreApi->signing_key: #{e}"
end

Options

This endpoint does not need any parameter.

Return type

SigningKey

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