update go docs and examples

This commit is contained in:
darrell-thobe-sp
2025-05-13 11:12:04 -04:00
parent 43fe2ffd30
commit d89039d220
580 changed files with 62492 additions and 25327 deletions

View File

@@ -63,21 +63,31 @@ import (
"context"
"fmt"
"os"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
"encoding/json"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
managedClientRequest := fmt.Sprintf(`{
data := []byte(`{
"name" : "aName",
"description" : "A short description of the ManagedClient",
"clusterId" : "aClusterId",
"type" : "VA"
}`) # ManagedClientRequest |
}`) // ManagedClientRequest |
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.CreateManagedClient(context.Background()).ManagedClientRequest(managedClientRequest).Execute()
var managedClientRequest v3.ManagedClientRequest
if err := json.Unmarshal(data, &managedClientRequest); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.CreateManagedClient(context.Background()).ManagedClientRequest(managedClientRequest).Execute()
//resp, r, err := apiClient.V3.ManagedClientsAPI.CreateManagedClient(context.Background()).ManagedClientRequest(managedClientRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.CreateManagedClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -130,16 +140,20 @@ import (
"context"
"fmt"
"os"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7 # string | Managed client ID. # string | Managed client ID.
id := `4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7` // string | Managed client ID. # string | Managed client ID.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
r, err := apiClient.V3.ManagedClientsAPI.DeleteManagedClient(context.Background(), id).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.V3.ManagedClientsAPI.DeleteManagedClient(context.Background(), id).Execute()
//r, err := apiClient.V3.ManagedClientsAPI.DeleteManagedClient(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.DeleteManagedClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -190,16 +204,20 @@ import (
"context"
"fmt"
"os"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7 # string | Managed client ID. # string | Managed client ID.
id := `4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7` // string | Managed client ID. # string | Managed client ID.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClient(context.Background(), id).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClient(context.Background(), id).Execute()
//resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClient(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.GetManagedClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -253,17 +271,21 @@ import (
"context"
"fmt"
"os"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := aClientId # string | Managed client ID to get status for. # string | Managed client ID to get status for.
type_ := # ManagedClientType | Managed client type to get status for. # ManagedClientType | Managed client type to get status for.
id := `aClientId` // string | Managed client ID to get status for. # string | Managed client ID to get status for.
type_ := // ManagedClientType | Managed client type to get status for. # ManagedClientType | Managed client type to get status for.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClientStatus(context.Background(), id).Type_(type_).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClientStatus(context.Background(), id).Type_(type_).Execute()
//resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClientStatus(context.Background(), id).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.GetManagedClientStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -315,19 +337,23 @@ import (
"context"
"fmt"
"os"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
offset := 0 # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
limit := 250 # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
count := true # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
filters := name eq "client name" # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* **name**: *eq* **clientId**: *eq* **clusterId**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* **name**: *eq* **clientId**: *eq* **clusterId**: *eq* (optional)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
filters := `name eq "client name"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* **name**: *eq* **clientId**: *eq* **clusterId**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* **name**: *eq* **clientId**: *eq* **clusterId**: *eq* (optional)
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClients(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClients(context.Background()).Execute()
//resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClients(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.GetManagedClients``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -381,17 +407,27 @@ import (
"context"
"fmt"
"os"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
"encoding/json"
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7 # string | Managed client ID. # string | Managed client ID.
jsonPatchOperation := fmt.Sprintf(``) # []JsonPatchOperation | JSONPatch payload used to update the object.
id := `4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7` // string | Managed client ID. # string | Managed client ID.
jsonPatchOperation := fmt.Sprintf(``) // []JsonPatchOperation | JSONPatch payload used to update the object.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.UpdateManagedClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
var jsonPatchOperation v3.JsonPatchOperation
if err := json.Unmarshal(data, &jsonPatchOperation); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V3.ManagedClientsAPI.UpdateManagedClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
//resp, r, err := apiClient.V3.ManagedClientsAPI.UpdateManagedClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.UpdateManagedClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)