mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-09 04:19:37 +00:00
update go docs and examples
This commit is contained in:
@@ -91,23 +91,33 @@ 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() {
|
||||
passwordSyncGroup := fmt.Sprintf(`{
|
||||
data := []byte(`{
|
||||
"created" : "2023-03-16T04:00:00Z",
|
||||
"name" : "Password Sync Group 1",
|
||||
"modified" : "2023-03-16T04:00:00Z",
|
||||
"passwordPolicyId" : "2c91808d744ba0ce01746f93b6204501",
|
||||
"id" : "6881f631-3bd5-4213-9c75-8e05cc3e35dd",
|
||||
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
||||
}`) # PasswordSyncGroup |
|
||||
}`) // PasswordSyncGroup |
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.CreatePasswordSyncGroup(context.Background()).PasswordSyncGroup(passwordSyncGroup).Execute()
|
||||
|
||||
var passwordSyncGroup v3.PasswordSyncGroup
|
||||
if err := json.Unmarshal(data, &passwordSyncGroup); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.CreatePasswordSyncGroup(context.Background()).PasswordSyncGroup(passwordSyncGroup).Execute()
|
||||
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.CreatePasswordSyncGroup(context.Background()).PasswordSyncGroup(passwordSyncGroup).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.CreatePasswordSyncGroup``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -160,16 +170,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 := 6881f631-3bd5-4213-9c75-8e05cc3e35dd # string | The ID of password sync group to delete. # string | The ID of password sync group to delete.
|
||||
id := `6881f631-3bd5-4213-9c75-8e05cc3e35dd` // string | The ID of password sync group to delete. # string | The ID of password sync group to delete.
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
r, err := apiClient.V3.PasswordSyncGroupsAPI.DeletePasswordSyncGroup(context.Background(), id).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
r, err := apiClient.V3.PasswordSyncGroupsAPI.DeletePasswordSyncGroup(context.Background(), id).Execute()
|
||||
//r, err := apiClient.V3.PasswordSyncGroupsAPI.DeletePasswordSyncGroup(context.Background(), id).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.DeletePasswordSyncGroup``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -220,16 +234,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 := 6881f631-3bd5-4213-9c75-8e05cc3e35dd # string | The ID of password sync group to retrieve. # string | The ID of password sync group to retrieve.
|
||||
id := `6881f631-3bd5-4213-9c75-8e05cc3e35dd` // string | The ID of password sync group to retrieve. # string | The ID of password sync group to retrieve.
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroup(context.Background(), id).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroup(context.Background(), id).Execute()
|
||||
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroup(context.Background(), id).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.GetPasswordSyncGroup``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -280,18 +298,22 @@ 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() {
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroups(context.Background()).Limit(limit).Offset(offset).Count(count).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroups(context.Background()).Execute()
|
||||
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroups(context.Background()).Limit(limit).Offset(offset).Count(count).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.GetPasswordSyncGroups``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -345,24 +367,34 @@ 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 := 6881f631-3bd5-4213-9c75-8e05cc3e35dd # string | The ID of password sync group to update. # string | The ID of password sync group to update.
|
||||
passwordSyncGroup := fmt.Sprintf(`{
|
||||
id := `6881f631-3bd5-4213-9c75-8e05cc3e35dd` // string | The ID of password sync group to update. # string | The ID of password sync group to update.
|
||||
data := []byte(`{
|
||||
"created" : "2023-03-16T04:00:00Z",
|
||||
"name" : "Password Sync Group 1",
|
||||
"modified" : "2023-03-16T04:00:00Z",
|
||||
"passwordPolicyId" : "2c91808d744ba0ce01746f93b6204501",
|
||||
"id" : "6881f631-3bd5-4213-9c75-8e05cc3e35dd",
|
||||
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
||||
}`) # PasswordSyncGroup |
|
||||
}`) // PasswordSyncGroup |
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.UpdatePasswordSyncGroup(context.Background(), id).PasswordSyncGroup(passwordSyncGroup).Execute()
|
||||
|
||||
var passwordSyncGroup v3.PasswordSyncGroup
|
||||
if err := json.Unmarshal(data, &passwordSyncGroup); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.UpdatePasswordSyncGroup(context.Background(), id).PasswordSyncGroup(passwordSyncGroup).Execute()
|
||||
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.UpdatePasswordSyncGroup(context.Background(), id).PasswordSyncGroup(passwordSyncGroup).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.UpdatePasswordSyncGroup``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
|
||||
Reference in New Issue
Block a user