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