All URIs are relative to https://api.pure1.purestorage.com/fusion/api/1.2
| Method | HTTP request | Description |
|---|---|---|
| get_role | GET /roles/{role_name} | Gets a specific Role. |
| get_role_by_id | GET /resources/roles/{role_id} | Gets a specific Role. |
| list_roles | GET /roles | Gets a list of all Roles. |
Role get_role(role_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
Gets a specific Role.
from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = fusion.RolesApi(fusion.ApiClient(configuration))
role_name = 'role_name_example' # str | The Role name
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)
try:
# Gets a specific Role.
api_response = api_instance.get_role(role_name, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->get_role: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| role_name | str | The Role name | |
| x_request_id | str | The Request ID supplied with the request, used to perform operations idempotently. | [optional] |
| authorization | str | Access token (in JWT format) required to use any API endpoint. | [optional] |
| x_correlation_id | str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Role get_role_by_id(role_id, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
Gets a specific Role.
from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = fusion.RolesApi(fusion.ApiClient(configuration))
role_id = 'role_id_example' # str | The Role ID
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)
try:
# Gets a specific Role.
api_response = api_instance.get_role_by_id(role_id, x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->get_role_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| role_id | str | The Role ID | |
| x_request_id | str | The Request ID supplied with the request, used to perform operations idempotently. | [optional] |
| authorization | str | Access token (in JWT format) required to use any API endpoint. | [optional] |
| x_correlation_id | str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Role] list_roles(x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id, assignable_scope=assignable_scope)
Gets a list of all Roles.
from __future__ import print_function
import time
import fusion
from fusion.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth
configuration = fusion.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = fusion.RolesApi(fusion.ApiClient(configuration))
x_request_id = 'x_request_id_example' # str | The Request ID supplied with the request, used to perform operations idempotently. (optional)
authorization = 'authorization_example' # str | Access token (in JWT format) required to use any API endpoint. (optional)
x_correlation_id = 'x_correlation_id_example' # str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. (optional)
assignable_scope = 'assignable_scope_example' # str | (optional)
try:
# Gets a list of all Roles.
api_response = api_instance.list_roles(x_request_id=x_request_id, authorization=authorization, x_correlation_id=x_correlation_id, assignable_scope=assignable_scope)
pprint(api_response)
except ApiException as e:
print("Exception when calling RolesApi->list_roles: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_request_id | str | The Request ID supplied with the request, used to perform operations idempotently. | [optional] |
| authorization | str | Access token (in JWT format) required to use any API endpoint. | [optional] |
| x_correlation_id | str | The Correlation ID provided will be added to log messages and can be used for support. The same Correlation ID may be used for separate requests, to track a higher level workflow. | [optional] |
| assignable_scope | str | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]