Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Identity.getAuthenticationPolicy
Explore with Pulumi AI
This data source provides details about a specific Authentication Policy resource in Oracle Cloud Infrastructure Identity service.
Gets the authentication policy for the given tenancy. You must specify your tenant’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAuthenticationPolicy = oci.Identity.getAuthenticationPolicy({
    compartmentId: tenancyOcid,
});
import pulumi
import pulumi_oci as oci
test_authentication_policy = oci.Identity.get_authentication_policy(compartment_id=tenancy_ocid)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identity.GetAuthenticationPolicy(ctx, &identity.GetAuthenticationPolicyArgs{
			CompartmentId: tenancyOcid,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testAuthenticationPolicy = Oci.Identity.GetAuthenticationPolicy.Invoke(new()
    {
        CompartmentId = tenancyOcid,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.IdentityFunctions;
import com.pulumi.oci.Identity.inputs.GetAuthenticationPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var testAuthenticationPolicy = IdentityFunctions.getAuthenticationPolicy(GetAuthenticationPolicyArgs.builder()
            .compartmentId(tenancyOcid)
            .build());
    }
}
variables:
  testAuthenticationPolicy:
    fn::invoke:
      function: oci:Identity:getAuthenticationPolicy
      arguments:
        compartmentId: ${tenancyOcid}
Using getAuthenticationPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAuthenticationPolicy(args: GetAuthenticationPolicyArgs, opts?: InvokeOptions): Promise<GetAuthenticationPolicyResult>
function getAuthenticationPolicyOutput(args: GetAuthenticationPolicyOutputArgs, opts?: InvokeOptions): Output<GetAuthenticationPolicyResult>def get_authentication_policy(compartment_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetAuthenticationPolicyResult
def get_authentication_policy_output(compartment_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetAuthenticationPolicyResult]func LookupAuthenticationPolicy(ctx *Context, args *LookupAuthenticationPolicyArgs, opts ...InvokeOption) (*LookupAuthenticationPolicyResult, error)
func LookupAuthenticationPolicyOutput(ctx *Context, args *LookupAuthenticationPolicyOutputArgs, opts ...InvokeOption) LookupAuthenticationPolicyResultOutput> Note: This function is named LookupAuthenticationPolicy in the Go SDK.
public static class GetAuthenticationPolicy 
{
    public static Task<GetAuthenticationPolicyResult> InvokeAsync(GetAuthenticationPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetAuthenticationPolicyResult> Invoke(GetAuthenticationPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAuthenticationPolicyResult> getAuthenticationPolicy(GetAuthenticationPolicyArgs args, InvokeOptions options)
public static Output<GetAuthenticationPolicyResult> getAuthenticationPolicy(GetAuthenticationPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Identity/getAuthenticationPolicy:getAuthenticationPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- CompartmentId string
- The OCID of the compartment.
- compartmentId String
- The OCID of the compartment.
- compartmentId string
- The OCID of the compartment.
- compartment_id str
- The OCID of the compartment.
- compartmentId String
- The OCID of the compartment.
getAuthenticationPolicy Result
The following output properties are available:
- CompartmentId string
- Compartment OCID.
- Id string
- NetworkPolicies List<GetAuthentication Policy Network Policy> 
- Network policy, Consists of a list of Network Source ids.
- PasswordPolicies List<GetAuthentication Policy Password Policy> 
- Password policy, currently set for the given compartment.
- CompartmentId string
- Compartment OCID.
- Id string
- NetworkPolicies []GetAuthentication Policy Network Policy 
- Network policy, Consists of a list of Network Source ids.
- PasswordPolicies []GetAuthentication Policy Password Policy 
- Password policy, currently set for the given compartment.
- compartmentId String
- Compartment OCID.
- id String
- networkPolicies List<GetAuthentication Policy Network Policy> 
- Network policy, Consists of a list of Network Source ids.
- passwordPolicies List<GetAuthentication Policy Password Policy> 
- Password policy, currently set for the given compartment.
- compartmentId string
- Compartment OCID.
- id string
- networkPolicies GetAuthentication Policy Network Policy[] 
- Network policy, Consists of a list of Network Source ids.
- passwordPolicies GetAuthentication Policy Password Policy[] 
- Password policy, currently set for the given compartment.
- compartment_id str
- Compartment OCID.
- id str
- network_policies Sequence[GetAuthentication Policy Network Policy] 
- Network policy, Consists of a list of Network Source ids.
- password_policies Sequence[GetAuthentication Policy Password Policy] 
- Password policy, currently set for the given compartment.
- compartmentId String
- Compartment OCID.
- id String
- networkPolicies List<Property Map>
- Network policy, Consists of a list of Network Source ids.
- passwordPolicies List<Property Map>
- Password policy, currently set for the given compartment.
Supporting Types
GetAuthenticationPolicyNetworkPolicy    
- NetworkSource List<string>Ids 
- Network Source ids
- NetworkSource []stringIds 
- Network Source ids
- networkSource List<String>Ids 
- Network Source ids
- networkSource string[]Ids 
- Network Source ids
- network_source_ Sequence[str]ids 
- Network Source ids
- networkSource List<String>Ids 
- Network Source ids
GetAuthenticationPolicyPasswordPolicy    
- IsLowercase boolCharacters Required 
- At least one lower case character required.
- IsNumeric boolCharacters Required 
- At least one numeric character required.
- IsSpecial boolCharacters Required 
- At least one special character required.
- IsUppercase boolCharacters Required 
- At least one uppercase character required.
- IsUsername boolContainment Allowed 
- User name is allowed to be part of the password.
- MinimumPassword intLength 
- Minimum password length required.
- IsLowercase boolCharacters Required 
- At least one lower case character required.
- IsNumeric boolCharacters Required 
- At least one numeric character required.
- IsSpecial boolCharacters Required 
- At least one special character required.
- IsUppercase boolCharacters Required 
- At least one uppercase character required.
- IsUsername boolContainment Allowed 
- User name is allowed to be part of the password.
- MinimumPassword intLength 
- Minimum password length required.
- isLowercase BooleanCharacters Required 
- At least one lower case character required.
- isNumeric BooleanCharacters Required 
- At least one numeric character required.
- isSpecial BooleanCharacters Required 
- At least one special character required.
- isUppercase BooleanCharacters Required 
- At least one uppercase character required.
- isUsername BooleanContainment Allowed 
- User name is allowed to be part of the password.
- minimumPassword IntegerLength 
- Minimum password length required.
- isLowercase booleanCharacters Required 
- At least one lower case character required.
- isNumeric booleanCharacters Required 
- At least one numeric character required.
- isSpecial booleanCharacters Required 
- At least one special character required.
- isUppercase booleanCharacters Required 
- At least one uppercase character required.
- isUsername booleanContainment Allowed 
- User name is allowed to be part of the password.
- minimumPassword numberLength 
- Minimum password length required.
- is_lowercase_ boolcharacters_ required 
- At least one lower case character required.
- is_numeric_ boolcharacters_ required 
- At least one numeric character required.
- is_special_ boolcharacters_ required 
- At least one special character required.
- is_uppercase_ boolcharacters_ required 
- At least one uppercase character required.
- is_username_ boolcontainment_ allowed 
- User name is allowed to be part of the password.
- minimum_password_ intlength 
- Minimum password length required.
- isLowercase BooleanCharacters Required 
- At least one lower case character required.
- isNumeric BooleanCharacters Required 
- At least one numeric character required.
- isSpecial BooleanCharacters Required 
- At least one special character required.
- isUppercase BooleanCharacters Required 
- At least one uppercase character required.
- isUsername BooleanContainment Allowed 
- User name is allowed to be part of the password.
- minimumPassword NumberLength 
- Minimum password length required.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.