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

@@ -68,12 +68,13 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
simIntegrationDetails := fmt.Sprintf(`{
data := []byte(`{
"cluster" : "xyzzy999",
"statusMap" : "{closed_cancelled=Failed, closed_complete=Committed, closed_incomplete=Failed, closed_rejected=Failed, in_process=Queued, requested=Queued}",
"request" : "{description=SailPoint Access Request,, req_description=The Service Request created by SailPoint ServiceNow Service Integration Module (SIM).,, req_short_description=SailPoint New Access Request Created from IdentityNow,, short_description=SailPoint Access Request $!plan.arguments.identityRequestId}",
@@ -90,11 +91,20 @@ func main() {
"id" : "2c918085708c274401708c2a8a760001",
"type" : "IDENTITY"
}
}`) # SimIntegrationDetails | DTO containing the details of the SIM integration
}`) // SimIntegrationDetails | DTO containing the details of the SIM integration
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.CreateSIMIntegration(context.Background()).SimIntegrationDetails(simIntegrationDetails).Execute()
var simIntegrationDetails beta.SimIntegrationDetails
if err := json.Unmarshal(data, &simIntegrationDetails); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.CreateSIMIntegration(context.Background()).SimIntegrationDetails(simIntegrationDetails).Execute()
//resp, r, err := apiClient.Beta.SIMIntegrationsAPI.CreateSIMIntegration(context.Background()).SimIntegrationDetails(simIntegrationDetails).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.CreateSIMIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -147,16 +157,20 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 12345 # string | The id of the integration to delete. # string | The id of the integration to delete.
id := `12345` // string | The id of the integration to delete. # string | The id of the integration to delete.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
r, err := apiClient.Beta.SIMIntegrationsAPI.DeleteSIMIntegration(context.Background(), id).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.Beta.SIMIntegrationsAPI.DeleteSIMIntegration(context.Background(), id).Execute()
//r, err := apiClient.Beta.SIMIntegrationsAPI.DeleteSIMIntegration(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.DeleteSIMIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -207,16 +221,20 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 12345 # string | The id of the integration. # string | The id of the integration.
id := `12345` // string | The id of the integration. # string | The id of the integration.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.GetSIMIntegration(context.Background(), id).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.GetSIMIntegration(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.SIMIntegrationsAPI.GetSIMIntegration(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.GetSIMIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -261,15 +279,19 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.GetSIMIntegrations(context.Background()).Execute()
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.GetSIMIntegrations(context.Background()).Execute()
//resp, r, err := apiClient.Beta.SIMIntegrationsAPI.GetSIMIntegrations(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.GetSIMIntegrations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -323,17 +345,27 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 12345 # string | SIM integration id # string | SIM integration id
jsonPatch := fmt.Sprintf(`"[\n {\n\t \"op\": \"replace\",\n\t \"path\": \"/description\",\n\t \"value\": \"A new description\"\n }\n]"`) # JsonPatch | The JsonPatch object that describes the changes of SIM beforeProvisioningRule.
id := `12345` // string | SIM integration id # string | SIM integration id
data := []byte(`"[\n {\n\t \"op\": \"replace\",\n\t \"path\": \"/description\",\n\t \"value\": \"A new description\"\n }\n]"`) // JsonPatch | The JsonPatch object that describes the changes of SIM beforeProvisioningRule.
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PatchBeforeProvisioningRule(context.Background(), id).JsonPatch(jsonPatch).Execute()
var jsonPatch beta.JsonPatch
if err := json.Unmarshal(data, &jsonPatch); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PatchBeforeProvisioningRule(context.Background(), id).JsonPatch(jsonPatch).Execute()
//resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PatchBeforeProvisioningRule(context.Background(), id).JsonPatch(jsonPatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.PatchBeforeProvisioningRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -387,17 +419,27 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 12345 # string | SIM integration id # string | SIM integration id
jsonPatch := fmt.Sprintf(`"[\n {\n\t \"op\": \"replace\",\n\t \"path\": \"/description\",\n\t \"value\": \"A new description\"\n }\n]"`) # JsonPatch | The JsonPatch object that describes the changes of SIM
id := `12345` // string | SIM integration id # string | SIM integration id
data := []byte(`"[\n {\n\t \"op\": \"replace\",\n\t \"path\": \"/description\",\n\t \"value\": \"A new description\"\n }\n]"`) // JsonPatch | The JsonPatch object that describes the changes of SIM
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PatchSIMAttributes(context.Background(), id).JsonPatch(jsonPatch).Execute()
var jsonPatch beta.JsonPatch
if err := json.Unmarshal(data, &jsonPatch); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PatchSIMAttributes(context.Background(), id).JsonPatch(jsonPatch).Execute()
//resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PatchSIMAttributes(context.Background(), id).JsonPatch(jsonPatch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.PatchSIMAttributes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -451,13 +493,14 @@ import (
"context"
"fmt"
"os"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
id := 12345 # string | The id of the integration. # string | The id of the integration.
simIntegrationDetails := fmt.Sprintf(`{
id := `12345` // string | The id of the integration. # string | The id of the integration.
data := []byte(`{
"cluster" : "xyzzy999",
"statusMap" : "{closed_cancelled=Failed, closed_complete=Committed, closed_incomplete=Failed, closed_rejected=Failed, in_process=Queued, requested=Queued}",
"request" : "{description=SailPoint Access Request,, req_description=The Service Request created by SailPoint ServiceNow Service Integration Module (SIM).,, req_short_description=SailPoint New Access Request Created from IdentityNow,, short_description=SailPoint Access Request $!plan.arguments.identityRequestId}",
@@ -474,11 +517,20 @@ func main() {
"id" : "2c918085708c274401708c2a8a760001",
"type" : "IDENTITY"
}
}`) # SimIntegrationDetails | The full DTO of the integration containing the updated model
}`) // SimIntegrationDetails | The full DTO of the integration containing the updated model
configuration := NewDefaultConfiguration()
apiClient := NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PutSIMIntegration(context.Background(), id).SimIntegrationDetails(simIntegrationDetails).Execute()
var simIntegrationDetails beta.SimIntegrationDetails
if err := json.Unmarshal(data, &simIntegrationDetails); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PutSIMIntegration(context.Background(), id).SimIntegrationDetails(simIntegrationDetails).Execute()
//resp, r, err := apiClient.Beta.SIMIntegrationsAPI.PutSIMIntegration(context.Background(), id).SimIntegrationDetails(simIntegrationDetails).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SIMIntegrationsAPI.PutSIMIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)