Skip to content

Latest commit

 

History

History
204 lines (124 loc) · 6.06 KB

ConfigurationTemplatesApi.md

File metadata and controls

204 lines (124 loc) · 6.06 KB

\ConfigurationTemplatesApi

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

CreateConfigurationTemplate

ConfigurationTemplate CreateConfigurationTemplate(ctx).CreateConfigurationTemplateInfo(createConfigurationTemplateInfo).Execute()

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateConfigurationTemplateRequest struct via the builder pattern

Name Type Description Notes
createConfigurationTemplateInfo CreateConfigurationTemplateInfo

Return type

ConfigurationTemplate

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetConfigurationTemplates

PaginatedConfigurationTemplateList GetConfigurationTemplates(ctx).Execute()

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetConfigurationTemplatesRequest struct via the builder pattern

Return type

PaginatedConfigurationTemplateList

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateConfigurationTemplate

ConfigurationTemplate UpdateConfigurationTemplate(ctx).UpdateConfigurationTemplateInfo(updateConfigurationTemplateInfo).Execute()

Example

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)
}

Path Parameters

Other Parameters

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

Return type

ConfigurationTemplate

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]