Package com.okta.sdk.resource.api
Class PolicyApi
java.lang.Object
com.okta.sdk.resource.api.PolicyApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-03-29T16:47:02.065887-05:00[America/Chicago]",
comments="Generator version: 7.4.0")
public class PolicyApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activatePolicy
(String policyId) Activate a Policy Activates a policyvoid
activatePolicy
(String policyId, Map<String, String> additionalHeaders) Activate a Policy Activates a policyvoid
activatePolicyRule
(String policyId, String ruleId) Activate a Policy Rule Activates a Policy Rule identified by `policyId` and `ruleId`void
Activate a Policy Rule Activates a Policy Rule identified by `policyId` and `ruleId`clonePolicy
(String policyId) Clone an existing Policy Clones an existing policyclonePolicy
(String policyId, Map<String, String> additionalHeaders) Clone an existing Policy Clones an existing policycreatePolicy
(Policy policy, Boolean activate) Create a Policy Creates a policyCreate a Policy Creates a policycreatePolicyRule
(String policyId, PolicyRule policyRule) Create a Policy Rule Creates a policy rulecreatePolicyRule
(String policyId, PolicyRule policyRule, Map<String, String> additionalHeaders) Create a Policy Rule Creates a policy rulecreatePolicySimulation
(List<SimulatePolicyBody> simulatePolicy, String expand) Create a Policy Simulation Creates a policy or policy rule simulation.createPolicySimulation
(List<SimulatePolicyBody> simulatePolicy, String expand, Map<String, String> additionalHeaders) Create a Policy Simulation Creates a policy or policy rule simulation.void
deactivatePolicy
(String policyId) Deactivate a Policy Deactivates a policyvoid
deactivatePolicy
(String policyId, Map<String, String> additionalHeaders) Deactivate a Policy Deactivates a policyvoid
deactivatePolicyRule
(String policyId, String ruleId) Deactivate a Policy Rule Deactivates a Policy Rule identified by `policyId` and `ruleId`void
Deactivate a Policy Rule Deactivates a Policy Rule identified by `policyId` and `ruleId`void
deletePolicy
(String policyId) Delete a Policy Deletes a policyvoid
deletePolicy
(String policyId, Map<String, String> additionalHeaders) Delete a Policy Deletes a policyvoid
deletePolicyResourceMapping
(String policyId, String mappingId) Delete a policy resource Mapping Deletes the resource Mapping for a Policy identified by `policyId` and `mappingId`void
deletePolicyResourceMapping
(String policyId, String mappingId, Map<String, String> additionalHeaders) Delete a policy resource Mapping Deletes the resource Mapping for a Policy identified by `policyId` and `mappingId`void
deletePolicyRule
(String policyId, String ruleId) Delete a Policy Rule Deletes a Policy Rule identified by `policyId` and `ruleId`void
Delete a Policy Rule Deletes a Policy Rule identified by `policyId` and `ruleId`protected static com.fasterxml.jackson.databind.ObjectMapper
Retrieve a Policy Retrieves a policyRetrieve a Policy Retrieves a policygetPolicyMapping
(String policyId, String mappingId) Retrieve a policy resource Mapping Retrieves a resource Mapping for a Policy identified by `policyId` and `mappingId`Retrieve a policy resource Mapping Retrieves a resource Mapping for a Policy identified by `policyId` and `mappingId`getPolicyRule
(String policyId, String ruleId) Retrieve a Policy Rule Retrieves a policy ruleRetrieve a Policy Rule Retrieves a policy rulelistPolicies
(String type, String status, String expand) List all Policies Lists all policies with the specified typeList all Policies Lists all policies with the specified typelistPolicyApps
(String policyId) Deprecated.listPolicyApps
(String policyId, Map<String, String> additionalHeaders) Deprecated.listPolicyMappings
(String policyId) List all resources mapped to a Policy Lists all resources mapped to a Policy identified by `policyId`listPolicyMappings
(String policyId, Map<String, String> additionalHeaders) List all resources mapped to a Policy Lists all resources mapped to a Policy identified by `policyId`listPolicyRules
(String policyId) List all Policy Rules Lists all policy ruleslistPolicyRules
(String policyId, Map<String, String> additionalHeaders) List all Policy Rules Lists all policy rulesmapResourceToPolicy
(String policyId, PolicyMappingRequest policyMappingRequest) Map a resource to a Policy Maps a resource to a Policy identified by `policyId`mapResourceToPolicy
(String policyId, PolicyMappingRequest policyMappingRequest, Map<String, String> additionalHeaders) Map a resource to a Policy Maps a resource to a Policy identified by `policyId`replacePolicy
(String policyId, Policy policy) Replace a Policy Replaces the properties of a Policy identified by `policyId`Replace a Policy Replaces the properties of a Policy identified by `policyId`replacePolicyRule
(String policyId, String ruleId, PolicyRule policyRule) Replace a Policy Rule Replaces the properties for a Policy Rule identified by `policyId` and `ruleId`replacePolicyRule
(String policyId, String ruleId, PolicyRule policyRule, Map<String, String> additionalHeaders) Replace a Policy Rule Replaces the properties for a Policy Rule identified by `policyId` and `ruleId`void
setApiClient
(ApiClient apiClient)
-
Constructor Details
-
PolicyApi
public PolicyApi() -
PolicyApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activatePolicy
Activate a Policy Activates a policy- Parameters:
policyId
- `id` of the Policy (required)- Throws:
ApiException
- if fails to make API call
-
activatePolicy
public void activatePolicy(String policyId, Map<String, String> additionalHeaders) throws ApiExceptionActivate a Policy Activates a policy- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
activatePolicyRule
Activate a Policy Rule Activates a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)- Throws:
ApiException
- if fails to make API call
-
activatePolicyRule
public void activatePolicyRule(String policyId, String ruleId, Map<String, String> additionalHeaders) throws ApiExceptionActivate a Policy Rule Activates a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
clonePolicy
Clone an existing Policy Clones an existing policy- Parameters:
policyId
- `id` of the Policy (required)- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
clonePolicy
public Policy clonePolicy(String policyId, Map<String, String> additionalHeaders) throws ApiExceptionClone an existing Policy Clones an existing policy- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
createPolicy
Create a Policy Creates a policy- Parameters:
policy
- (required)activate
- (optional, default to true)- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
createPolicy
public Policy createPolicy(Policy policy, Boolean activate, Map<String, String> additionalHeaders) throws ApiExceptionCreate a Policy Creates a policy- Parameters:
policy
- (required)activate
- (optional, default to true)additionalHeaders
- additionalHeaders for this call- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
createPolicyRule
Create a Policy Rule Creates a policy rule- Parameters:
policyId
- `id` of the Policy (required)policyRule
- (required)- Returns:
- PolicyRule
- Throws:
ApiException
- if fails to make API call
-
createPolicyRule
public PolicyRule createPolicyRule(String policyId, PolicyRule policyRule, Map<String, String> additionalHeaders) throws ApiExceptionCreate a Policy Rule Creates a policy rule- Parameters:
policyId
- `id` of the Policy (required)policyRule
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- PolicyRule
- Throws:
ApiException
- if fails to make API call
-
createPolicySimulation
public List<SimulatePolicyEvaluations> createPolicySimulation(List<SimulatePolicyBody> simulatePolicy, String expand) throws ApiException Create a Policy Simulation Creates a policy or policy rule simulation. The access simulation evaluates policy and policy rules based on the existing policy rule configuration. The evaluation result simulates what the real-world authentication flow is and what policy rules have been applied or matched to the authentication flow.- Parameters:
simulatePolicy
- (required)expand
- Use `expand=EVALUATED` to include a list of evaluated but not matched policies and policy rules. Use `expand=RULE` to include details about why a rule condition was (not) matched. (optional)- Returns:
- List<SimulatePolicyEvaluations>
- Throws:
ApiException
- if fails to make API call
-
createPolicySimulation
public List<SimulatePolicyEvaluations> createPolicySimulation(List<SimulatePolicyBody> simulatePolicy, String expand, Map<String, String> additionalHeaders) throws ApiExceptionCreate a Policy Simulation Creates a policy or policy rule simulation. The access simulation evaluates policy and policy rules based on the existing policy rule configuration. The evaluation result simulates what the real-world authentication flow is and what policy rules have been applied or matched to the authentication flow.- Parameters:
simulatePolicy
- (required)expand
- Use `expand=EVALUATED` to include a list of evaluated but not matched policies and policy rules. Use `expand=RULE` to include details about why a rule condition was (not) matched. (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- List<SimulatePolicyEvaluations>
- Throws:
ApiException
- if fails to make API call
-
deactivatePolicy
Deactivate a Policy Deactivates a policy- Parameters:
policyId
- `id` of the Policy (required)- Throws:
ApiException
- if fails to make API call
-
deactivatePolicy
public void deactivatePolicy(String policyId, Map<String, String> additionalHeaders) throws ApiExceptionDeactivate a Policy Deactivates a policy- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deactivatePolicyRule
Deactivate a Policy Rule Deactivates a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)- Throws:
ApiException
- if fails to make API call
-
deactivatePolicyRule
public void deactivatePolicyRule(String policyId, String ruleId, Map<String, String> additionalHeaders) throws ApiExceptionDeactivate a Policy Rule Deactivates a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deletePolicy
Delete a Policy Deletes a policy- Parameters:
policyId
- `id` of the Policy (required)- Throws:
ApiException
- if fails to make API call
-
deletePolicy
Delete a Policy Deletes a policy- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deletePolicyResourceMapping
Delete a policy resource Mapping Deletes the resource Mapping for a Policy identified by `policyId` and `mappingId`- Parameters:
policyId
- `id` of the Policy (required)mappingId
- `id` of the policy resource Mapping (required)- Throws:
ApiException
- if fails to make API call
-
deletePolicyResourceMapping
public void deletePolicyResourceMapping(String policyId, String mappingId, Map<String, String> additionalHeaders) throws ApiExceptionDelete a policy resource Mapping Deletes the resource Mapping for a Policy identified by `policyId` and `mappingId`- Parameters:
policyId
- `id` of the Policy (required)mappingId
- `id` of the policy resource Mapping (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deletePolicyRule
Delete a Policy Rule Deletes a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)- Throws:
ApiException
- if fails to make API call
-
deletePolicyRule
public void deletePolicyRule(String policyId, String ruleId, Map<String, String> additionalHeaders) throws ApiExceptionDelete a Policy Rule Deletes a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
getPolicy
Retrieve a Policy Retrieves a policy- Parameters:
policyId
- `id` of the Policy (required)expand
- (optional, default to )- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
getPolicy
public Policy getPolicy(String policyId, String expand, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Policy Retrieves a policy- Parameters:
policyId
- `id` of the Policy (required)expand
- (optional, default to )additionalHeaders
- additionalHeaders for this call- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
getPolicyMapping
Retrieve a policy resource Mapping Retrieves a resource Mapping for a Policy identified by `policyId` and `mappingId`- Parameters:
policyId
- `id` of the Policy (required)mappingId
- `id` of the policy resource Mapping (required)- Returns:
- PolicyMapping
- Throws:
ApiException
- if fails to make API call
-
getPolicyMapping
public PolicyMapping getPolicyMapping(String policyId, String mappingId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a policy resource Mapping Retrieves a resource Mapping for a Policy identified by `policyId` and `mappingId`- Parameters:
policyId
- `id` of the Policy (required)mappingId
- `id` of the policy resource Mapping (required)additionalHeaders
- additionalHeaders for this call- Returns:
- PolicyMapping
- Throws:
ApiException
- if fails to make API call
-
getPolicyRule
Retrieve a Policy Rule Retrieves a policy rule- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)- Returns:
- PolicyRule
- Throws:
ApiException
- if fails to make API call
-
getPolicyRule
public PolicyRule getPolicyRule(String policyId, String ruleId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Policy Rule Retrieves a policy rule- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)additionalHeaders
- additionalHeaders for this call- Returns:
- PolicyRule
- Throws:
ApiException
- if fails to make API call
-
listPolicies
List all Policies Lists all policies with the specified type- Parameters:
type
- (required)status
- (optional)expand
- (optional, default to )- Returns:
- List<Policy>
- Throws:
ApiException
- if fails to make API call
-
listPolicies
public List<Policy> listPolicies(String type, String status, String expand, Map<String, String> additionalHeaders) throws ApiExceptionList all Policies Lists all policies with the specified type- Parameters:
type
- (required)status
- (optional)expand
- (optional, default to )additionalHeaders
- additionalHeaders for this call- Returns:
- List<Policy>
- Throws:
ApiException
- if fails to make API call
-
listPolicyApps
Deprecated.List all Applications mapped to a Policy Lists all applications mapped to a policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)- Returns:
- List<Application>
- Throws:
ApiException
- if fails to make API call
-
listPolicyApps
@Deprecated public List<Application> listPolicyApps(String policyId, Map<String, String> additionalHeaders) throws ApiExceptionDeprecated.List all Applications mapped to a Policy Lists all applications mapped to a policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<Application>
- Throws:
ApiException
- if fails to make API call
-
listPolicyMappings
List all resources mapped to a Policy Lists all resources mapped to a Policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)- Returns:
- List<PolicyMapping>
- Throws:
ApiException
- if fails to make API call
-
listPolicyMappings
public List<PolicyMapping> listPolicyMappings(String policyId, Map<String, String> additionalHeaders) throws ApiExceptionList all resources mapped to a Policy Lists all resources mapped to a Policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<PolicyMapping>
- Throws:
ApiException
- if fails to make API call
-
listPolicyRules
List all Policy Rules Lists all policy rules- Parameters:
policyId
- `id` of the Policy (required)- Returns:
- List<PolicyRule>
- Throws:
ApiException
- if fails to make API call
-
listPolicyRules
public List<PolicyRule> listPolicyRules(String policyId, Map<String, String> additionalHeaders) throws ApiExceptionList all Policy Rules Lists all policy rules- Parameters:
policyId
- `id` of the Policy (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<PolicyRule>
- Throws:
ApiException
- if fails to make API call
-
mapResourceToPolicy
public PolicyMapping mapResourceToPolicy(String policyId, PolicyMappingRequest policyMappingRequest) throws ApiException Map a resource to a Policy Maps a resource to a Policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)policyMappingRequest
- (required)- Returns:
- PolicyMapping
- Throws:
ApiException
- if fails to make API call
-
mapResourceToPolicy
public PolicyMapping mapResourceToPolicy(String policyId, PolicyMappingRequest policyMappingRequest, Map<String, String> additionalHeaders) throws ApiExceptionMap a resource to a Policy Maps a resource to a Policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)policyMappingRequest
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- PolicyMapping
- Throws:
ApiException
- if fails to make API call
-
replacePolicy
Replace a Policy Replaces the properties of a Policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)policy
- (required)- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
replacePolicy
public Policy replacePolicy(String policyId, Policy policy, Map<String, String> additionalHeaders) throws ApiExceptionReplace a Policy Replaces the properties of a Policy identified by `policyId`- Parameters:
policyId
- `id` of the Policy (required)policy
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Policy
- Throws:
ApiException
- if fails to make API call
-
replacePolicyRule
public PolicyRule replacePolicyRule(String policyId, String ruleId, PolicyRule policyRule) throws ApiException Replace a Policy Rule Replaces the properties for a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)policyRule
- (required)- Returns:
- PolicyRule
- Throws:
ApiException
- if fails to make API call
-
replacePolicyRule
public PolicyRule replacePolicyRule(String policyId, String ruleId, PolicyRule policyRule, Map<String, String> additionalHeaders) throws ApiExceptionReplace a Policy Rule Replaces the properties for a Policy Rule identified by `policyId` and `ruleId`- Parameters:
policyId
- `id` of the Policy (required)ruleId
- `id` of the Policy Rule (required)policyRule
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- PolicyRule
- Throws:
ApiException
- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-