Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 1.55 KB

File metadata and controls

70 lines (43 loc) · 1.55 KB

\PolicyAPI

All URIs are relative to https://infrahub-api.nexgencloud.com/v1

Method HTTP request Description
ListPolicies Get /auth/policies List Policies

ListPolicies

GetPoliciesResponseModel ListPolicies(ctx).Execute()

List Policies

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

GetPoliciesResponseModel

Authorization

apiKey

HTTP request headers

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

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