|
| 1 | +# hyperstack.AccessKeysApi |
| 2 | + |
| 3 | +All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**create_access_key_endpoint**](AccessKeysApi.md#create_access_key_endpoint) | **POST** /object-storage/access-keys | Generate a new access key |
| 8 | +[**delete_access_key_endpoint**](AccessKeysApi.md#delete_access_key_endpoint) | **DELETE** /object-storage/access-keys/{access_key_id} | Remove an existing access key |
| 9 | +[**list_access_keys_endpoint**](AccessKeysApi.md#list_access_keys_endpoint) | **GET** /object-storage/access-keys | List access keys |
| 10 | + |
| 11 | + |
| 12 | +# **create_access_key_endpoint** |
| 13 | +> ObjectStorageAccessKeyCreateResponse create_access_key_endpoint(body=body) |
| 14 | +
|
| 15 | +Generate a new access key |
| 16 | + |
| 17 | +### Example |
| 18 | + |
| 19 | +* Api Key Authentication (apiKey): |
| 20 | + |
| 21 | +```python |
| 22 | +import hyperstack |
| 23 | +from hyperstack.models.object_storage_access_key_create_request import ObjectStorageAccessKeyCreateRequest |
| 24 | +from hyperstack.models.object_storage_access_key_create_response import ObjectStorageAccessKeyCreateResponse |
| 25 | +from hyperstack.rest import ApiException |
| 26 | +from pprint import pprint |
| 27 | + |
| 28 | +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 |
| 29 | +# See configuration.py for a list of all supported configuration parameters. |
| 30 | +configuration = hyperstack.Configuration( |
| 31 | + host = "https://infrahub-api.nexgencloud.com/v1" |
| 32 | +) |
| 33 | + |
| 34 | +# The client must configure the authentication and authorization parameters |
| 35 | +# in accordance with the API server security policy. |
| 36 | +# Examples for each auth method are provided below, use the example that |
| 37 | +# satisfies your auth use case. |
| 38 | + |
| 39 | +# Configure API key authorization: apiKey |
| 40 | +configuration.api_key['apiKey'] = os.environ["API_KEY"] |
| 41 | + |
| 42 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 43 | +# configuration.api_key_prefix['apiKey'] = 'Bearer' |
| 44 | + |
| 45 | +# Enter a context with an instance of the API client |
| 46 | +with hyperstack.ApiClient(configuration) as api_client: |
| 47 | + # Create an instance of the API class |
| 48 | + api_instance = hyperstack.AccessKeysApi(api_client) |
| 49 | + body = hyperstack.ObjectStorageAccessKeyCreateRequest() # ObjectStorageAccessKeyCreateRequest | (optional) |
| 50 | + |
| 51 | + try: |
| 52 | + # Generate a new access key |
| 53 | + api_response = api_instance.create_access_key_endpoint(body=body) |
| 54 | + print("The response of AccessKeysApi->create_access_key_endpoint:\n") |
| 55 | + pprint(api_response) |
| 56 | + except Exception as e: |
| 57 | + print("Exception when calling AccessKeysApi->create_access_key_endpoint: %s\n" % e) |
| 58 | +``` |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +### Parameters |
| 63 | + |
| 64 | + |
| 65 | +Name | Type | Description | Notes |
| 66 | +------------- | ------------- | ------------- | ------------- |
| 67 | + **body** | [**ObjectStorageAccessKeyCreateRequest**](ObjectStorageAccessKeyCreateRequest.md)| | [optional] |
| 68 | + |
| 69 | +### Return type |
| 70 | + |
| 71 | +[**ObjectStorageAccessKeyCreateResponse**](ObjectStorageAccessKeyCreateResponse.md) |
| 72 | + |
| 73 | +### Authorization |
| 74 | + |
| 75 | +[apiKey](../README.md#apiKey) |
| 76 | + |
| 77 | +### HTTP request headers |
| 78 | + |
| 79 | + - **Content-Type**: application/json |
| 80 | + - **Accept**: application/json |
| 81 | + |
| 82 | +### HTTP response details |
| 83 | + |
| 84 | +| Status code | Description | Response headers | |
| 85 | +|-------------|-------------|------------------| |
| 86 | +**201** | Created | - | |
| 87 | +**400** | Bad Request | - | |
| 88 | +**422** | Validation Error | - | |
| 89 | + |
| 90 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 91 | + |
| 92 | +# **delete_access_key_endpoint** |
| 93 | +> ObjectStorageDeleteResponse delete_access_key_endpoint(access_key_id) |
| 94 | +
|
| 95 | +Remove an existing access key |
| 96 | + |
| 97 | +### Example |
| 98 | + |
| 99 | +* Api Key Authentication (apiKey): |
| 100 | + |
| 101 | +```python |
| 102 | +import hyperstack |
| 103 | +from hyperstack.models.object_storage_delete_response import ObjectStorageDeleteResponse |
| 104 | +from hyperstack.rest import ApiException |
| 105 | +from pprint import pprint |
| 106 | + |
| 107 | +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 |
| 108 | +# See configuration.py for a list of all supported configuration parameters. |
| 109 | +configuration = hyperstack.Configuration( |
| 110 | + host = "https://infrahub-api.nexgencloud.com/v1" |
| 111 | +) |
| 112 | + |
| 113 | +# The client must configure the authentication and authorization parameters |
| 114 | +# in accordance with the API server security policy. |
| 115 | +# Examples for each auth method are provided below, use the example that |
| 116 | +# satisfies your auth use case. |
| 117 | + |
| 118 | +# Configure API key authorization: apiKey |
| 119 | +configuration.api_key['apiKey'] = os.environ["API_KEY"] |
| 120 | + |
| 121 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 122 | +# configuration.api_key_prefix['apiKey'] = 'Bearer' |
| 123 | + |
| 124 | +# Enter a context with an instance of the API client |
| 125 | +with hyperstack.ApiClient(configuration) as api_client: |
| 126 | + # Create an instance of the API class |
| 127 | + api_instance = hyperstack.AccessKeysApi(api_client) |
| 128 | + access_key_id = 'access_key_id_example' # str | |
| 129 | + |
| 130 | + try: |
| 131 | + # Remove an existing access key |
| 132 | + api_response = api_instance.delete_access_key_endpoint(access_key_id) |
| 133 | + print("The response of AccessKeysApi->delete_access_key_endpoint:\n") |
| 134 | + pprint(api_response) |
| 135 | + except Exception as e: |
| 136 | + print("Exception when calling AccessKeysApi->delete_access_key_endpoint: %s\n" % e) |
| 137 | +``` |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | +### Parameters |
| 142 | + |
| 143 | + |
| 144 | +Name | Type | Description | Notes |
| 145 | +------------- | ------------- | ------------- | ------------- |
| 146 | + **access_key_id** | **str**| | |
| 147 | + |
| 148 | +### Return type |
| 149 | + |
| 150 | +[**ObjectStorageDeleteResponse**](ObjectStorageDeleteResponse.md) |
| 151 | + |
| 152 | +### Authorization |
| 153 | + |
| 154 | +[apiKey](../README.md#apiKey) |
| 155 | + |
| 156 | +### HTTP request headers |
| 157 | + |
| 158 | + - **Content-Type**: Not defined |
| 159 | + - **Accept**: application/json |
| 160 | + |
| 161 | +### HTTP response details |
| 162 | + |
| 163 | +| Status code | Description | Response headers | |
| 164 | +|-------------|-------------|------------------| |
| 165 | +**200** | OK | - | |
| 166 | +**400** | Bad Request | - | |
| 167 | +**404** | Not Found | - | |
| 168 | +**422** | Validation Error | - | |
| 169 | + |
| 170 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 171 | + |
| 172 | +# **list_access_keys_endpoint** |
| 173 | +> ObjectStorageAccessKeyListResponse list_access_keys_endpoint(search=search, page=page, page_size=page_size) |
| 174 | +
|
| 175 | +List access keys |
| 176 | + |
| 177 | +### Example |
| 178 | + |
| 179 | +* Api Key Authentication (apiKey): |
| 180 | + |
| 181 | +```python |
| 182 | +import hyperstack |
| 183 | +from hyperstack.models.object_storage_access_key_list_response import ObjectStorageAccessKeyListResponse |
| 184 | +from hyperstack.rest import ApiException |
| 185 | +from pprint import pprint |
| 186 | + |
| 187 | +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 |
| 188 | +# See configuration.py for a list of all supported configuration parameters. |
| 189 | +configuration = hyperstack.Configuration( |
| 190 | + host = "https://infrahub-api.nexgencloud.com/v1" |
| 191 | +) |
| 192 | + |
| 193 | +# The client must configure the authentication and authorization parameters |
| 194 | +# in accordance with the API server security policy. |
| 195 | +# Examples for each auth method are provided below, use the example that |
| 196 | +# satisfies your auth use case. |
| 197 | + |
| 198 | +# Configure API key authorization: apiKey |
| 199 | +configuration.api_key['apiKey'] = os.environ["API_KEY"] |
| 200 | + |
| 201 | +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed |
| 202 | +# configuration.api_key_prefix['apiKey'] = 'Bearer' |
| 203 | + |
| 204 | +# Enter a context with an instance of the API client |
| 205 | +with hyperstack.ApiClient(configuration) as api_client: |
| 206 | + # Create an instance of the API class |
| 207 | + api_instance = hyperstack.AccessKeysApi(api_client) |
| 208 | + search = 'search_example' # str | (optional) |
| 209 | + page = 'page_example' # str | (optional) |
| 210 | + page_size = 'page_size_example' # str | (optional) |
| 211 | + |
| 212 | + try: |
| 213 | + # List access keys |
| 214 | + api_response = api_instance.list_access_keys_endpoint(search=search, page=page, page_size=page_size) |
| 215 | + print("The response of AccessKeysApi->list_access_keys_endpoint:\n") |
| 216 | + pprint(api_response) |
| 217 | + except Exception as e: |
| 218 | + print("Exception when calling AccessKeysApi->list_access_keys_endpoint: %s\n" % e) |
| 219 | +``` |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | +### Parameters |
| 224 | + |
| 225 | + |
| 226 | +Name | Type | Description | Notes |
| 227 | +------------- | ------------- | ------------- | ------------- |
| 228 | + **search** | **str**| | [optional] |
| 229 | + **page** | **str**| | [optional] |
| 230 | + **page_size** | **str**| | [optional] |
| 231 | + |
| 232 | +### Return type |
| 233 | + |
| 234 | +[**ObjectStorageAccessKeyListResponse**](ObjectStorageAccessKeyListResponse.md) |
| 235 | + |
| 236 | +### Authorization |
| 237 | + |
| 238 | +[apiKey](../README.md#apiKey) |
| 239 | + |
| 240 | +### HTTP request headers |
| 241 | + |
| 242 | + - **Content-Type**: Not defined |
| 243 | + - **Accept**: application/json |
| 244 | + |
| 245 | +### HTTP response details |
| 246 | + |
| 247 | +| Status code | Description | Response headers | |
| 248 | +|-------------|-------------|------------------| |
| 249 | +**201** | Created | - | |
| 250 | +**400** | Bad Request | - | |
| 251 | +**422** | Validation Error | - | |
| 252 | + |
| 253 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 254 | + |
0 commit comments