All URIs are relative to https://api.environments.bunnyshell.com
| Method | HTTP request | Description |
|---|---|---|
| EnvironmentVariableCreate | Post /v1/environment_variables | Create a specific environment variable. |
| EnvironmentVariableDelete | Delete /v1/environment_variables/{id} | Delete a specific environment variable. |
| EnvironmentVariableEdit | Patch /v1/environment_variables/{id} | Edit a specific environment variable. |
| EnvironmentVariableList | Get /v1/environment_variables | List environment variables matching any selected filters. |
| EnvironmentVariableView | Get /v1/environment_variables/{id} | View a specific environment variable. |
EnvironmentVariableItem EnvironmentVariableCreate(ctx).EnvironmentVariableCreateAction(environmentVariableCreateAction).Execute()
Create a specific environment variable.
package main
import (
"context"
"fmt"
"os"
openapiclient "bunnyshell.com/sdk"
)
func main() {
environmentVariableCreateAction := *openapiclient.NewEnvironmentVariableCreateAction("Name_example", "Value_example", "Environment_example") // EnvironmentVariableCreateAction | The new environment_variable resource
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EnvironmentVariableAPI.EnvironmentVariableCreate(context.Background()).EnvironmentVariableCreateAction(environmentVariableCreateAction).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentVariableAPI.EnvironmentVariableCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnvironmentVariableCreate`: EnvironmentVariableItem
fmt.Fprintf(os.Stdout, "Response from `EnvironmentVariableAPI.EnvironmentVariableCreate`: %v\n", resp)
}Other parameters are passed through a pointer to a apiEnvironmentVariableCreateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| environmentVariableCreateAction | EnvironmentVariableCreateAction | The new environment_variable resource |
- Content-Type: application/json
- Accept: application/hal+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnvironmentVariableDelete(ctx, id).Body(body).Execute()
Delete a specific environment variable.
package main
import (
"context"
"fmt"
"os"
openapiclient "bunnyshell.com/sdk"
)
func main() {
id := "id_example" // string | Resource identifier
body := interface{}(987) // interface{} | No Request Body (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.EnvironmentVariableAPI.EnvironmentVariableDelete(context.Background(), id).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentVariableAPI.EnvironmentVariableDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Resource identifier |
Other parameters are passed through a pointer to a apiEnvironmentVariableDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
body | interface{} | No Request Body |
(empty response body)
- Content-Type: application/json
- Accept: application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnvironmentVariableItem EnvironmentVariableEdit(ctx, id).EnvironmentVariableEditAction(environmentVariableEditAction).Execute()
Edit a specific environment variable.
package main
import (
"context"
"fmt"
"os"
openapiclient "bunnyshell.com/sdk"
)
func main() {
id := "id_example" // string | Resource identifier
environmentVariableEditAction := *openapiclient.NewEnvironmentVariableEditAction("Value_example") // EnvironmentVariableEditAction | The updated environment_variable resource
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EnvironmentVariableAPI.EnvironmentVariableEdit(context.Background(), id).EnvironmentVariableEditAction(environmentVariableEditAction).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentVariableAPI.EnvironmentVariableEdit``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnvironmentVariableEdit`: EnvironmentVariableItem
fmt.Fprintf(os.Stdout, "Response from `EnvironmentVariableAPI.EnvironmentVariableEdit`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Resource identifier |
Other parameters are passed through a pointer to a apiEnvironmentVariableEditRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
environmentVariableEditAction | EnvironmentVariableEditAction | The updated environment_variable resource |
- Content-Type: application/json
- Accept: application/hal+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedEnvironmentVariableCollection EnvironmentVariableList(ctx).Page(page).Name(name).Environment(environment).Organization(organization).Execute()
List environment variables matching any selected filters.
package main
import (
"context"
"fmt"
"os"
openapiclient "bunnyshell.com/sdk"
)
func main() {
page := int32(56) // int32 | The collection page number (optional) (default to 1)
name := "name_example" // string | Filter by name (optional)
environment := "environment_example" // string | Filter by environment (optional)
organization := "organization_example" // string | Filter by organization (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EnvironmentVariableAPI.EnvironmentVariableList(context.Background()).Page(page).Name(name).Environment(environment).Organization(organization).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentVariableAPI.EnvironmentVariableList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnvironmentVariableList`: PaginatedEnvironmentVariableCollection
fmt.Fprintf(os.Stdout, "Response from `EnvironmentVariableAPI.EnvironmentVariableList`: %v\n", resp)
}Other parameters are passed through a pointer to a apiEnvironmentVariableListRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int32 | The collection page number | [default to 1] |
| name | string | Filter by name | |
| environment | string | Filter by environment | |
| organization | string | Filter by organization |
PaginatedEnvironmentVariableCollection
- Content-Type: Not defined
- Accept: application/hal+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EnvironmentVariableItem EnvironmentVariableView(ctx, id).Execute()
View a specific environment variable.
package main
import (
"context"
"fmt"
"os"
openapiclient "bunnyshell.com/sdk"
)
func main() {
id := "id_example" // string | Resource identifier
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EnvironmentVariableAPI.EnvironmentVariableView(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentVariableAPI.EnvironmentVariableView``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnvironmentVariableView`: EnvironmentVariableItem
fmt.Fprintf(os.Stdout, "Response from `EnvironmentVariableAPI.EnvironmentVariableView`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Resource identifier |
Other parameters are passed through a pointer to a apiEnvironmentVariableViewRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/hal+json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]