bunnyshell.com/sdk@v0.16.0/docs/EnvironmentAPI.md (about)

     1  # \EnvironmentAPI
     2  
     3  All URIs are relative to *https://api.environments.bunnyshell.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**EnvironmentClone**](EnvironmentAPI.md#EnvironmentClone) | **Post** /v1/environments/{id}/clone | Clone an environment.
     8  [**EnvironmentCreate**](EnvironmentAPI.md#EnvironmentCreate) | **Post** /v1/environments | Creates a new environment.
     9  [**EnvironmentDefinition**](EnvironmentAPI.md#EnvironmentDefinition) | **Get** /v1/environments/{id}/definition | View the bunnyshell manifest for the environment
    10  [**EnvironmentDelete**](EnvironmentAPI.md#EnvironmentDelete) | **Post** /v1/environments/{id}/delete | Delete a specific environment.
    11  [**EnvironmentDeploy**](EnvironmentAPI.md#EnvironmentDeploy) | **Post** /v1/environments/{id}/deploy | Deploy an environment.
    12  [**EnvironmentEditBuildSettings**](EnvironmentAPI.md#EnvironmentEditBuildSettings) | **Patch** /v1/environments/{id}/build-settings | Edit the build settings of an environment.
    13  [**EnvironmentEditComponents**](EnvironmentAPI.md#EnvironmentEditComponents) | **Put** /v1/environments/{id}/components | Edit the components of an environment.
    14  [**EnvironmentEditConfiguration**](EnvironmentAPI.md#EnvironmentEditConfiguration) | **Put** /v1/environments/{id}/configuration | Edit an environment.
    15  [**EnvironmentEditSettings**](EnvironmentAPI.md#EnvironmentEditSettings) | **Put** /v1/environments/{id}/settings | Edit an environment.
    16  [**EnvironmentKubeConfig**](EnvironmentAPI.md#EnvironmentKubeConfig) | **Get** /v1/environments/{id}/kube-config | Download Kubernetes Config File
    17  [**EnvironmentList**](EnvironmentAPI.md#EnvironmentList) | **Get** /v1/environments | List environments matching any selected filters.
    18  [**EnvironmentStart**](EnvironmentAPI.md#EnvironmentStart) | **Post** /v1/environments/{id}/start | Start an environment.
    19  [**EnvironmentStop**](EnvironmentAPI.md#EnvironmentStop) | **Post** /v1/environments/{id}/stop | Stop an environment.
    20  [**EnvironmentView**](EnvironmentAPI.md#EnvironmentView) | **Get** /v1/environments/{id} | View a specific environment.
    21  
    22  
    23  
    24  ## EnvironmentClone
    25  
    26  > EnvironmentItem EnvironmentClone(ctx, id).EnvironmentCloneAction(environmentCloneAction).Execute()
    27  
    28  Clone an environment.
    29  
    30  
    31  
    32  ### Example
    33  
    34  ```go
    35  package main
    36  
    37  import (
    38      "context"
    39      "fmt"
    40      "os"
    41      openapiclient "bunnyshell.com/sdk"
    42  )
    43  
    44  func main() {
    45      id := "id_example" // string | Resource identifier
    46      environmentCloneAction := *openapiclient.NewEnvironmentCloneAction("Name_example") // EnvironmentCloneAction | The new environment resource
    47  
    48      configuration := openapiclient.NewConfiguration()
    49      apiClient := openapiclient.NewAPIClient(configuration)
    50      resp, r, err := apiClient.EnvironmentAPI.EnvironmentClone(context.Background(), id).EnvironmentCloneAction(environmentCloneAction).Execute()
    51      if err != nil {
    52          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentClone``: %v\n", err)
    53          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    54      }
    55      // response from `EnvironmentClone`: EnvironmentItem
    56      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentClone`: %v\n", resp)
    57  }
    58  ```
    59  
    60  ### Path Parameters
    61  
    62  
    63  Name | Type | Description  | Notes
    64  ------------- | ------------- | ------------- | -------------
    65  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    66  **id** | **string** | Resource identifier | 
    67  
    68  ### Other Parameters
    69  
    70  Other parameters are passed through a pointer to a apiEnvironmentCloneRequest struct via the builder pattern
    71  
    72  
    73  Name | Type | Description  | Notes
    74  ------------- | ------------- | ------------- | -------------
    75  
    76   **environmentCloneAction** | [**EnvironmentCloneAction**](EnvironmentCloneAction.md) | The new environment resource | 
    77  
    78  ### Return type
    79  
    80  [**EnvironmentItem**](EnvironmentItem.md)
    81  
    82  ### Authorization
    83  
    84  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
    85  
    86  ### HTTP request headers
    87  
    88  - **Content-Type**: application/json
    89  - **Accept**: application/hal+json, application/problem+json
    90  
    91  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    92  [[Back to Model list]](../README.md#documentation-for-models)
    93  [[Back to README]](../README.md)
    94  
    95  
    96  ## EnvironmentCreate
    97  
    98  > EnvironmentItem EnvironmentCreate(ctx).EnvironmentCreateAction(environmentCreateAction).Execute()
    99  
   100  Creates a new environment.
   101  
   102  
   103  
   104  ### Example
   105  
   106  ```go
   107  package main
   108  
   109  import (
   110      "context"
   111      "fmt"
   112      "os"
   113      openapiclient "bunnyshell.com/sdk"
   114  )
   115  
   116  func main() {
   117      environmentCreateAction := *openapiclient.NewEnvironmentCreateAction("Name_example", "Project_example") // EnvironmentCreateAction | The new environment resource
   118  
   119      configuration := openapiclient.NewConfiguration()
   120      apiClient := openapiclient.NewAPIClient(configuration)
   121      resp, r, err := apiClient.EnvironmentAPI.EnvironmentCreate(context.Background()).EnvironmentCreateAction(environmentCreateAction).Execute()
   122      if err != nil {
   123          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentCreate``: %v\n", err)
   124          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   125      }
   126      // response from `EnvironmentCreate`: EnvironmentItem
   127      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentCreate`: %v\n", resp)
   128  }
   129  ```
   130  
   131  ### Path Parameters
   132  
   133  
   134  
   135  ### Other Parameters
   136  
   137  Other parameters are passed through a pointer to a apiEnvironmentCreateRequest struct via the builder pattern
   138  
   139  
   140  Name | Type | Description  | Notes
   141  ------------- | ------------- | ------------- | -------------
   142   **environmentCreateAction** | [**EnvironmentCreateAction**](EnvironmentCreateAction.md) | The new environment resource | 
   143  
   144  ### Return type
   145  
   146  [**EnvironmentItem**](EnvironmentItem.md)
   147  
   148  ### Authorization
   149  
   150  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   151  
   152  ### HTTP request headers
   153  
   154  - **Content-Type**: application/json
   155  - **Accept**: application/hal+json, application/problem+json
   156  
   157  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   158  [[Back to Model list]](../README.md#documentation-for-models)
   159  [[Back to README]](../README.md)
   160  
   161  
   162  ## EnvironmentDefinition
   163  
   164  > map[string]interface{} EnvironmentDefinition(ctx, id).Execute()
   165  
   166  View the bunnyshell manifest for the environment
   167  
   168  
   169  
   170  ### Example
   171  
   172  ```go
   173  package main
   174  
   175  import (
   176      "context"
   177      "fmt"
   178      "os"
   179      openapiclient "bunnyshell.com/sdk"
   180  )
   181  
   182  func main() {
   183      id := "id_example" // string | Resource identifier
   184  
   185      configuration := openapiclient.NewConfiguration()
   186      apiClient := openapiclient.NewAPIClient(configuration)
   187      resp, r, err := apiClient.EnvironmentAPI.EnvironmentDefinition(context.Background(), id).Execute()
   188      if err != nil {
   189          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentDefinition``: %v\n", err)
   190          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   191      }
   192      // response from `EnvironmentDefinition`: map[string]interface{}
   193      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentDefinition`: %v\n", resp)
   194  }
   195  ```
   196  
   197  ### Path Parameters
   198  
   199  
   200  Name | Type | Description  | Notes
   201  ------------- | ------------- | ------------- | -------------
   202  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   203  **id** | **string** | Resource identifier | 
   204  
   205  ### Other Parameters
   206  
   207  Other parameters are passed through a pointer to a apiEnvironmentDefinitionRequest struct via the builder pattern
   208  
   209  
   210  Name | Type | Description  | Notes
   211  ------------- | ------------- | ------------- | -------------
   212  
   213  
   214  ### Return type
   215  
   216  **map[string]interface{}**
   217  
   218  ### Authorization
   219  
   220  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   221  
   222  ### HTTP request headers
   223  
   224  - **Content-Type**: Not defined
   225  - **Accept**: application/x+yaml, application/problem+json
   226  
   227  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   228  [[Back to Model list]](../README.md#documentation-for-models)
   229  [[Back to README]](../README.md)
   230  
   231  
   232  ## EnvironmentDelete
   233  
   234  > EventItem EnvironmentDelete(ctx, id).Body(body).Execute()
   235  
   236  Delete a specific environment.
   237  
   238  
   239  
   240  ### Example
   241  
   242  ```go
   243  package main
   244  
   245  import (
   246      "context"
   247      "fmt"
   248      "os"
   249      openapiclient "bunnyshell.com/sdk"
   250  )
   251  
   252  func main() {
   253      id := "id_example" // string | Resource identifier
   254      body := interface{}(987) // interface{} | No Request Body (optional)
   255  
   256      configuration := openapiclient.NewConfiguration()
   257      apiClient := openapiclient.NewAPIClient(configuration)
   258      resp, r, err := apiClient.EnvironmentAPI.EnvironmentDelete(context.Background(), id).Body(body).Execute()
   259      if err != nil {
   260          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentDelete``: %v\n", err)
   261          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   262      }
   263      // response from `EnvironmentDelete`: EventItem
   264      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentDelete`: %v\n", resp)
   265  }
   266  ```
   267  
   268  ### Path Parameters
   269  
   270  
   271  Name | Type | Description  | Notes
   272  ------------- | ------------- | ------------- | -------------
   273  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   274  **id** | **string** | Resource identifier | 
   275  
   276  ### Other Parameters
   277  
   278  Other parameters are passed through a pointer to a apiEnvironmentDeleteRequest struct via the builder pattern
   279  
   280  
   281  Name | Type | Description  | Notes
   282  ------------- | ------------- | ------------- | -------------
   283  
   284   **body** | **interface{}** | No Request Body | 
   285  
   286  ### Return type
   287  
   288  [**EventItem**](EventItem.md)
   289  
   290  ### Authorization
   291  
   292  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   293  
   294  ### HTTP request headers
   295  
   296  - **Content-Type**: application/json
   297  - **Accept**: application/hal+json, application/problem+json
   298  
   299  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   300  [[Back to Model list]](../README.md#documentation-for-models)
   301  [[Back to README]](../README.md)
   302  
   303  
   304  ## EnvironmentDeploy
   305  
   306  > EventItem EnvironmentDeploy(ctx, id).EnvironmentPartialDeployAction(environmentPartialDeployAction).Execute()
   307  
   308  Deploy an environment.
   309  
   310  
   311  
   312  ### Example
   313  
   314  ```go
   315  package main
   316  
   317  import (
   318      "context"
   319      "fmt"
   320      "os"
   321      openapiclient "bunnyshell.com/sdk"
   322  )
   323  
   324  func main() {
   325      id := "id_example" // string | Resource identifier
   326      environmentPartialDeployAction := *openapiclient.NewEnvironmentPartialDeployAction() // EnvironmentPartialDeployAction | The new environment resource
   327  
   328      configuration := openapiclient.NewConfiguration()
   329      apiClient := openapiclient.NewAPIClient(configuration)
   330      resp, r, err := apiClient.EnvironmentAPI.EnvironmentDeploy(context.Background(), id).EnvironmentPartialDeployAction(environmentPartialDeployAction).Execute()
   331      if err != nil {
   332          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentDeploy``: %v\n", err)
   333          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   334      }
   335      // response from `EnvironmentDeploy`: EventItem
   336      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentDeploy`: %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 apiEnvironmentDeployRequest struct via the builder pattern
   351  
   352  
   353  Name | Type | Description  | Notes
   354  ------------- | ------------- | ------------- | -------------
   355  
   356   **environmentPartialDeployAction** | [**EnvironmentPartialDeployAction**](EnvironmentPartialDeployAction.md) | The new environment resource | 
   357  
   358  ### Return type
   359  
   360  [**EventItem**](EventItem.md)
   361  
   362  ### Authorization
   363  
   364  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   365  
   366  ### HTTP request headers
   367  
   368  - **Content-Type**: application/json
   369  - **Accept**: application/hal+json, application/problem+json
   370  
   371  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   372  [[Back to Model list]](../README.md#documentation-for-models)
   373  [[Back to README]](../README.md)
   374  
   375  
   376  ## EnvironmentEditBuildSettings
   377  
   378  > EnvironmentItem EnvironmentEditBuildSettings(ctx, id).EnvironmentEditBuildSettingsAction(environmentEditBuildSettingsAction).Execute()
   379  
   380  Edit the build settings of an environment.
   381  
   382  
   383  
   384  ### Example
   385  
   386  ```go
   387  package main
   388  
   389  import (
   390      "context"
   391      "fmt"
   392      "os"
   393      openapiclient "bunnyshell.com/sdk"
   394  )
   395  
   396  func main() {
   397      id := "id_example" // string | Resource identifier
   398      environmentEditBuildSettingsAction := *openapiclient.NewEnvironmentEditBuildSettingsAction("RegistryIntegration_example", "KubernetesIntegration_example", "Cpu_example", NullableInt32(123), NullableInt32(123)) // EnvironmentEditBuildSettingsAction | The updated environment resource
   399  
   400      configuration := openapiclient.NewConfiguration()
   401      apiClient := openapiclient.NewAPIClient(configuration)
   402      resp, r, err := apiClient.EnvironmentAPI.EnvironmentEditBuildSettings(context.Background(), id).EnvironmentEditBuildSettingsAction(environmentEditBuildSettingsAction).Execute()
   403      if err != nil {
   404          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentEditBuildSettings``: %v\n", err)
   405          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   406      }
   407      // response from `EnvironmentEditBuildSettings`: EnvironmentItem
   408      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentEditBuildSettings`: %v\n", resp)
   409  }
   410  ```
   411  
   412  ### Path Parameters
   413  
   414  
   415  Name | Type | Description  | Notes
   416  ------------- | ------------- | ------------- | -------------
   417  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   418  **id** | **string** | Resource identifier | 
   419  
   420  ### Other Parameters
   421  
   422  Other parameters are passed through a pointer to a apiEnvironmentEditBuildSettingsRequest struct via the builder pattern
   423  
   424  
   425  Name | Type | Description  | Notes
   426  ------------- | ------------- | ------------- | -------------
   427  
   428   **environmentEditBuildSettingsAction** | [**EnvironmentEditBuildSettingsAction**](EnvironmentEditBuildSettingsAction.md) | The updated environment resource | 
   429  
   430  ### Return type
   431  
   432  [**EnvironmentItem**](EnvironmentItem.md)
   433  
   434  ### Authorization
   435  
   436  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   437  
   438  ### HTTP request headers
   439  
   440  - **Content-Type**: application/json
   441  - **Accept**: application/hal+json, application/problem+json
   442  
   443  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   444  [[Back to Model list]](../README.md#documentation-for-models)
   445  [[Back to README]](../README.md)
   446  
   447  
   448  ## EnvironmentEditComponents
   449  
   450  > EnvironmentItem EnvironmentEditComponents(ctx, id).EnvironmentEditComponentsAction(environmentEditComponentsAction).Execute()
   451  
   452  Edit the components of an environment.
   453  
   454  
   455  
   456  ### Example
   457  
   458  ```go
   459  package main
   460  
   461  import (
   462      "context"
   463      "fmt"
   464      "os"
   465      openapiclient "bunnyshell.com/sdk"
   466  )
   467  
   468  func main() {
   469      id := "id_example" // string | Resource identifier
   470      environmentEditComponentsAction := *openapiclient.NewEnvironmentEditComponentsAction(openapiclient.environment_EditComponentsAction_filter{FilterGit: openapiclient.NewFilterGit()}, *openapiclient.NewGitInfo()) // EnvironmentEditComponentsAction | The updated environment resource
   471  
   472      configuration := openapiclient.NewConfiguration()
   473      apiClient := openapiclient.NewAPIClient(configuration)
   474      resp, r, err := apiClient.EnvironmentAPI.EnvironmentEditComponents(context.Background(), id).EnvironmentEditComponentsAction(environmentEditComponentsAction).Execute()
   475      if err != nil {
   476          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentEditComponents``: %v\n", err)
   477          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   478      }
   479      // response from `EnvironmentEditComponents`: EnvironmentItem
   480      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentEditComponents`: %v\n", resp)
   481  }
   482  ```
   483  
   484  ### Path Parameters
   485  
   486  
   487  Name | Type | Description  | Notes
   488  ------------- | ------------- | ------------- | -------------
   489  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   490  **id** | **string** | Resource identifier | 
   491  
   492  ### Other Parameters
   493  
   494  Other parameters are passed through a pointer to a apiEnvironmentEditComponentsRequest struct via the builder pattern
   495  
   496  
   497  Name | Type | Description  | Notes
   498  ------------- | ------------- | ------------- | -------------
   499  
   500   **environmentEditComponentsAction** | [**EnvironmentEditComponentsAction**](EnvironmentEditComponentsAction.md) | The updated environment resource | 
   501  
   502  ### Return type
   503  
   504  [**EnvironmentItem**](EnvironmentItem.md)
   505  
   506  ### Authorization
   507  
   508  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   509  
   510  ### HTTP request headers
   511  
   512  - **Content-Type**: application/json
   513  - **Accept**: application/hal+json, application/problem+json
   514  
   515  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   516  [[Back to Model list]](../README.md#documentation-for-models)
   517  [[Back to README]](../README.md)
   518  
   519  
   520  ## EnvironmentEditConfiguration
   521  
   522  > EnvironmentItem EnvironmentEditConfiguration(ctx, id).EnvironmentEditConfiguration(environmentEditConfiguration).Execute()
   523  
   524  Edit an environment.
   525  
   526  
   527  
   528  ### Example
   529  
   530  ```go
   531  package main
   532  
   533  import (
   534      "context"
   535      "fmt"
   536      "os"
   537      openapiclient "bunnyshell.com/sdk"
   538  )
   539  
   540  func main() {
   541      id := "id_example" // string | Resource identifier
   542      environmentEditConfiguration := *openapiclient.NewEnvironmentEditConfiguration() // EnvironmentEditConfiguration | The updated environment resource
   543  
   544      configuration := openapiclient.NewConfiguration()
   545      apiClient := openapiclient.NewAPIClient(configuration)
   546      resp, r, err := apiClient.EnvironmentAPI.EnvironmentEditConfiguration(context.Background(), id).EnvironmentEditConfiguration(environmentEditConfiguration).Execute()
   547      if err != nil {
   548          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentEditConfiguration``: %v\n", err)
   549          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   550      }
   551      // response from `EnvironmentEditConfiguration`: EnvironmentItem
   552      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentEditConfiguration`: %v\n", resp)
   553  }
   554  ```
   555  
   556  ### Path Parameters
   557  
   558  
   559  Name | Type | Description  | Notes
   560  ------------- | ------------- | ------------- | -------------
   561  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   562  **id** | **string** | Resource identifier | 
   563  
   564  ### Other Parameters
   565  
   566  Other parameters are passed through a pointer to a apiEnvironmentEditConfigurationRequest struct via the builder pattern
   567  
   568  
   569  Name | Type | Description  | Notes
   570  ------------- | ------------- | ------------- | -------------
   571  
   572   **environmentEditConfiguration** | [**EnvironmentEditConfiguration**](EnvironmentEditConfiguration.md) | The updated environment resource | 
   573  
   574  ### Return type
   575  
   576  [**EnvironmentItem**](EnvironmentItem.md)
   577  
   578  ### Authorization
   579  
   580  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   581  
   582  ### HTTP request headers
   583  
   584  - **Content-Type**: application/json
   585  - **Accept**: application/hal+json, application/problem+json
   586  
   587  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   588  [[Back to Model list]](../README.md#documentation-for-models)
   589  [[Back to README]](../README.md)
   590  
   591  
   592  ## EnvironmentEditSettings
   593  
   594  > EnvironmentItem EnvironmentEditSettings(ctx, id).EnvironmentEditSettings(environmentEditSettings).Execute()
   595  
   596  Edit an environment.
   597  
   598  
   599  
   600  ### Example
   601  
   602  ```go
   603  package main
   604  
   605  import (
   606      "context"
   607      "fmt"
   608      "os"
   609      openapiclient "bunnyshell.com/sdk"
   610  )
   611  
   612  func main() {
   613      id := "id_example" // string | Resource identifier
   614      environmentEditSettings := *openapiclient.NewEnvironmentEditSettings() // EnvironmentEditSettings | The updated environment resource
   615  
   616      configuration := openapiclient.NewConfiguration()
   617      apiClient := openapiclient.NewAPIClient(configuration)
   618      resp, r, err := apiClient.EnvironmentAPI.EnvironmentEditSettings(context.Background(), id).EnvironmentEditSettings(environmentEditSettings).Execute()
   619      if err != nil {
   620          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentEditSettings``: %v\n", err)
   621          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   622      }
   623      // response from `EnvironmentEditSettings`: EnvironmentItem
   624      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentEditSettings`: %v\n", resp)
   625  }
   626  ```
   627  
   628  ### Path Parameters
   629  
   630  
   631  Name | Type | Description  | Notes
   632  ------------- | ------------- | ------------- | -------------
   633  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   634  **id** | **string** | Resource identifier | 
   635  
   636  ### Other Parameters
   637  
   638  Other parameters are passed through a pointer to a apiEnvironmentEditSettingsRequest struct via the builder pattern
   639  
   640  
   641  Name | Type | Description  | Notes
   642  ------------- | ------------- | ------------- | -------------
   643  
   644   **environmentEditSettings** | [**EnvironmentEditSettings**](EnvironmentEditSettings.md) | The updated environment resource | 
   645  
   646  ### Return type
   647  
   648  [**EnvironmentItem**](EnvironmentItem.md)
   649  
   650  ### Authorization
   651  
   652  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   653  
   654  ### HTTP request headers
   655  
   656  - **Content-Type**: application/json
   657  - **Accept**: application/hal+json, application/problem+json
   658  
   659  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   660  [[Back to Model list]](../README.md#documentation-for-models)
   661  [[Back to README]](../README.md)
   662  
   663  
   664  ## EnvironmentKubeConfig
   665  
   666  > EnvironmentKubeConfigKubeConfigRead EnvironmentKubeConfig(ctx, id).Execute()
   667  
   668  Download Kubernetes Config File
   669  
   670  
   671  
   672  ### Example
   673  
   674  ```go
   675  package main
   676  
   677  import (
   678      "context"
   679      "fmt"
   680      "os"
   681      openapiclient "bunnyshell.com/sdk"
   682  )
   683  
   684  func main() {
   685      id := "id_example" // string | Resource identifier
   686  
   687      configuration := openapiclient.NewConfiguration()
   688      apiClient := openapiclient.NewAPIClient(configuration)
   689      resp, r, err := apiClient.EnvironmentAPI.EnvironmentKubeConfig(context.Background(), id).Execute()
   690      if err != nil {
   691          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentKubeConfig``: %v\n", err)
   692          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   693      }
   694      // response from `EnvironmentKubeConfig`: EnvironmentKubeConfigKubeConfigRead
   695      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentKubeConfig`: %v\n", resp)
   696  }
   697  ```
   698  
   699  ### Path Parameters
   700  
   701  
   702  Name | Type | Description  | Notes
   703  ------------- | ------------- | ------------- | -------------
   704  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   705  **id** | **string** | Resource identifier | 
   706  
   707  ### Other Parameters
   708  
   709  Other parameters are passed through a pointer to a apiEnvironmentKubeConfigRequest struct via the builder pattern
   710  
   711  
   712  Name | Type | Description  | Notes
   713  ------------- | ------------- | ------------- | -------------
   714  
   715  
   716  ### Return type
   717  
   718  [**EnvironmentKubeConfigKubeConfigRead**](EnvironmentKubeConfigKubeConfigRead.md)
   719  
   720  ### Authorization
   721  
   722  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   723  
   724  ### HTTP request headers
   725  
   726  - **Content-Type**: Not defined
   727  - **Accept**: application/x+yaml, application/problem+json
   728  
   729  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   730  [[Back to Model list]](../README.md#documentation-for-models)
   731  [[Back to README]](../README.md)
   732  
   733  
   734  ## EnvironmentList
   735  
   736  > PaginatedEnvironmentCollection EnvironmentList(ctx).Page(page).Organization(organization).KubernetesIntegration(kubernetesIntegration).Type_(type_).OperationStatus(operationStatus).ClusterStatus(clusterStatus).Search(search).Project(project).Labels(labels).Execute()
   737  
   738  List environments matching any selected filters.
   739  
   740  
   741  
   742  ### Example
   743  
   744  ```go
   745  package main
   746  
   747  import (
   748      "context"
   749      "fmt"
   750      "os"
   751      openapiclient "bunnyshell.com/sdk"
   752  )
   753  
   754  func main() {
   755      page := int32(56) // int32 | The collection page number (optional) (default to 1)
   756      organization := "organization_example" // string | Filter by organization (optional)
   757      kubernetesIntegration := "kubernetesIntegration_example" // string | Filter by kubernetesIntegration (optional)
   758      type_ := "primary" // string | Filter by type (optional)
   759      operationStatus := "draft" // string | Filter by operationStatus (optional)
   760      clusterStatus := "running_ok" // string | Filter by clusterStatus (optional)
   761      search := "search_example" // string | Filter by search (optional)
   762      project := "project_example" // string | Filter by project (optional)
   763      labels := map[string]string{"key": map[string]string{"key": "Inner_example"}} // map[string]string | Filter by label key-value pair. (optional)
   764  
   765      configuration := openapiclient.NewConfiguration()
   766      apiClient := openapiclient.NewAPIClient(configuration)
   767      resp, r, err := apiClient.EnvironmentAPI.EnvironmentList(context.Background()).Page(page).Organization(organization).KubernetesIntegration(kubernetesIntegration).Type_(type_).OperationStatus(operationStatus).ClusterStatus(clusterStatus).Search(search).Project(project).Labels(labels).Execute()
   768      if err != nil {
   769          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentList``: %v\n", err)
   770          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   771      }
   772      // response from `EnvironmentList`: PaginatedEnvironmentCollection
   773      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentList`: %v\n", resp)
   774  }
   775  ```
   776  
   777  ### Path Parameters
   778  
   779  
   780  
   781  ### Other Parameters
   782  
   783  Other parameters are passed through a pointer to a apiEnvironmentListRequest struct via the builder pattern
   784  
   785  
   786  Name | Type | Description  | Notes
   787  ------------- | ------------- | ------------- | -------------
   788   **page** | **int32** | The collection page number | [default to 1]
   789   **organization** | **string** | Filter by organization | 
   790   **kubernetesIntegration** | **string** | Filter by kubernetesIntegration | 
   791   **type_** | **string** | Filter by type | 
   792   **operationStatus** | **string** | Filter by operationStatus | 
   793   **clusterStatus** | **string** | Filter by clusterStatus | 
   794   **search** | **string** | Filter by search | 
   795   **project** | **string** | Filter by project | 
   796   **labels** | **map[string]map[string]string** | Filter by label key-value pair. | 
   797  
   798  ### Return type
   799  
   800  [**PaginatedEnvironmentCollection**](PaginatedEnvironmentCollection.md)
   801  
   802  ### Authorization
   803  
   804  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   805  
   806  ### HTTP request headers
   807  
   808  - **Content-Type**: Not defined
   809  - **Accept**: application/hal+json, application/problem+json
   810  
   811  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   812  [[Back to Model list]](../README.md#documentation-for-models)
   813  [[Back to README]](../README.md)
   814  
   815  
   816  ## EnvironmentStart
   817  
   818  > EventItem EnvironmentStart(ctx, id).EnvironmentPartialStartAction(environmentPartialStartAction).Execute()
   819  
   820  Start an environment.
   821  
   822  
   823  
   824  ### Example
   825  
   826  ```go
   827  package main
   828  
   829  import (
   830      "context"
   831      "fmt"
   832      "os"
   833      openapiclient "bunnyshell.com/sdk"
   834  )
   835  
   836  func main() {
   837      id := "id_example" // string | Resource identifier
   838      environmentPartialStartAction := *openapiclient.NewEnvironmentPartialStartAction() // EnvironmentPartialStartAction | The new environment resource
   839  
   840      configuration := openapiclient.NewConfiguration()
   841      apiClient := openapiclient.NewAPIClient(configuration)
   842      resp, r, err := apiClient.EnvironmentAPI.EnvironmentStart(context.Background(), id).EnvironmentPartialStartAction(environmentPartialStartAction).Execute()
   843      if err != nil {
   844          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentStart``: %v\n", err)
   845          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   846      }
   847      // response from `EnvironmentStart`: EventItem
   848      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentStart`: %v\n", resp)
   849  }
   850  ```
   851  
   852  ### Path Parameters
   853  
   854  
   855  Name | Type | Description  | Notes
   856  ------------- | ------------- | ------------- | -------------
   857  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   858  **id** | **string** | Resource identifier | 
   859  
   860  ### Other Parameters
   861  
   862  Other parameters are passed through a pointer to a apiEnvironmentStartRequest struct via the builder pattern
   863  
   864  
   865  Name | Type | Description  | Notes
   866  ------------- | ------------- | ------------- | -------------
   867  
   868   **environmentPartialStartAction** | [**EnvironmentPartialStartAction**](EnvironmentPartialStartAction.md) | The new environment resource | 
   869  
   870  ### Return type
   871  
   872  [**EventItem**](EventItem.md)
   873  
   874  ### Authorization
   875  
   876  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   877  
   878  ### HTTP request headers
   879  
   880  - **Content-Type**: application/json
   881  - **Accept**: application/hal+json, application/problem+json
   882  
   883  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   884  [[Back to Model list]](../README.md#documentation-for-models)
   885  [[Back to README]](../README.md)
   886  
   887  
   888  ## EnvironmentStop
   889  
   890  > EventItem EnvironmentStop(ctx, id).EnvironmentPartialAction(environmentPartialAction).Execute()
   891  
   892  Stop an environment.
   893  
   894  
   895  
   896  ### Example
   897  
   898  ```go
   899  package main
   900  
   901  import (
   902      "context"
   903      "fmt"
   904      "os"
   905      openapiclient "bunnyshell.com/sdk"
   906  )
   907  
   908  func main() {
   909      id := "id_example" // string | Resource identifier
   910      environmentPartialAction := *openapiclient.NewEnvironmentPartialAction() // EnvironmentPartialAction | The new environment resource
   911  
   912      configuration := openapiclient.NewConfiguration()
   913      apiClient := openapiclient.NewAPIClient(configuration)
   914      resp, r, err := apiClient.EnvironmentAPI.EnvironmentStop(context.Background(), id).EnvironmentPartialAction(environmentPartialAction).Execute()
   915      if err != nil {
   916          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentStop``: %v\n", err)
   917          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   918      }
   919      // response from `EnvironmentStop`: EventItem
   920      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentStop`: %v\n", resp)
   921  }
   922  ```
   923  
   924  ### Path Parameters
   925  
   926  
   927  Name | Type | Description  | Notes
   928  ------------- | ------------- | ------------- | -------------
   929  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   930  **id** | **string** | Resource identifier | 
   931  
   932  ### Other Parameters
   933  
   934  Other parameters are passed through a pointer to a apiEnvironmentStopRequest struct via the builder pattern
   935  
   936  
   937  Name | Type | Description  | Notes
   938  ------------- | ------------- | ------------- | -------------
   939  
   940   **environmentPartialAction** | [**EnvironmentPartialAction**](EnvironmentPartialAction.md) | The new environment resource | 
   941  
   942  ### Return type
   943  
   944  [**EventItem**](EventItem.md)
   945  
   946  ### Authorization
   947  
   948  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
   949  
   950  ### HTTP request headers
   951  
   952  - **Content-Type**: application/json
   953  - **Accept**: application/hal+json, application/problem+json
   954  
   955  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   956  [[Back to Model list]](../README.md#documentation-for-models)
   957  [[Back to README]](../README.md)
   958  
   959  
   960  ## EnvironmentView
   961  
   962  > EnvironmentItem EnvironmentView(ctx, id).Execute()
   963  
   964  View a specific environment.
   965  
   966  
   967  
   968  ### Example
   969  
   970  ```go
   971  package main
   972  
   973  import (
   974      "context"
   975      "fmt"
   976      "os"
   977      openapiclient "bunnyshell.com/sdk"
   978  )
   979  
   980  func main() {
   981      id := "id_example" // string | Resource identifier
   982  
   983      configuration := openapiclient.NewConfiguration()
   984      apiClient := openapiclient.NewAPIClient(configuration)
   985      resp, r, err := apiClient.EnvironmentAPI.EnvironmentView(context.Background(), id).Execute()
   986      if err != nil {
   987          fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentAPI.EnvironmentView``: %v\n", err)
   988          fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
   989      }
   990      // response from `EnvironmentView`: EnvironmentItem
   991      fmt.Fprintf(os.Stdout, "Response from `EnvironmentAPI.EnvironmentView`: %v\n", resp)
   992  }
   993  ```
   994  
   995  ### Path Parameters
   996  
   997  
   998  Name | Type | Description  | Notes
   999  ------------- | ------------- | ------------- | -------------
  1000  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
  1001  **id** | **string** | Resource identifier | 
  1002  
  1003  ### Other Parameters
  1004  
  1005  Other parameters are passed through a pointer to a apiEnvironmentViewRequest struct via the builder pattern
  1006  
  1007  
  1008  Name | Type | Description  | Notes
  1009  ------------- | ------------- | ------------- | -------------
  1010  
  1011  
  1012  ### Return type
  1013  
  1014  [**EnvironmentItem**](EnvironmentItem.md)
  1015  
  1016  ### Authorization
  1017  
  1018  [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth)
  1019  
  1020  ### HTTP request headers
  1021  
  1022  - **Content-Type**: Not defined
  1023  - **Accept**: application/hal+json, application/problem+json
  1024  
  1025  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
  1026  [[Back to Model list]](../README.md#documentation-for-models)
  1027  [[Back to README]](../README.md)
  1028