UsersApi
All URIs are relative to https://api.ionos.com/databases/postgresql
UsersDelete
var result = UsersDelete(ctx, clusterId, username)
.Execute()Delete user
Example
package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go-dbaas-postgres"
)
func main() {
clusterId := "498ae72f-411f-11eb-9d07-046c59cc737e" // string | The unique ID of the cluster.
username := "benjamin" // string | The authentication username.
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.UsersApi.UsersDelete(context.Background(), clusterId, username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.UsersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
}Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster.
username
string
The authentication username.
Other Parameters
Other parameters are passed through a pointer to an apiUsersDeleteRequest struct via the builder pattern
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
UsersGet
Get user
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster.
username
string
The authentication username.
Other Parameters
Other parameters are passed through a pointer to an apiUsersGetRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
UsersList
List users
Example
Path Parameters
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
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.
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
UsersPatch
Patch user
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId
string
The unique ID of the cluster.
username
string
The authentication username.
Other Parameters
Other parameters are passed through a pointer to an apiUsersPatchRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
UsersPost
Create a user
Example
Path Parameters
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 apiUsersPostRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
Last updated
