var result UserList=UsersList(ctx, clusterId) .Limit(limit) .Offset(offset) .System(system) .Execute()
List users
Example
packagemainimport ("context""fmt""os" ionoscloud "github.com/ionos-cloud/sdk-go-dbaas-postgres")funcmain() { clusterId :="498ae72f-411f-11eb-9d07-046c59cc737e"// string | The unique ID of the cluster. limit :=int32(100) // int32 | The maximum number of elements to return. Use together with 'offset' for pagination. (optional) (default to 100) offset :=int32(200) // int32 | The first element to return. Use together with 'limit' for pagination. (optional) (default to 0) system :=true// bool | If set to 'true' all users, including system users are returned. System users cannot be deleted or updated. (optional) configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) resource, resp, err := apiClient.UsersApi.UsersList(context.Background(), clusterId).Limit(limit).Offset(offset).System(system).Execute()if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.UsersList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) }// response from `UsersList`: UserList fmt.Fprintf(os.Stdout, "Response from `UsersApi.UsersList`: %v\n", resource)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster.
Other Parameters
Other parameters are passed through a pointer to an apiUsersListRequest struct via the builder pattern
Name
Type
Description
Notes
limit
int32
The maximum number of elements to return. Use together with 'offset' for pagination.
[default to 100]
offset
int32
The first element to return. Use together with 'limit' for pagination.
[default to 0]
system
bool
If set to 'true' all users, including system users are returned. System users cannot be deleted or updated.