Skip to main content

authentication_policies

Creates, updates, deletes, gets or lists an authentication_policies resource.

Overview​

Nameauthentication_policies
TypeResource
Idoci.identity.authentication_policies

Fields​

The following fields are returned by SELECT queries:

The authentication policy was found.

NameDatatypeDescription
compartmentIdstringCompartment OCID.
networkPolicyobjectNetwork policy, which consists of a list of network source IDs.
passwordPolicyobjectPassword policy, currently set for the given compartment.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcompartmentId, regionGets the authentication policy for the given tenancy. You must specify your tenant's OCID as the value for<br />the compartment ID (remember that the tenancy is simply the root compartment).<br />
updateupdatecompartmentId, regionif-matchUpdates authentication policy for the specified tenancy.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
compartmentIdstringThe OCID of the compartment.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

SELECT examples​

Gets the authentication policy for the given tenancy. You must specify your tenant's OCID as the value for<br />the compartment ID (remember that the tenancy is simply the root compartment).<br />

SELECT
compartmentId,
networkPolicy,
passwordPolicy
FROM oci.identity.authentication_policies
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples​

Updates authentication policy for the specified tenancy.<br />

UPDATE oci.identity.authentication_policies
SET
networkPolicy = '{{ networkPolicy }}',
passwordPolicy = '{{ passwordPolicy }}'
WHERE
compartmentId = '{{ compartmentId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
compartmentId,
networkPolicy,
passwordPolicy;