Update to go SDK docs: 15029001030

This commit is contained in:
developer-relations-sp
2025-05-14 19:08:14 +00:00
parent 8e2adb109d
commit 7a610557d9
336 changed files with 34603 additions and 34979 deletions

View File

@@ -68,7 +68,7 @@ import (
"context"
"fmt"
"os"
"encoding/json"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
@@ -93,24 +93,23 @@ func main() {
}
}`) // SimIntegrationDetails | DTO containing the details of the SIM integration
var simIntegrationDetails beta.SimIntegrationDetails
if err := json.Unmarshal(simintegrationdetails, &simIntegrationDetails); err != nil {
fmt.Println("Error:", err)
return
}
var simIntegrationDetails beta.SimIntegrationDetails
if err := json.Unmarshal(simintegrationdetails, &simIntegrationDetails); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
// response from `CreateSIMIntegration`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.CreateSIMIntegration`: %v\n", resp)
//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)
}
// response from `CreateSIMIntegration`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.CreateSIMIntegration`: %v\n", resp)
}
```
@@ -157,7 +156,7 @@ import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
@@ -165,16 +164,17 @@ import (
func main() {
id := `12345` // string | The id of the integration to delete. # string | The id of the integration to delete.
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
//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)
}
}
```
@@ -221,7 +221,7 @@ import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
@@ -229,18 +229,18 @@ import (
func main() {
id := `12345` // string | The id of the integration. # string | The id of the integration.
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
// response from `GetSIMIntegration`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.GetSIMIntegration`: %v\n", resp)
//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)
}
// response from `GetSIMIntegration`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.GetSIMIntegration`: %v\n", resp)
}
```
@@ -279,25 +279,25 @@ import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
func main() {
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
// response from `GetSIMIntegrations`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.GetSIMIntegrations`: %v\n", resp)
//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)
}
// response from `GetSIMIntegrations`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.GetSIMIntegrations`: %v\n", resp)
}
```
@@ -345,7 +345,7 @@ import (
"context"
"fmt"
"os"
"encoding/json"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
@@ -354,24 +354,23 @@ func main() {
id := `12345` // string | SIM integration id # string | SIM integration id
jsonpatch := []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.
var jsonPatch beta.JsonPatch
if err := json.Unmarshal(jsonpatch, &jsonPatch); err != nil {
fmt.Println("Error:", err)
return
}
var jsonPatch beta.JsonPatch
if err := json.Unmarshal(jsonpatch, &jsonPatch); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
// response from `PatchBeforeProvisioningRule`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.PatchBeforeProvisioningRule`: %v\n", resp)
//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)
}
// response from `PatchBeforeProvisioningRule`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.PatchBeforeProvisioningRule`: %v\n", resp)
}
```
@@ -419,7 +418,7 @@ import (
"context"
"fmt"
"os"
"encoding/json"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
@@ -428,24 +427,23 @@ func main() {
id := `12345` // string | SIM integration id # string | SIM integration id
jsonpatch := []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
var jsonPatch beta.JsonPatch
if err := json.Unmarshal(jsonpatch, &jsonPatch); err != nil {
fmt.Println("Error:", err)
return
}
var jsonPatch beta.JsonPatch
if err := json.Unmarshal(jsonpatch, &jsonPatch); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
// response from `PatchSIMAttributes`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.PatchSIMAttributes`: %v\n", resp)
//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)
}
// response from `PatchSIMAttributes`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.PatchSIMAttributes`: %v\n", resp)
}
```
@@ -493,7 +491,7 @@ import (
"context"
"fmt"
"os"
"encoding/json"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)
@@ -519,24 +517,23 @@ func main() {
}
}`) // SimIntegrationDetails | The full DTO of the integration containing the updated model
var simIntegrationDetails beta.SimIntegrationDetails
if err := json.Unmarshal(simintegrationdetails, &simIntegrationDetails); err != nil {
fmt.Println("Error:", err)
return
}
var simIntegrationDetails beta.SimIntegrationDetails
if err := json.Unmarshal(simintegrationdetails, &simIntegrationDetails); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
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)
}
// response from `PutSIMIntegration`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.PutSIMIntegration`: %v\n", resp)
//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)
}
// response from `PutSIMIntegration`: ServiceDeskIntegrationDto
fmt.Fprintf(os.Stdout, "Response from `SIMIntegrationsAPI.PutSIMIntegration`: %v\n", resp)
}
```