require 'fastly'
api_instance = Fastly::SecretStoreApi.new
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: <ClientKey> # Create new client key
Create a new client key for encrypting secrets locally before uploading.
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
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to README]
create_secret_store(opts): <SecretStoreResponse> # Create new secret store
Create a new secret store.
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
Name | Type | Description | Notes |
---|---|---|---|
secret_store | SecretStore | [optional] |
[Back to top] [Back to API list] [Back to README]
delete_secret_store(opts) # Delete secret store
Delete a secret store and all of its contents.
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
Name | Type | Description | Notes |
---|---|---|---|
store_id | String |
nil (empty response body)
[Back to top] [Back to API list] [Back to README]
get_secret_store(opts): <SecretStoreResponse> # Get secret store by ID
Get a secret store by ID.
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
Name | Type | Description | Notes |
---|---|---|---|
store_id | String |
[Back to top] [Back to API list] [Back to README]
get_secret_stores(opts): <InlineResponse2005> # Get all secret stores
Get all secret stores.
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
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] |
[Back to top] [Back to API list] [Back to README]
signing_key: <SigningKey> # Get public key
Get the public key used for signing client keys.
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
This endpoint does not need any parameter.