authentication_policies
Creates, updates, deletes, gets or lists an authentication_policies resource.
Overview​
| Name | authentication_policies |
| Type | Resource |
| Id | oci.identity.authentication_policies |
Fields​
The following fields are returned by SELECT queries:
- get
The authentication policy was found.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | Compartment OCID. |
networkPolicy | object | Network policy, which consists of a list of network source IDs. |
passwordPolicy | object | Password policy, currently set for the given compartment. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | compartmentId, region | 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 /> | |
update | update | compartmentId, region | if-match | Updates 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The OCID of the compartment. |
region | string | OCI 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-match | string | For 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​
- get
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​
- update
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;