mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 20:37:46 +00:00
Update to python SDK docs: 13820107626
This commit is contained in:
@@ -93,7 +93,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.sod_policy import SodPolicy
|
||||
@@ -101,8 +100,9 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
sod_policy = {
|
||||
sod_policy = '''{
|
||||
"conflictingAccessCriteria" : {
|
||||
"leftCriteria" : {
|
||||
"name" : "money-in",
|
||||
@@ -157,18 +157,17 @@ with ApiClient(configuration) as api_client:
|
||||
"id" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
||||
"state" : "ENFORCED",
|
||||
"externalPolicyReference" : "XYZ policy"
|
||||
} # SodPolicy |
|
||||
}''' # SodPolicy |
|
||||
|
||||
try:
|
||||
# Create SOD policy
|
||||
new_sod_policy = SodPolicy()
|
||||
new_sod_policy.from_json(sod_policy)
|
||||
results =SODPoliciesApi(api_client).create_sod_policy(new_sod_policy)
|
||||
new_sod_policy = SodPolicy.from_json(sod_policy)
|
||||
results = SODPoliciesApi(api_client).create_sod_policy(sod_policy=new_sod_policy)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).create_sod_policy(new_sod_policy)
|
||||
print("The response of SODPoliciesApi->create_sod_policy:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->create_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -211,13 +210,13 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the SOD Policy to delete. # str | The ID of the SOD Policy to delete.
|
||||
logical = True # bool | Indicates whether this is a soft delete (logical true) or a hard delete. Soft delete marks the policy as deleted and just save it with this status. It could be fully deleted or recovered further. Hard delete vise versa permanently delete SOD request during this call. (optional) (default to True) # bool | Indicates whether this is a soft delete (logical true) or a hard delete. Soft delete marks the policy as deleted and just save it with this status. It could be fully deleted or recovered further. Hard delete vise versa permanently delete SOD request during this call. (optional) (default to True)
|
||||
@@ -225,10 +224,10 @@ with ApiClient(configuration) as api_client:
|
||||
try:
|
||||
# Delete SOD policy by ID
|
||||
|
||||
SODPoliciesApi(api_client).delete_sod_policy(id, )
|
||||
SODPoliciesApi(api_client).delete_sod_policy(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# SODPoliciesApi(api_client).delete_sod_policy(id, logical)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->delete_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -269,23 +268,23 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the SOD policy the schedule must be deleted for. # str | The ID of the SOD policy the schedule must be deleted for.
|
||||
|
||||
try:
|
||||
# Delete SOD policy schedule
|
||||
|
||||
SODPoliciesApi(api_client).delete_sod_policy_schedule(id)
|
||||
SODPoliciesApi(api_client).delete_sod_policy_schedule(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# SODPoliciesApi(api_client).delete_sod_policy_schedule(id)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->delete_sod_policy_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -327,13 +326,13 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
report_result_id = 'ef38f94347e94562b5bb8424a56397d8' # str | The ID of the report reference to download. # str | The ID of the report reference to download.
|
||||
file_name = 'custom-name' # str | Custom Name for the file. # str | Custom Name for the file.
|
||||
@@ -341,12 +340,12 @@ with ApiClient(configuration) as api_client:
|
||||
try:
|
||||
# Download custom violation report
|
||||
|
||||
results =SODPoliciesApi(api_client).get_custom_violation_report(report_result_id, file_name)
|
||||
results = SODPoliciesApi(api_client).get_custom_violation_report(report_result_id=report_result_id, file_name=file_name)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_custom_violation_report(report_result_id, file_name)
|
||||
print("The response of SODPoliciesApi->get_custom_violation_report:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_custom_violation_report: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -387,25 +386,25 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
report_result_id = 'ef38f94347e94562b5bb8424a56397d8' # str | The ID of the report reference to download. # str | The ID of the report reference to download.
|
||||
|
||||
try:
|
||||
# Download violation report
|
||||
|
||||
results =SODPoliciesApi(api_client).get_default_violation_report(report_result_id)
|
||||
results = SODPoliciesApi(api_client).get_default_violation_report(report_result_id=report_result_id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_default_violation_report(report_result_id)
|
||||
print("The response of SODPoliciesApi->get_default_violation_report:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_default_violation_report: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -442,7 +441,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.report_result_reference import ReportResultReference
|
||||
@@ -450,17 +448,18 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
|
||||
try:
|
||||
# Get multi-report run task status
|
||||
|
||||
results =SODPoliciesApi(api_client).get_sod_all_report_run_status()
|
||||
results = SODPoliciesApi(api_client).get_sod_all_report_run_status()
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_sod_all_report_run_status()
|
||||
print("The response of SODPoliciesApi->get_sod_all_report_run_status:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_sod_all_report_run_status: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -502,7 +501,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.sod_policy import SodPolicy
|
||||
@@ -510,18 +508,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the SOD Policy to retrieve. # str | The ID of the SOD Policy to retrieve.
|
||||
|
||||
try:
|
||||
# Get SOD policy by ID
|
||||
|
||||
results =SODPoliciesApi(api_client).get_sod_policy(id)
|
||||
results = SODPoliciesApi(api_client).get_sod_policy(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_sod_policy(id)
|
||||
print("The response of SODPoliciesApi->get_sod_policy:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -561,7 +560,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.sod_policy_schedule import SodPolicySchedule
|
||||
@@ -569,18 +567,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the SOD policy schedule to retrieve. # str | The ID of the SOD policy schedule to retrieve.
|
||||
|
||||
try:
|
||||
# Get SOD policy schedule
|
||||
|
||||
results =SODPoliciesApi(api_client).get_sod_policy_schedule(id)
|
||||
results = SODPoliciesApi(api_client).get_sod_policy_schedule(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_sod_policy_schedule(id)
|
||||
print("The response of SODPoliciesApi->get_sod_policy_schedule:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_sod_policy_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -621,7 +620,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.report_result_reference import ReportResultReference
|
||||
@@ -629,18 +627,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
report_result_id = '2e8d8180-24bc-4d21-91c6-7affdb473b0d' # str | The ID of the report reference to retrieve. # str | The ID of the report reference to retrieve.
|
||||
|
||||
try:
|
||||
# Get violation report run status
|
||||
|
||||
results =SODPoliciesApi(api_client).get_sod_violation_report_run_status(report_result_id)
|
||||
results = SODPoliciesApi(api_client).get_sod_violation_report_run_status(report_result_id=report_result_id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_sod_violation_report_run_status(report_result_id)
|
||||
print("The response of SODPoliciesApi->get_sod_violation_report_run_status:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_sod_violation_report_run_status: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -681,7 +680,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.report_result_reference import ReportResultReference
|
||||
@@ -689,18 +687,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the violation report to retrieve status for. # str | The ID of the violation report to retrieve status for.
|
||||
|
||||
try:
|
||||
# Get SOD violation report status
|
||||
|
||||
results =SODPoliciesApi(api_client).get_sod_violation_report_status(id)
|
||||
results = SODPoliciesApi(api_client).get_sod_violation_report_status(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).get_sod_violation_report_status(id)
|
||||
print("The response of SODPoliciesApi->get_sod_violation_report_status:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->get_sod_violation_report_status: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -745,7 +744,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.sod_policy import SodPolicy
|
||||
@@ -753,6 +751,7 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
limit = 250 # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
||||
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
||||
@@ -763,12 +762,12 @@ with ApiClient(configuration) as api_client:
|
||||
try:
|
||||
# List SOD policies
|
||||
|
||||
results =SODPoliciesApi(api_client).list_sod_policies()
|
||||
results = SODPoliciesApi(api_client).list_sod_policies()
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).list_sod_policies(limit, offset, count, filters, sorters)
|
||||
print("The response of SODPoliciesApi->list_sod_policies:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->list_sod_policies: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -812,7 +811,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.json_patch_operation import JsonPatchOperation
|
||||
@@ -821,26 +819,20 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = '2c918083-5d19-1a86-015d-28455b4a2329' # str | The ID of the SOD policy being modified. # str | The ID of the SOD policy being modified.
|
||||
[{op=replace, path=/description, value=Modified description}, {op=replace, path=/conflictingAccessCriteria/leftCriteria/name, value=money-in-modified}, {op=replace, path=/conflictingAccessCriteria/rightCriteria, value={name=money-out-modified, criteriaList=[{type=ENTITLEMENT, id=2c918087682f9a86016839c0509c1ab2}]}}] # List[JsonPatchOperation] | A list of SOD Policy update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * ownerRef * externalPolicyReference * compensatingControls * correctionAdvice * state * tags * violationOwnerAssignmentConfig * scheduled * conflictingAccessCriteria
|
||||
json_patch_operation = {
|
||||
"op" : "replace",
|
||||
"path" : "/description",
|
||||
"value" : "New description"
|
||||
} # List[JsonPatchOperation] | A list of SOD Policy update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * ownerRef * externalPolicyReference * compensatingControls * correctionAdvice * state * tags * violationOwnerAssignmentConfig * scheduled * conflictingAccessCriteria
|
||||
|
||||
json_patch_operation = '''[{op=replace, path=/description, value=Modified description}, {op=replace, path=/conflictingAccessCriteria/leftCriteria/name, value=money-in-modified}, {op=replace, path=/conflictingAccessCriteria/rightCriteria, value={name=money-out-modified, criteriaList=[{type=ENTITLEMENT, id=2c918087682f9a86016839c0509c1ab2}]}}]''' # List[JsonPatchOperation] | A list of SOD Policy update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * ownerRef * externalPolicyReference * compensatingControls * correctionAdvice * state * tags * violationOwnerAssignmentConfig * scheduled * conflictingAccessCriteria
|
||||
|
||||
try:
|
||||
# Patch SOD policy by ID
|
||||
new_json_patch_operation = JsonPatchOperation()
|
||||
new_json_patch_operation.from_json(json_patch_operation)
|
||||
results =SODPoliciesApi(api_client).patch_sod_policy(id, new_json_patch_operation)
|
||||
new_json_patch_operation = JsonPatchOperation.from_json(json_patch_operation)
|
||||
results = SODPoliciesApi(api_client).patch_sod_policy(id=id, json_patch_operation=new_json_patch_operation)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).patch_sod_policy(id, new_json_patch_operation)
|
||||
print("The response of SODPoliciesApi->patch_sod_policy:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->patch_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -881,7 +873,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.sod_policy_schedule import SodPolicySchedule
|
||||
@@ -889,9 +880,10 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the SOD policy to update its schedule. # str | The ID of the SOD policy to update its schedule.
|
||||
sod_policy_schedule = {
|
||||
sod_policy_schedule = '''{
|
||||
"schedule" : {
|
||||
"hours" : {
|
||||
"accountMatchConfig" : {
|
||||
@@ -976,18 +968,17 @@ with ApiClient(configuration) as api_client:
|
||||
"modified" : "2020-01-01T00:00:00Z",
|
||||
"description" : "Schedule for policy xyz",
|
||||
"emailEmptyResults" : false
|
||||
} # SodPolicySchedule |
|
||||
}''' # SodPolicySchedule |
|
||||
|
||||
try:
|
||||
# Update SOD Policy schedule
|
||||
new_sod_policy_schedule = SodPolicySchedule()
|
||||
new_sod_policy_schedule.from_json(sod_policy_schedule)
|
||||
results =SODPoliciesApi(api_client).put_policy_schedule(id, new_sod_policy_schedule)
|
||||
new_sod_policy_schedule = SodPolicySchedule.from_json(sod_policy_schedule)
|
||||
results = SODPoliciesApi(api_client).put_policy_schedule(id=id, sod_policy_schedule=new_sod_policy_schedule)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).put_policy_schedule(id, new_sod_policy_schedule)
|
||||
print("The response of SODPoliciesApi->put_policy_schedule:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->put_policy_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -1030,7 +1021,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.sod_policy import SodPolicy
|
||||
@@ -1038,9 +1028,10 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The ID of the SOD policy to update. # str | The ID of the SOD policy to update.
|
||||
sod_policy = {
|
||||
sod_policy = '''{
|
||||
"conflictingAccessCriteria" : {
|
||||
"leftCriteria" : {
|
||||
"name" : "money-in",
|
||||
@@ -1095,18 +1086,17 @@ with ApiClient(configuration) as api_client:
|
||||
"id" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
||||
"state" : "ENFORCED",
|
||||
"externalPolicyReference" : "XYZ policy"
|
||||
} # SodPolicy |
|
||||
}''' # SodPolicy |
|
||||
|
||||
try:
|
||||
# Update SOD policy by ID
|
||||
new_sod_policy = SodPolicy()
|
||||
new_sod_policy.from_json(sod_policy)
|
||||
results =SODPoliciesApi(api_client).put_sod_policy(id, new_sod_policy)
|
||||
new_sod_policy = SodPolicy.from_json(sod_policy)
|
||||
results = SODPoliciesApi(api_client).put_sod_policy(id=id, sod_policy=new_sod_policy)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).put_sod_policy(id, new_sod_policy)
|
||||
print("The response of SODPoliciesApi->put_sod_policy:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->put_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -1146,7 +1136,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.report_result_reference import ReportResultReference
|
||||
@@ -1154,18 +1143,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The SOD policy ID to run. # str | The SOD policy ID to run.
|
||||
|
||||
try:
|
||||
# Evaluate one policy by ID
|
||||
|
||||
results =SODPoliciesApi(api_client).start_evaluate_sod_policy(id)
|
||||
results = SODPoliciesApi(api_client).start_evaluate_sod_policy(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).start_evaluate_sod_policy(id)
|
||||
print("The response of SODPoliciesApi->start_evaluate_sod_policy:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->start_evaluate_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -1205,7 +1195,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.multi_policy_request import MultiPolicyRequest
|
||||
@@ -1214,20 +1203,21 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
multi_policy_request = {
|
||||
multi_policy_request = '''{
|
||||
"filteredPolicyList" : [ "[b868cd40-ffa4-4337-9c07-1a51846cfa94, 63a07a7b-39a4-48aa-956d-50c827deba2a]", "[b868cd40-ffa4-4337-9c07-1a51846cfa94, 63a07a7b-39a4-48aa-956d-50c827deba2a]" ]
|
||||
} # MultiPolicyRequest | (optional)
|
||||
}''' # MultiPolicyRequest | (optional)
|
||||
|
||||
try:
|
||||
# Runs all policies for org
|
||||
|
||||
results =SODPoliciesApi(api_client).start_sod_all_policies_for_org()
|
||||
results = SODPoliciesApi(api_client).start_sod_all_policies_for_org()
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).start_sod_all_policies_for_org(new_multi_policy_request)
|
||||
print("The response of SODPoliciesApi->start_sod_all_policies_for_org:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->start_sod_all_policies_for_org: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -1268,7 +1258,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.api.sod_policies_api import SODPoliciesApi
|
||||
from sailpoint.v2024.api_client import ApiClient
|
||||
from sailpoint.v2024.models.report_result_reference import ReportResultReference
|
||||
@@ -1276,18 +1265,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = 'ef38f943-47e9-4562-b5bb-8424a56397d8' # str | The SOD policy ID to run. # str | The SOD policy ID to run.
|
||||
|
||||
try:
|
||||
# Runs SOD policy violation report
|
||||
|
||||
results =SODPoliciesApi(api_client).start_sod_policy(id)
|
||||
results = SODPoliciesApi(api_client).start_sod_policy(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = SODPoliciesApi(api_client).start_sod_policy(id)
|
||||
print("The response of SODPoliciesApi->start_sod_policy:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling SODPoliciesApi->start_sod_policy: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user