All URIs are relative to https://api.opal.dev/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateConfigurationTemplate | Post /configuration-templates | |
| DeleteConfigurationTemplate | Delete /configuration-templates/{configuration_template_id} | |
| GetConfigurationTemplates | Get /configuration-templates | |
| UpdateConfigurationTemplate | Put /configuration-templates |
ConfigurationTemplate CreateConfigurationTemplate(ctx).CreateConfigurationTemplateInfo(createConfigurationTemplateInfo).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
createConfigurationTemplateInfo := *openapiclient.NewCreateConfigurationTemplateInfo("7c86c85d-0651-43e2-a748-d69d658418e8", *openapiclient.NewVisibilityInfo(openapiclient.VisibilityTypeEnum("GLOBAL")), false, false, "Prod AWS Template") // CreateConfigurationTemplateInfo |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ConfigurationTemplatesAPI.CreateConfigurationTemplate(context.Background()).CreateConfigurationTemplateInfo(createConfigurationTemplateInfo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.CreateConfigurationTemplate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateConfigurationTemplate`: ConfigurationTemplate
fmt.Fprintf(os.Stdout, "Response from `ConfigurationTemplatesAPI.CreateConfigurationTemplate`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateConfigurationTemplateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createConfigurationTemplateInfo | CreateConfigurationTemplateInfo |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteConfigurationTemplate(ctx, configurationTemplateId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
configurationTemplateId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the configuration template.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.ConfigurationTemplatesAPI.DeleteConfigurationTemplate(context.Background(), configurationTemplateId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.DeleteConfigurationTemplate``: %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. | |
| configurationTemplateId | string | The ID of the configuration template. |
Other parameters are passed through a pointer to a apiDeleteConfigurationTemplateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedConfigurationTemplateList GetConfigurationTemplates(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ConfigurationTemplatesAPI.GetConfigurationTemplates(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.GetConfigurationTemplates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConfigurationTemplates`: PaginatedConfigurationTemplateList
fmt.Fprintf(os.Stdout, "Response from `ConfigurationTemplatesAPI.GetConfigurationTemplates`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetConfigurationTemplatesRequest struct via the builder pattern
PaginatedConfigurationTemplateList
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConfigurationTemplate UpdateConfigurationTemplate(ctx).UpdateConfigurationTemplateInfo(updateConfigurationTemplateInfo).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
updateConfigurationTemplateInfo := *openapiclient.NewUpdateConfigurationTemplateInfo("7c86c85d-0651-43e2-a748-d69d658418e8") // UpdateConfigurationTemplateInfo | Configuration template to be updated
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ConfigurationTemplatesAPI.UpdateConfigurationTemplate(context.Background()).UpdateConfigurationTemplateInfo(updateConfigurationTemplateInfo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.UpdateConfigurationTemplate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateConfigurationTemplate`: ConfigurationTemplate
fmt.Fprintf(os.Stdout, "Response from `ConfigurationTemplatesAPI.UpdateConfigurationTemplate`: %v\n", resp)
}Other parameters are passed through a pointer to a apiUpdateConfigurationTemplateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| updateConfigurationTemplateInfo | UpdateConfigurationTemplateInfo | Configuration template to be updated |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]