Class: Conductor::Http::Api::SecretResourceApi
- Inherits:
-
Object
- Object
- Conductor::Http::Api::SecretResourceApi
- Defined in:
- lib/conductor/http/api/secret_resource_api.rb
Overview
SecretResourceApi - API for secret management operations (Orkes)
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_secret(key) ⇒ void
Delete a secret.
-
#delete_tag_for_secret(tags, key) ⇒ Array<TagObject>
Delete tags for a secret.
-
#get_secret(key) ⇒ String
Get a secret value.
-
#get_tags(key) ⇒ Array<TagObject>
Get tags for a secret.
-
#initialize(api_client = nil) ⇒ SecretResourceApi
constructor
A new instance of SecretResourceApi.
-
#list_all_secret_names ⇒ Array<String>
List all secret names.
-
#list_secrets_that_user_can_grant_access_to ⇒ Array<String>
List secrets that user can grant access to.
-
#put_secret(value, key) ⇒ void
Store a secret value.
-
#put_tag_for_secret(tags, key) ⇒ void
Set tags for a secret.
-
#secret_exists(key) ⇒ Boolean
Check if a secret exists.
Constructor Details
#initialize(api_client = nil) ⇒ SecretResourceApi
Returns a new instance of SecretResourceApi.
12 13 14 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 12 def initialize(api_client = nil) @api_client = api_client || ApiClient.new end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
10 11 12 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 10 def api_client @api_client end |
Instance Method Details
#delete_secret(key) ⇒ void
This method returns an undefined value.
Delete a secret
68 69 70 71 72 73 74 75 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 68 def delete_secret(key) @api_client.call_api( '/secrets/{key}', 'DELETE', path_params: { key: key }, return_http_data_only: true ) end |
#delete_tag_for_secret(tags, key) ⇒ Array<TagObject>
Delete tags for a secret
121 122 123 124 125 126 127 128 129 130 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 121 def delete_tag_for_secret(, key) @api_client.call_api( '/secrets/{key}/tags', 'DELETE', path_params: { key: key }, body: , return_type: 'Array<TagObject>', return_http_data_only: true ) end |
#get_secret(key) ⇒ String
Get a secret value
33 34 35 36 37 38 39 40 41 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 33 def get_secret(key) @api_client.call_api( '/secrets/{key}', 'GET', path_params: { key: key }, return_type: 'String', return_http_data_only: true ) end |
#get_tags(key) ⇒ Array<TagObject>
Get tags for a secret
107 108 109 110 111 112 113 114 115 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 107 def (key) @api_client.call_api( '/secrets/{key}/tags', 'GET', path_params: { key: key }, return_type: 'Array<TagObject>', return_http_data_only: true ) end |
#list_all_secret_names ⇒ Array<String>
List all secret names
45 46 47 48 49 50 51 52 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 45 def list_all_secret_names @api_client.call_api( '/secrets', 'POST', return_type: 'Array<String>', return_http_data_only: true ) end |
#list_secrets_that_user_can_grant_access_to ⇒ Array<String>
List secrets that user can grant access to
56 57 58 59 60 61 62 63 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 56 def list_secrets_that_user_can_grant_access_to @api_client.call_api( '/secrets', 'GET', return_type: 'Array<String>', return_http_data_only: true ) end |
#put_secret(value, key) ⇒ void
This method returns an undefined value.
Store a secret value
20 21 22 23 24 25 26 27 28 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 20 def put_secret(value, key) @api_client.call_api( '/secrets/{key}', 'PUT', path_params: { key: key }, body: value, return_http_data_only: true ) end |
#put_tag_for_secret(tags, key) ⇒ void
This method returns an undefined value.
Set tags for a secret
94 95 96 97 98 99 100 101 102 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 94 def put_tag_for_secret(, key) @api_client.call_api( '/secrets/{key}/tags', 'PUT', path_params: { key: key }, body: , return_http_data_only: true ) end |
#secret_exists(key) ⇒ Boolean
Check if a secret exists
80 81 82 83 84 85 86 87 88 |
# File 'lib/conductor/http/api/secret_resource_api.rb', line 80 def secret_exists(key) @api_client.call_api( '/secrets/{key}/exists', 'GET', path_params: { key: key }, return_type: 'Boolean', return_http_data_only: true ) end |