All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateRole | Post /api/v1/customers/{cUUID}/rbac/role | Create a custom role |
DeleteRole | Delete /api/v1/customers/{cUUID}/rbac/role/{rUUID} | Delete a custom role |
EditRole | Put /api/v1/customers/{cUUID}/rbac/role/{rUUID} | Edit a custom role |
GetRole | Get /api/v1/customers/{cUUID}/rbac/role/{rUUID} | Get a role's information |
GetRoleBindings | Get /api/v1/customers/{cUUID}/rbac/role_binding | Get all the role bindings available |
ListPermissions | Get /api/v1/customers/{cUUID}/rbac/permissions | List all the permissions available |
ListRoles | Get /api/v1/customers/{cUUID}/rbac/role | List all the roles available |
SetRoleBinding | Post /api/v1/customers/{cUUID}/rbac/role_binding/{userUUID} | Set the role bindings of a user |
Role CreateRole(ctx, cUUID).RoleFormData(roleFormData).Request(request).Execute()
Create a custom role
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
roleFormData := *openapiclient.NewRoleFormData("Description_example", "Name_example", []openapiclient.Permission{*openapiclient.NewPermission()}) // RoleFormData | create role form data
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.CreateRole(context.Background(), cUUID).RoleFormData(roleFormData).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.CreateRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateRole`: Role
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.CreateRole`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string |
Other parameters are passed through a pointer to a apiCreateRoleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
roleFormData | RoleFormData | create role form data | request | interface{} | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
YBPSuccess DeleteRole(ctx, cUUID, rUUID).Request(request).Execute()
Delete a custom role
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
rUUID := TODO // string |
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.DeleteRole(context.Background(), cUUID, rUUID).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.DeleteRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteRole`: YBPSuccess
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.DeleteRole`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string | ||
rUUID | string |
Other parameters are passed through a pointer to a apiDeleteRoleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
request | interface{} | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Role EditRole(ctx, cUUID, rUUID).RoleFormData(roleFormData).Request(request).Execute()
Edit a custom role
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
rUUID := TODO // string |
roleFormData := *openapiclient.NewRoleFormData("Description_example", "Name_example", []openapiclient.Permission{*openapiclient.NewPermission()}) // RoleFormData | edit role form data
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.EditRole(context.Background(), cUUID, rUUID).RoleFormData(roleFormData).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.EditRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EditRole`: Role
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.EditRole`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string | ||
rUUID | string |
Other parameters are passed through a pointer to a apiEditRoleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
roleFormData | RoleFormData | edit role form data | request | interface{} | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Role GetRole(ctx, cUUID, rUUID).Execute()
Get a role's information
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
rUUID := TODO // string |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.GetRole(context.Background(), cUUID, rUUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.GetRole``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRole`: Role
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.GetRole`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string | ||
rUUID | string |
Other parameters are passed through a pointer to a apiGetRoleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]RoleBinding GetRoleBindings(ctx, cUUID).UserUUID(userUUID).Execute()
Get all the role bindings available
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
userUUID := TODO // string | Optional user UUID to filter role binding map (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.GetRoleBindings(context.Background(), cUUID).UserUUID(userUUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.GetRoleBindings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRoleBindings`: map[string]RoleBinding
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.GetRoleBindings`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string |
Other parameters are passed through a pointer to a apiGetRoleBindingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
userUUID | string | Optional user UUID to filter role binding map |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]PermissionInfo ListPermissions(ctx, cUUID).ResourceType(resourceType).Execute()
List all the permissions available
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
resourceType := "resourceType_example" // string | Optional resource type to filter permission list (optional) (default to "null")
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.ListPermissions(context.Background(), cUUID).ResourceType(resourceType).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.ListPermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPermissions`: []PermissionInfo
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.ListPermissions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string |
Other parameters are passed through a pointer to a apiListPermissionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
resourceType | string | Optional resource type to filter permission list | [default to "null"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Role ListRoles(ctx, cUUID).RoleType(roleType).Execute()
List all the roles available
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
roleType := "roleType_example" // string | Optional role type to filter roles list (optional) (default to "null")
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.ListRoles(context.Background(), cUUID).RoleType(roleType).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.ListRoles``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListRoles`: []Role
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.ListRoles`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string |
Other parameters are passed through a pointer to a apiListRolesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
roleType | string | Optional role type to filter roles list | [default to "null"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]RoleBinding SetRoleBinding(ctx, cUUID, userUUID).RoleBindingFormData(roleBindingFormData).Request(request).Execute()
Set the role bindings of a user
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
cUUID := TODO // string |
userUUID := TODO // string |
roleBindingFormData := *openapiclient.NewRoleBindingFormData([]openapiclient.RoleResourceDefinition{*openapiclient.NewRoleResourceDefinition("RoleUUID_example")}) // RoleBindingFormData | set role bindings form data
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RBACManagementApi.SetRoleBinding(context.Background(), cUUID, userUUID).RoleBindingFormData(roleBindingFormData).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RBACManagementApi.SetRoleBinding``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetRoleBinding`: []RoleBinding
fmt.Fprintf(os.Stdout, "Response from `RBACManagementApi.SetRoleBinding`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
cUUID | string | ||
userUUID | string |
Other parameters are passed through a pointer to a apiSetRoleBindingRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
roleBindingFormData | RoleBindingFormData | set role bindings form data | request | interface{} | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]