Skip to content

Latest commit

 

History

History
811 lines (526 loc) · 22.6 KB

ManagementApi.md

File metadata and controls

811 lines (526 loc) · 22.6 KB

\ManagementApi

All URIs are relative to /v1

Method HTTP request Description
AddRegisteredEngineUser Post /management/engines/{engineId}/users Associate a new engine user to a registered engine.
CreateHashicorpVault Post /management/vaults/hashicorp Configure a new Hashicorp Vault
DeleteHashicorpVault Delete /management/vaults/hashicorp/{vaultId} Delete a Hashicorp vault by id
DeleteRegisteredEngineUser Delete /management/engines/{engineId}/users/{userId} Remove a user from the list of users associated to a registered engine.
GetHashicorpVault Get /management/vaults/hashicorp/{vaultId} Get a Hashicorp vault by id
GetHashicorpVaults Get /management/vaults/hashicorp Returns a list of configured Hashicorp vaults.
GetRegisteredEngine Get /management/engines/{engineId} Returns a registered engine by ID.
GetRegisteredEngineUsers Get /management/engines/{engineId}/users Returns the list of users associated to an registered engine.
GetRegisteredEngines Get /management/engines Returns a list of registered engines.
RegisterEngine Post /management/engines Register an engine.
UnregisterEngine Delete /management/engines/{engineId} Unregister an engine.
UpdateRegisteredEngine Put /management/engines/{engineId} Update a registered engine.

AddRegisteredEngineUser

RegisteredEngineUser AddRegisteredEngineUser(ctx, engineId).RegisteredEngineUser(registeredEngineUser).Execute()

Associate a new engine user to a registered engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineId := int64(789) // int64 | Numeric ID of the registered engine.
    registeredEngineUser := *openapiclient.NewRegisteredEngineUser() // RegisteredEngineUser |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.AddRegisteredEngineUser(context.Background(), engineId).RegisteredEngineUser(registeredEngineUser).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.AddRegisteredEngineUser``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AddRegisteredEngineUser`: RegisteredEngineUser
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.AddRegisteredEngineUser`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
engineId int64 Numeric ID of the registered engine.

Other Parameters

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

Name Type Description Notes

registeredEngineUser | RegisteredEngineUser | |

Return type

RegisteredEngineUser

Authorization

ApiKeyAuth

HTTP request headers

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

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

CreateHashicorpVault

HashicorpVault CreateHashicorpVault(ctx).HashicorpVault(hashicorpVault).Execute()

Configure a new Hashicorp Vault

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    hashicorpVault := *openapiclient.NewHashicorpVault() // HashicorpVault | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.CreateHashicorpVault(context.Background()).HashicorpVault(hashicorpVault).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.CreateHashicorpVault``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateHashicorpVault`: HashicorpVault
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.CreateHashicorpVault`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
hashicorpVault HashicorpVault

Return type

HashicorpVault

Authorization

ApiKeyAuth

HTTP request headers

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

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

DeleteHashicorpVault

DeleteHashicorpVault(ctx, vaultId).Execute()

Delete a Hashicorp vault by id

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vaultId := int64(789) // int64 | Numeric ID of the Hashicorp vault

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.DeleteHashicorpVault(context.Background(), vaultId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.DeleteHashicorpVault``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vaultId int64 Numeric ID of the Hashicorp vault

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteRegisteredEngineUser

DeleteRegisteredEngineUser(ctx, engineId, userId).Execute()

Remove a user from the list of users associated to a registered engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineId := int64(789) // int64 | Numeric ID of the registered engine.
    userId := int64(789) // int64 | The ID of the registered engine user.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.DeleteRegisteredEngineUser(context.Background(), engineId, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.DeleteRegisteredEngineUser``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
engineId int64 Numeric ID of the registered engine.
userId int64 The ID of the registered engine user.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetHashicorpVault

HashicorpVault GetHashicorpVault(ctx, vaultId).Execute()

Get a Hashicorp vault by id

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vaultId := int64(789) // int64 | Numeric ID of the Hashicorp vault

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.GetHashicorpVault(context.Background(), vaultId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.GetHashicorpVault``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetHashicorpVault`: HashicorpVault
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.GetHashicorpVault`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vaultId int64 Numeric ID of the Hashicorp vault

Other Parameters

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

Name Type Description Notes

Return type

HashicorpVault

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetHashicorpVaults

[]HashicorpVault GetHashicorpVaults(ctx).Execute()

Returns a list of configured Hashicorp vaults.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.GetHashicorpVaults(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.GetHashicorpVaults``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetHashicorpVaults`: []HashicorpVault
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.GetHashicorpVaults`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]HashicorpVault

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetRegisteredEngine

RegisteredEngine GetRegisteredEngine(ctx, engineId).Execute()

Returns a registered engine by ID.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineId := int64(789) // int64 | Numeric ID of the registered engine.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.GetRegisteredEngine(context.Background(), engineId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.GetRegisteredEngine``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetRegisteredEngine`: RegisteredEngine
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.GetRegisteredEngine`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
engineId int64 Numeric ID of the registered engine.

Other Parameters

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

Name Type Description Notes

Return type

RegisteredEngine

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetRegisteredEngineUsers

[]RegisteredEngineUser GetRegisteredEngineUsers(ctx, engineId).Execute()

Returns the list of users associated to an registered engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineId := int64(789) // int64 | Numeric ID of the registered engine.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.GetRegisteredEngineUsers(context.Background(), engineId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.GetRegisteredEngineUsers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetRegisteredEngineUsers`: []RegisteredEngineUser
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.GetRegisteredEngineUsers`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
engineId int64 Numeric ID of the registered engine.

Other Parameters

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

Name Type Description Notes

Return type

[]RegisteredEngineUser

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetRegisteredEngines

[]RegisteredEngine GetRegisteredEngines(ctx).Execute()

Returns a list of registered engines.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.GetRegisteredEngines(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.GetRegisteredEngines``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetRegisteredEngines`: []RegisteredEngine
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.GetRegisteredEngines`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]RegisteredEngine

Authorization

ApiKeyAuth

HTTP request headers

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

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

RegisterEngine

RegisteredEngine RegisterEngine(ctx).EngineRegistrationParameter(engineRegistrationParameter).Execute()

Register an engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineRegistrationParameter := *openapiclient.NewEngineRegistrationParameter("Name_example", "Hostname_example") // EngineRegistrationParameter | The parameters to register an engine.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.RegisterEngine(context.Background()).EngineRegistrationParameter(engineRegistrationParameter).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.RegisterEngine``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RegisterEngine`: RegisteredEngine
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.RegisterEngine`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
engineRegistrationParameter EngineRegistrationParameter The parameters to register an engine.

Return type

RegisteredEngine

Authorization

ApiKeyAuth

HTTP request headers

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

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

UnregisterEngine

UnregisterEngine(ctx, engineId).Execute()

Unregister an engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineId := int64(789) // int64 | Numeric ID of the registered engine.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.UnregisterEngine(context.Background(), engineId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.UnregisterEngine``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
engineId int64 Numeric ID of the registered engine.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

UpdateRegisteredEngine

RegisteredEngine UpdateRegisteredEngine(ctx, engineId).RegisteredEngine(registeredEngine).Execute()

Update a registered engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    engineId := int64(789) // int64 | Numeric ID of the registered engine.
    registeredEngine := *openapiclient.NewRegisteredEngine("Name_example", "Hostname_example") // RegisteredEngine | The updated registration engine information.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ManagementApi.UpdateRegisteredEngine(context.Background(), engineId).RegisteredEngine(registeredEngine).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ManagementApi.UpdateRegisteredEngine``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateRegisteredEngine`: RegisteredEngine
    fmt.Fprintf(os.Stdout, "Response from `ManagementApi.UpdateRegisteredEngine`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
engineId int64 Numeric ID of the registered engine.

Other Parameters

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

Name Type Description Notes

registeredEngine | RegisteredEngine | The updated registration engine information. |

Return type

RegisteredEngine

Authorization

ApiKeyAuth

HTTP request headers

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

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