bunnyshell.com/sdk@v0.16.0/docs/ServiceComponentVariableAPI.md (about) 1 # \ServiceComponentVariableAPI 2 3 All URIs are relative to *https://api.environments.bunnyshell.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**ServiceComponentVariableCreate**](ServiceComponentVariableAPI.md#ServiceComponentVariableCreate) | **Post** /v1/service_component_variables | Create a specific component variable. 8 [**ServiceComponentVariableDelete**](ServiceComponentVariableAPI.md#ServiceComponentVariableDelete) | **Delete** /v1/service_component_variables/{id} | Delete a specific component variable. 9 [**ServiceComponentVariableEdit**](ServiceComponentVariableAPI.md#ServiceComponentVariableEdit) | **Patch** /v1/service_component_variables/{id} | Edit a specific component variable. 10 [**ServiceComponentVariableList**](ServiceComponentVariableAPI.md#ServiceComponentVariableList) | **Get** /v1/service_component_variables | List component variables matching any selected filters. 11 [**ServiceComponentVariableView**](ServiceComponentVariableAPI.md#ServiceComponentVariableView) | **Get** /v1/service_component_variables/{id} | View a specific component variable. 12 13 14 15 ## ServiceComponentVariableCreate 16 17 > ServiceComponentVariableItem ServiceComponentVariableCreate(ctx).ServiceComponentVariableCreateAction(serviceComponentVariableCreateAction).Execute() 18 19 Create a specific component variable. 20 21 22 23 ### Example 24 25 ```go 26 package main 27 28 import ( 29 "context" 30 "fmt" 31 "os" 32 openapiclient "bunnyshell.com/sdk" 33 ) 34 35 func main() { 36 serviceComponentVariableCreateAction := *openapiclient.NewServiceComponentVariableCreateAction("Name_example", "Value_example", "ServiceComponent_example") // ServiceComponentVariableCreateAction | The new service_component_variable resource 37 38 configuration := openapiclient.NewConfiguration() 39 apiClient := openapiclient.NewAPIClient(configuration) 40 resp, r, err := apiClient.ServiceComponentVariableAPI.ServiceComponentVariableCreate(context.Background()).ServiceComponentVariableCreateAction(serviceComponentVariableCreateAction).Execute() 41 if err != nil { 42 fmt.Fprintf(os.Stderr, "Error when calling `ServiceComponentVariableAPI.ServiceComponentVariableCreate``: %v\n", err) 43 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 44 } 45 // response from `ServiceComponentVariableCreate`: ServiceComponentVariableItem 46 fmt.Fprintf(os.Stdout, "Response from `ServiceComponentVariableAPI.ServiceComponentVariableCreate`: %v\n", resp) 47 } 48 ``` 49 50 ### Path Parameters 51 52 53 54 ### Other Parameters 55 56 Other parameters are passed through a pointer to a apiServiceComponentVariableCreateRequest struct via the builder pattern 57 58 59 Name | Type | Description | Notes 60 ------------- | ------------- | ------------- | ------------- 61 **serviceComponentVariableCreateAction** | [**ServiceComponentVariableCreateAction**](ServiceComponentVariableCreateAction.md) | The new service_component_variable resource | 62 63 ### Return type 64 65 [**ServiceComponentVariableItem**](ServiceComponentVariableItem.md) 66 67 ### Authorization 68 69 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 70 71 ### HTTP request headers 72 73 - **Content-Type**: application/json 74 - **Accept**: application/hal+json, application/problem+json 75 76 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 77 [[Back to Model list]](../README.md#documentation-for-models) 78 [[Back to README]](../README.md) 79 80 81 ## ServiceComponentVariableDelete 82 83 > ServiceComponentVariableDelete(ctx, id).Body(body).Execute() 84 85 Delete a specific component variable. 86 87 88 89 ### Example 90 91 ```go 92 package main 93 94 import ( 95 "context" 96 "fmt" 97 "os" 98 openapiclient "bunnyshell.com/sdk" 99 ) 100 101 func main() { 102 id := "id_example" // string | Resource identifier 103 body := interface{}(987) // interface{} | No Request Body (optional) 104 105 configuration := openapiclient.NewConfiguration() 106 apiClient := openapiclient.NewAPIClient(configuration) 107 r, err := apiClient.ServiceComponentVariableAPI.ServiceComponentVariableDelete(context.Background(), id).Body(body).Execute() 108 if err != nil { 109 fmt.Fprintf(os.Stderr, "Error when calling `ServiceComponentVariableAPI.ServiceComponentVariableDelete``: %v\n", err) 110 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 111 } 112 } 113 ``` 114 115 ### Path Parameters 116 117 118 Name | Type | Description | Notes 119 ------------- | ------------- | ------------- | ------------- 120 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 121 **id** | **string** | Resource identifier | 122 123 ### Other Parameters 124 125 Other parameters are passed through a pointer to a apiServiceComponentVariableDeleteRequest struct via the builder pattern 126 127 128 Name | Type | Description | Notes 129 ------------- | ------------- | ------------- | ------------- 130 131 **body** | **interface{}** | No Request Body | 132 133 ### Return type 134 135 (empty response body) 136 137 ### Authorization 138 139 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 140 141 ### HTTP request headers 142 143 - **Content-Type**: application/json 144 - **Accept**: application/problem+json 145 146 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 147 [[Back to Model list]](../README.md#documentation-for-models) 148 [[Back to README]](../README.md) 149 150 151 ## ServiceComponentVariableEdit 152 153 > ServiceComponentVariableItem ServiceComponentVariableEdit(ctx, id).ServiceComponentVariableEditAction(serviceComponentVariableEditAction).Execute() 154 155 Edit a specific component variable. 156 157 158 159 ### Example 160 161 ```go 162 package main 163 164 import ( 165 "context" 166 "fmt" 167 "os" 168 openapiclient "bunnyshell.com/sdk" 169 ) 170 171 func main() { 172 id := "id_example" // string | Resource identifier 173 serviceComponentVariableEditAction := *openapiclient.NewServiceComponentVariableEditAction("Value_example") // ServiceComponentVariableEditAction | The updated service_component_variable resource 174 175 configuration := openapiclient.NewConfiguration() 176 apiClient := openapiclient.NewAPIClient(configuration) 177 resp, r, err := apiClient.ServiceComponentVariableAPI.ServiceComponentVariableEdit(context.Background(), id).ServiceComponentVariableEditAction(serviceComponentVariableEditAction).Execute() 178 if err != nil { 179 fmt.Fprintf(os.Stderr, "Error when calling `ServiceComponentVariableAPI.ServiceComponentVariableEdit``: %v\n", err) 180 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 181 } 182 // response from `ServiceComponentVariableEdit`: ServiceComponentVariableItem 183 fmt.Fprintf(os.Stdout, "Response from `ServiceComponentVariableAPI.ServiceComponentVariableEdit`: %v\n", resp) 184 } 185 ``` 186 187 ### Path Parameters 188 189 190 Name | Type | Description | Notes 191 ------------- | ------------- | ------------- | ------------- 192 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 193 **id** | **string** | Resource identifier | 194 195 ### Other Parameters 196 197 Other parameters are passed through a pointer to a apiServiceComponentVariableEditRequest struct via the builder pattern 198 199 200 Name | Type | Description | Notes 201 ------------- | ------------- | ------------- | ------------- 202 203 **serviceComponentVariableEditAction** | [**ServiceComponentVariableEditAction**](ServiceComponentVariableEditAction.md) | The updated service_component_variable resource | 204 205 ### Return type 206 207 [**ServiceComponentVariableItem**](ServiceComponentVariableItem.md) 208 209 ### Authorization 210 211 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 212 213 ### HTTP request headers 214 215 - **Content-Type**: application/json 216 - **Accept**: application/hal+json, application/problem+json 217 218 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 219 [[Back to Model list]](../README.md#documentation-for-models) 220 [[Back to README]](../README.md) 221 222 223 ## ServiceComponentVariableList 224 225 > PaginatedServiceComponentVariableCollection ServiceComponentVariableList(ctx).Page(page).Name(name).ServiceComponent(serviceComponent).ServiceComponentName(serviceComponentName).Environment(environment).Project(project).Organization(organization).Execute() 226 227 List component variables matching any selected filters. 228 229 230 231 ### Example 232 233 ```go 234 package main 235 236 import ( 237 "context" 238 "fmt" 239 "os" 240 openapiclient "bunnyshell.com/sdk" 241 ) 242 243 func main() { 244 page := int32(56) // int32 | The collection page number (optional) (default to 1) 245 name := "name_example" // string | Filter by name (optional) 246 serviceComponent := "serviceComponent_example" // string | Filter by serviceComponent (optional) 247 serviceComponentName := "serviceComponentName_example" // string | Filter by serviceComponentName (optional) 248 environment := "environment_example" // string | Filter by environment (optional) 249 project := "project_example" // string | Filter by project (optional) 250 organization := "organization_example" // string | Filter by organization (optional) 251 252 configuration := openapiclient.NewConfiguration() 253 apiClient := openapiclient.NewAPIClient(configuration) 254 resp, r, err := apiClient.ServiceComponentVariableAPI.ServiceComponentVariableList(context.Background()).Page(page).Name(name).ServiceComponent(serviceComponent).ServiceComponentName(serviceComponentName).Environment(environment).Project(project).Organization(organization).Execute() 255 if err != nil { 256 fmt.Fprintf(os.Stderr, "Error when calling `ServiceComponentVariableAPI.ServiceComponentVariableList``: %v\n", err) 257 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 258 } 259 // response from `ServiceComponentVariableList`: PaginatedServiceComponentVariableCollection 260 fmt.Fprintf(os.Stdout, "Response from `ServiceComponentVariableAPI.ServiceComponentVariableList`: %v\n", resp) 261 } 262 ``` 263 264 ### Path Parameters 265 266 267 268 ### Other Parameters 269 270 Other parameters are passed through a pointer to a apiServiceComponentVariableListRequest struct via the builder pattern 271 272 273 Name | Type | Description | Notes 274 ------------- | ------------- | ------------- | ------------- 275 **page** | **int32** | The collection page number | [default to 1] 276 **name** | **string** | Filter by name | 277 **serviceComponent** | **string** | Filter by serviceComponent | 278 **serviceComponentName** | **string** | Filter by serviceComponentName | 279 **environment** | **string** | Filter by environment | 280 **project** | **string** | Filter by project | 281 **organization** | **string** | Filter by organization | 282 283 ### Return type 284 285 [**PaginatedServiceComponentVariableCollection**](PaginatedServiceComponentVariableCollection.md) 286 287 ### Authorization 288 289 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 290 291 ### HTTP request headers 292 293 - **Content-Type**: Not defined 294 - **Accept**: application/hal+json, application/problem+json 295 296 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 297 [[Back to Model list]](../README.md#documentation-for-models) 298 [[Back to README]](../README.md) 299 300 301 ## ServiceComponentVariableView 302 303 > ServiceComponentVariableItem ServiceComponentVariableView(ctx, id).Execute() 304 305 View a specific component variable. 306 307 308 309 ### Example 310 311 ```go 312 package main 313 314 import ( 315 "context" 316 "fmt" 317 "os" 318 openapiclient "bunnyshell.com/sdk" 319 ) 320 321 func main() { 322 id := "id_example" // string | Resource identifier 323 324 configuration := openapiclient.NewConfiguration() 325 apiClient := openapiclient.NewAPIClient(configuration) 326 resp, r, err := apiClient.ServiceComponentVariableAPI.ServiceComponentVariableView(context.Background(), id).Execute() 327 if err != nil { 328 fmt.Fprintf(os.Stderr, "Error when calling `ServiceComponentVariableAPI.ServiceComponentVariableView``: %v\n", err) 329 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 330 } 331 // response from `ServiceComponentVariableView`: ServiceComponentVariableItem 332 fmt.Fprintf(os.Stdout, "Response from `ServiceComponentVariableAPI.ServiceComponentVariableView`: %v\n", resp) 333 } 334 ``` 335 336 ### Path Parameters 337 338 339 Name | Type | Description | Notes 340 ------------- | ------------- | ------------- | ------------- 341 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 342 **id** | **string** | Resource identifier | 343 344 ### Other Parameters 345 346 Other parameters are passed through a pointer to a apiServiceComponentVariableViewRequest struct via the builder pattern 347 348 349 Name | Type | Description | Notes 350 ------------- | ------------- | ------------- | ------------- 351 352 353 ### Return type 354 355 [**ServiceComponentVariableItem**](ServiceComponentVariableItem.md) 356 357 ### Authorization 358 359 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 360 361 ### HTTP request headers 362 363 - **Content-Type**: Not defined 364 - **Accept**: application/hal+json, application/problem+json 365 366 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 367 [[Back to Model list]](../README.md#documentation-for-models) 368 [[Back to README]](../README.md) 369