All URIs are relative to https://api.opal.dev/v1
Method | HTTP request | Description |
---|---|---|
CreateConfigurationTemplate | Post /configuration-templates | |
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]
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]