1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Zpr
  5. getZprPolicies
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.Zpr.getZprPolicies

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

This data source provides the list of Zpr Policies in Oracle Cloud Infrastructure Zpr service.

Gets a list of ZprPolicies.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testZprPolicies = oci.Zpr.getZprPolicies({
    compartmentId: tenancyOcid,
    name: zprPolicyName,
    state: zprPolicyState,
});
Copy
import pulumi
import pulumi_oci as oci

test_zpr_policies = oci.Zpr.get_zpr_policies(compartment_id=tenancy_ocid,
    name=zpr_policy_name,
    state=zpr_policy_state)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/zpr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zpr.GetZprPolicies(ctx, &zpr.GetZprPoliciesArgs{
			CompartmentId: pulumi.StringRef(tenancyOcid),
			Name:          pulumi.StringRef(zprPolicyName),
			State:         pulumi.StringRef(zprPolicyState),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testZprPolicies = Oci.Zpr.GetZprPolicies.Invoke(new()
    {
        CompartmentId = tenancyOcid,
        Name = zprPolicyName,
        State = zprPolicyState,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Zpr.ZprFunctions;
import com.pulumi.oci.Zpr.inputs.GetZprPoliciesArgs;
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 testZprPolicies = ZprFunctions.getZprPolicies(GetZprPoliciesArgs.builder()
            .compartmentId(tenancyOcid)
            .name(zprPolicyName)
            .state(zprPolicyState)
            .build());

    }
}
Copy
variables:
  testZprPolicies:
    fn::invoke:
      function: oci:Zpr:getZprPolicies
      arguments:
        compartmentId: ${tenancyOcid}
        name: ${zprPolicyName}
        state: ${zprPolicyState}
Copy

Using getZprPolicies

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 getZprPolicies(args: GetZprPoliciesArgs, opts?: InvokeOptions): Promise<GetZprPoliciesResult>
function getZprPoliciesOutput(args: GetZprPoliciesOutputArgs, opts?: InvokeOptions): Output<GetZprPoliciesResult>
Copy
def get_zpr_policies(compartment_id: Optional[str] = None,
                     filters: Optional[Sequence[_zpr.GetZprPoliciesFilter]] = None,
                     name: Optional[str] = None,
                     state: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetZprPoliciesResult
def get_zpr_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_zpr.GetZprPoliciesFilterArgs]]]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     state: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetZprPoliciesResult]
Copy
func GetZprPolicies(ctx *Context, args *GetZprPoliciesArgs, opts ...InvokeOption) (*GetZprPoliciesResult, error)
func GetZprPoliciesOutput(ctx *Context, args *GetZprPoliciesOutputArgs, opts ...InvokeOption) GetZprPoliciesResultOutput
Copy

> Note: This function is named GetZprPolicies in the Go SDK.

public static class GetZprPolicies 
{
    public static Task<GetZprPoliciesResult> InvokeAsync(GetZprPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetZprPoliciesResult> Invoke(GetZprPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetZprPoliciesResult> getZprPolicies(GetZprPoliciesArgs args, InvokeOptions options)
public static Output<GetZprPoliciesResult> getZprPolicies(GetZprPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Zpr/getZprPolicies:getZprPolicies
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId string
The OCID of the compartment in which to list resources.
Filters Changes to this property will trigger replacement. List<GetZprPoliciesFilter>
Name string
A filter to return only resources that match the entire display name given.
State string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
CompartmentId string
The OCID of the compartment in which to list resources.
Filters Changes to this property will trigger replacement. []GetZprPoliciesFilter
Name string
A filter to return only resources that match the entire display name given.
State string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
compartmentId String
The OCID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. List<GetPoliciesFilter>
name String
A filter to return only resources that match the entire display name given.
state String
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
compartmentId string
The OCID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. GetZprPoliciesFilter[]
name string
A filter to return only resources that match the entire display name given.
state string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
compartment_id str
The OCID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. Sequence[zpr.GetZprPoliciesFilter]
name str
A filter to return only resources that match the entire display name given.
state str
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
compartmentId String
The OCID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. List<Property Map>
name String
A filter to return only resources that match the entire display name given.
state String
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.

getZprPolicies Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
ZprPolicies List<GetZprPoliciesZprPolicy>
The list of zpr_policies.
CompartmentId string
The OCID of the compartment.
Filters List<GetZprPoliciesFilter>
Name string
The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy.
State string
The current state of the ZprPolicy.
Id string
The provider-assigned unique ID for this managed resource.
ZprPolicies []GetZprPoliciesZprPolicy
The list of zpr_policies.
CompartmentId string
The OCID of the compartment.
Filters []GetZprPoliciesFilter
Name string
The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy.
State string
The current state of the ZprPolicy.
id String
The provider-assigned unique ID for this managed resource.
zprPolicies List<GetPoliciesPolicy>
The list of zpr_policies.
compartmentId String
The OCID of the compartment.
filters List<GetPoliciesFilter>
name String
The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy.
state String
The current state of the ZprPolicy.
id string
The provider-assigned unique ID for this managed resource.
zprPolicies GetZprPoliciesZprPolicy[]
The list of zpr_policies.
compartmentId string
The OCID of the compartment.
filters GetZprPoliciesFilter[]
name string
The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy.
state string
The current state of the ZprPolicy.
id str
The provider-assigned unique ID for this managed resource.
zpr_policies Sequence[zpr.GetZprPoliciesZprPolicy]
The list of zpr_policies.
compartment_id str
The OCID of the compartment.
filters Sequence[zpr.GetZprPoliciesFilter]
name str
The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy.
state str
The current state of the ZprPolicy.
id String
The provider-assigned unique ID for this managed resource.
zprPolicies List<Property Map>
The list of zpr_policies.
compartmentId String
The OCID of the compartment.
filters List<Property Map>
name String
The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL policies in the tenancy.
state String
The current state of the ZprPolicy.

Supporting Types

GetZprPoliciesFilter

Name This property is required. string
A filter to return only resources that match the entire display name given.
Values This property is required. List<string>
Regex bool
Name This property is required. string
A filter to return only resources that match the entire display name given.
Values This property is required. []string
Regex bool
name This property is required. String
A filter to return only resources that match the entire display name given.
values This property is required. List<String>
regex Boolean
name This property is required. string
A filter to return only resources that match the entire display name given.
values This property is required. string[]
regex boolean
name This property is required. str
A filter to return only resources that match the entire display name given.
values This property is required. Sequence[str]
regex bool
name This property is required. String
A filter to return only resources that match the entire display name given.
values This property is required. List<String>
regex Boolean

GetZprPoliciesZprPolicy

Items This property is required. List<GetZprPoliciesZprPolicyItem>
Items This property is required. []GetZprPoliciesZprPolicyItem
items This property is required. List<GetPoliciesPolicyItem>
items This property is required. GetZprPoliciesZprPolicyItem[]
items This property is required. List<Property Map>

GetZprPoliciesZprPolicyItem

CompartmentId This property is required. string
The OCID of the compartment in which to list resources.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
Description This property is required. string
The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable.
FreeformTags This property is required. Dictionary<string, string>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
LifecycleDetails This property is required. string
A message that describes the current state of the ZprPolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
Name This property is required. string
A filter to return only resources that match the entire display name given.
State This property is required. string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
Statements This property is required. List<string>
An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language.
SystemTags This property is required. Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
The date and time the ZprPolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
TimeUpdated This property is required. string
The date and time the ZprPolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
CompartmentId This property is required. string
The OCID of the compartment in which to list resources.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
Description This property is required. string
The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable.
FreeformTags This property is required. map[string]string
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id This property is required. string
LifecycleDetails This property is required. string
A message that describes the current state of the ZprPolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
Name This property is required. string
A filter to return only resources that match the entire display name given.
State This property is required. string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
Statements This property is required. []string
An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language.
SystemTags This property is required. map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
The date and time the ZprPolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
TimeUpdated This property is required. string
The date and time the ZprPolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. String
The OCID of the compartment in which to list resources.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. String
The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable.
freeformTags This property is required. Map<String,String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
lifecycleDetails This property is required. String
A message that describes the current state of the ZprPolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
name This property is required. String
A filter to return only resources that match the entire display name given.
state This property is required. String
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
statements This property is required. List<String>
An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language.
systemTags This property is required. Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
The date and time the ZprPolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. String
The date and time the ZprPolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. string
The OCID of the compartment in which to list resources.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. string
The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable.
freeformTags This property is required. {[key: string]: string}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. string
lifecycleDetails This property is required. string
A message that describes the current state of the ZprPolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
name This property is required. string
A filter to return only resources that match the entire display name given.
state This property is required. string
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
statements This property is required. string[]
An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language.
systemTags This property is required. {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. string
The date and time the ZprPolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. string
The date and time the ZprPolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartment_id This property is required. str
The OCID of the compartment in which to list resources.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. str
The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable.
freeform_tags This property is required. Mapping[str, str]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. str
lifecycle_details This property is required. str
A message that describes the current state of the ZprPolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
name This property is required. str
A filter to return only resources that match the entire display name given.
state This property is required. str
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
statements This property is required. Sequence[str]
An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language.
system_tags This property is required. Mapping[str, str]
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created This property is required. str
The date and time the ZprPolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
time_updated This property is required. str
The date and time the ZprPolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. String
The OCID of the compartment in which to list resources.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description This property is required. String
The description you assign to the ZprPolicy during creation. Does not have to be unique, and it's changeable.
freeformTags This property is required. Map<String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id This property is required. String
lifecycleDetails This property is required. String
A message that describes the current state of the ZprPolicy in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
name This property is required. String
A filter to return only resources that match the entire display name given.
state This property is required. String
A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
statements This property is required. List<String>
An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero Trust Packet Routing Policy Language.
systemTags This property is required. Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
The date and time the ZprPolicy was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
timeUpdated This property is required. String
The date and time the ZprPolicy was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi