All URIs are relative to //api-us.cloudcheckr.com/
Method | HTTP request | Description |
---|---|---|
create_role | POST /policy/v1/customers/{customerId}/roles | Create a new role. |
delete_role | DELETE /policy/v1/customers/{customerId}/roles/{roleId} | Delete a role. |
get_all | GET /policy/v1/customers/{customerId}/roles | Get all roles. |
get_role | GET /policy/v1/customers/{customerId}/roles/{roleId} | Get an individual role. |
list_clients_with_role_id | GET /auth/v1/customers/{customerId}/roles/{roleId}/clients | Get all clients belonging to a role. |
list_users_with_role_id | GET /auth/v1/customers/{customerId}/roles/{roleId}/users | Get all users belonging to a role. |
modify_client_roles | PUT /auth/v1/customers/{customerId}/roles/{roleId}/clients | Add or remove a role from multiple clients. |
modify_user_roles | PUT /auth/v1/customers/{customerId}/roles/{roleId}/users | Add or remove a role from multiple users. |
update_role | PUT /policy/v1/customers/{customerId}/roles/{roleId} | Update a role. |
RoleResponseModel create_role(customer_id, body=body)
Create a new role.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
body = cloudcheckr_cmx_client.CreateRequestRoleRequestModel() # CreateRequestRoleRequestModel | (optional)
try:
# Create a new role.
api_response = api_instance.create_role(customer_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->create_role: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
body | CreateRequestRoleRequestModel | [optional] |
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_role(customer_id, role_id)
Delete a role.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
try:
# Delete a role.
api_instance.delete_role(customer_id, role_id)
except ApiException as e:
print("Exception when calling RolesApi->delete_role: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginationResponseRoleResponseModel get_all(customer_id, role_ids=role_ids, search=search, owned_by=owned_by, action_type=action_type, order_by=order_by, page_size=page_size, pagination_key=pagination_key)
Get all roles.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_ids = ['role_ids_example'] # list[str] | (optional)
search = 'search_example' # str | finds all resources that match the specified value (optional)
owned_by = 'owned_by_example' # str | finds all resources owned by the specified entity. (optional)
action_type = 'action_type_example' # str | determines which action is taken on a resource. (optional)
order_by = 'order_by_example' # str | orders a given property (optional)
page_size = 56 # int | number of items to include in the response (optional)
pagination_key = 'pagination_key_example' # str | key used to fetch the next page of items (optional)
try:
# Get all roles.
api_response = api_instance.get_all(customer_id, role_ids=role_ids, search=search, owned_by=owned_by, action_type=action_type, order_by=order_by, page_size=page_size, pagination_key=pagination_key)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->get_all: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_ids | list[str] | [optional] | |
search | str | finds all resources that match the specified value | [optional] |
owned_by | str | finds all resources owned by the specified entity. | [optional] |
action_type | str | determines which action is taken on a resource. | [optional] |
order_by | str | orders a given property | [optional] |
page_size | int | number of items to include in the response | [optional] |
pagination_key | str | key used to fetch the next page of items | [optional] |
PaginationResponseRoleResponseModel
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RoleResponseModel get_role(customer_id, role_id)
Get an individual role.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
try:
# Get an individual role.
api_response = api_instance.get_role(customer_id, role_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->get_role: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginationWithCountResponseMinimalClientResponseModel list_clients_with_role_id(customer_id, role_id, page_size=page_size, pagination_key=pagination_key, order_by=order_by)
Get all clients belonging to a role.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
page_size = 56 # int | number of items to include in the response (optional)
pagination_key = 'pagination_key_example' # str | key used to fetch the next page of items (optional)
order_by = 'order_by_example' # str | orders a given property (optional)
try:
# Get all clients belonging to a role.
api_response = api_instance.list_clients_with_role_id(customer_id, role_id, page_size=page_size, pagination_key=pagination_key, order_by=order_by)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->list_clients_with_role_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str | ||
page_size | int | number of items to include in the response | [optional] |
pagination_key | str | key used to fetch the next page of items | [optional] |
order_by | str | orders a given property | [optional] |
PaginationWithCountResponseMinimalClientResponseModel
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginationWithCountResponseMinimalUserResponseModel list_users_with_role_id(customer_id, role_id, page_size=page_size, pagination_key=pagination_key, order_by=order_by)
Get all users belonging to a role.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
page_size = 56 # int | number of items to include in the response (optional)
pagination_key = 'pagination_key_example' # str | key used to fetch the next page of items (optional)
order_by = 'order_by_example' # str | orders a given property (optional)
try:
# Get all users belonging to a role.
api_response = api_instance.list_users_with_role_id(customer_id, role_id, page_size=page_size, pagination_key=pagination_key, order_by=order_by)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->list_users_with_role_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str | ||
page_size | int | number of items to include in the response | [optional] |
pagination_key | str | key used to fetch the next page of items | [optional] |
order_by | str | orders a given property | [optional] |
PaginationWithCountResponseMinimalUserResponseModel
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListModificationResponseModel modify_client_roles(customer_id, role_id, body=body)
Add or remove a role from multiple clients.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
body = cloudcheckr_cmx_client.ListModificationRequestModel() # ListModificationRequestModel | (optional)
try:
# Add or remove a role from multiple clients.
api_response = api_instance.modify_client_roles(customer_id, role_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->modify_client_roles: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str | ||
body | ListModificationRequestModel | [optional] |
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListModificationResponseModel modify_user_roles(customer_id, role_id, body=body)
Add or remove a role from multiple users.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
body = cloudcheckr_cmx_client.ListModificationRequestModel() # ListModificationRequestModel | (optional)
try:
# Add or remove a role from multiple users.
api_response = api_instance.modify_user_roles(customer_id, role_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->modify_user_roles: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str | ||
body | ListModificationRequestModel | [optional] |
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RoleResponseModel update_role(customer_id, role_id, body=body)
Update a role.
from __future__ import print_function
import time
import cloudcheckr_cmx_client
from cloudcheckr_cmx_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = cloudcheckr_cmx_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = cloudcheckr_cmx_client.RolesApi(cloudcheckr_cmx_client.ApiClient(configuration))
customer_id = 'customer_id_example' # str |
role_id = 'role_id_example' # str |
body = cloudcheckr_cmx_client.UpdateRequestRoleRequestModel() # UpdateRequestRoleRequestModel | (optional)
try:
# Update a role.
api_response = api_instance.update_role(customer_id, role_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->update_role: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
customer_id | str | ||
role_id | str | ||
body | UpdateRequestRoleRequestModel | [optional] |
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]