prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks
prismacloud.getPolicies
Explore with Pulumi AI
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks
Retrieve a list of policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as prismacloud from "@pulumi/prismacloud";
const example = prismacloud.getPolicies({
    filters: {
        "policy.severity": "high",
        "policy.type": "network",
    },
});
import pulumi
import pulumi_prismacloud as prismacloud
example = prismacloud.get_policies(filters={
    "policy.severity": "high",
    "policy.type": "network",
})
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/prismacloud/prismacloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := prismacloud.GetPolicies(ctx, &prismacloud.GetPoliciesArgs{
			Filters: map[string]interface{}{
				"policy.severity": "high",
				"policy.type":     "network",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Prismacloud = Pulumi.Prismacloud;
return await Deployment.RunAsync(() => 
{
    var example = Prismacloud.GetPolicies.Invoke(new()
    {
        Filters = 
        {
            { "policy.severity", "high" },
            { "policy.type", "network" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prismacloud.PrismacloudFunctions;
import com.pulumi.prismacloud.inputs.GetPoliciesArgs;
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 example = PrismacloudFunctions.getPolicies(GetPoliciesArgs.builder()
            .filters(Map.ofEntries(
                Map.entry("policy.severity", "high"),
                Map.entry("policy.type", "network")
            ))
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: prismacloud:getPolicies
      arguments:
        filters:
          policy.severity: high
          policy.type: network
Using getPolicies
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 getPolicies(args: GetPoliciesArgs, opts?: InvokeOptions): Promise<GetPoliciesResult>
function getPoliciesOutput(args: GetPoliciesOutputArgs, opts?: InvokeOptions): Output<GetPoliciesResult>def get_policies(filters: Optional[Mapping[str, str]] = None,
                 id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
def get_policies_output(filters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]func GetPolicies(ctx *Context, args *GetPoliciesArgs, opts ...InvokeOption) (*GetPoliciesResult, error)
func GetPoliciesOutput(ctx *Context, args *GetPoliciesOutputArgs, opts ...InvokeOption) GetPoliciesResultOutput> Note: This function is named GetPolicies in the Go SDK.
public static class GetPolicies 
{
    public static Task<GetPoliciesResult> InvokeAsync(GetPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetPoliciesResult> Invoke(GetPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
public static Output<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
fn::invoke:
  function: prismacloud:index/getPolicies:getPolicies
  arguments:
    # arguments dictionaryThe following arguments are supported:
getPolicies Result
The following output properties are available:
- Id string
 - Listings
List<Get
Policies Listing>  - List of policies returned, as defined below.
 - Total double
 - (int) Total number of policies.
 - Filters Dictionary<string, string>
 
- Id string
 - Listings
[]Get
Policies Listing  - List of policies returned, as defined below.
 - Total float64
 - (int) Total number of policies.
 - Filters map[string]string
 
- id String
 - listings
List<Get
Policies Listing>  - List of policies returned, as defined below.
 - total Double
 - (int) Total number of policies.
 - filters Map<String,String>
 
- id string
 - listings
Get
Policies Listing[]  - List of policies returned, as defined below.
 - total number
 - (int) Total number of policies.
 - filters {[key: string]: string}
 
- id str
 - listings
Sequence[Get
Policies Listing]  - List of policies returned, as defined below.
 - total float
 - (int) Total number of policies.
 - filters Mapping[str, str]
 
- id String
 - listings List<Property Map>
 - List of policies returned, as defined below.
 - total Number
 - (int) Total number of policies.
 - filters Map<String>
 
Supporting Types
GetPoliciesListing  
- Cloud
Type string - Cloud type
 - Deleted bool
 - (bool) Deleted
 - Description string
 - Description
 - Enabled bool
 - (bool) Enabled
 - Labels List<string>
 - List of labels
 - Name string
 - Policy name
 - Open
Alerts doubleCount  - (int) Open alerts count
 - Overridden bool
 - (bool) Overridden
 - Policy
Id string - Policy ID
 - Policy
Mode string - Policy mode
 - Policy
Subtypes List<string> - Policy subtypes
 - Policy
Type string - Policy type
 - Recommendation string
 - Remediation recommendation
 - Remediable bool
 - (bool) Remediable
 - Severity string
 - Severity
 - System
Default bool - (bool) If the policy is a system default for Prisma Cloud
 
- Cloud
Type string - Cloud type
 - Deleted bool
 - (bool) Deleted
 - Description string
 - Description
 - Enabled bool
 - (bool) Enabled
 - Labels []string
 - List of labels
 - Name string
 - Policy name
 - Open
Alerts float64Count  - (int) Open alerts count
 - Overridden bool
 - (bool) Overridden
 - Policy
Id string - Policy ID
 - Policy
Mode string - Policy mode
 - Policy
Subtypes []string - Policy subtypes
 - Policy
Type string - Policy type
 - Recommendation string
 - Remediation recommendation
 - Remediable bool
 - (bool) Remediable
 - Severity string
 - Severity
 - System
Default bool - (bool) If the policy is a system default for Prisma Cloud
 
- cloud
Type String - Cloud type
 - deleted Boolean
 - (bool) Deleted
 - description String
 - Description
 - enabled Boolean
 - (bool) Enabled
 - labels List<String>
 - List of labels
 - name String
 - Policy name
 - open
Alerts DoubleCount  - (int) Open alerts count
 - overridden Boolean
 - (bool) Overridden
 - policy
Id String - Policy ID
 - policy
Mode String - Policy mode
 - policy
Subtypes List<String> - Policy subtypes
 - policy
Type String - Policy type
 - recommendation String
 - Remediation recommendation
 - remediable Boolean
 - (bool) Remediable
 - severity String
 - Severity
 - system
Default Boolean - (bool) If the policy is a system default for Prisma Cloud
 
- cloud
Type string - Cloud type
 - deleted boolean
 - (bool) Deleted
 - description string
 - Description
 - enabled boolean
 - (bool) Enabled
 - labels string[]
 - List of labels
 - name string
 - Policy name
 - open
Alerts numberCount  - (int) Open alerts count
 - overridden boolean
 - (bool) Overridden
 - policy
Id string - Policy ID
 - policy
Mode string - Policy mode
 - policy
Subtypes string[] - Policy subtypes
 - policy
Type string - Policy type
 - recommendation string
 - Remediation recommendation
 - remediable boolean
 - (bool) Remediable
 - severity string
 - Severity
 - system
Default boolean - (bool) If the policy is a system default for Prisma Cloud
 
- cloud_
type str - Cloud type
 - deleted bool
 - (bool) Deleted
 - description str
 - Description
 - enabled bool
 - (bool) Enabled
 - labels Sequence[str]
 - List of labels
 - name str
 - Policy name
 - open_
alerts_ floatcount  - (int) Open alerts count
 - overridden bool
 - (bool) Overridden
 - policy_
id str - Policy ID
 - policy_
mode str - Policy mode
 - policy_
subtypes Sequence[str] - Policy subtypes
 - policy_
type str - Policy type
 - recommendation str
 - Remediation recommendation
 - remediable bool
 - (bool) Remediable
 - severity str
 - Severity
 - system_
default bool - (bool) If the policy is a system default for Prisma Cloud
 
- cloud
Type String - Cloud type
 - deleted Boolean
 - (bool) Deleted
 - description String
 - Description
 - enabled Boolean
 - (bool) Enabled
 - labels List<String>
 - List of labels
 - name String
 - Policy name
 - open
Alerts NumberCount  - (int) Open alerts count
 - overridden Boolean
 - (bool) Overridden
 - policy
Id String - Policy ID
 - policy
Mode String - Policy mode
 - policy
Subtypes List<String> - Policy subtypes
 - policy
Type String - Policy type
 - recommendation String
 - Remediation recommendation
 - remediable Boolean
 - (bool) Remediable
 - severity String
 - Severity
 - system
Default Boolean - (bool) If the policy is a system default for Prisma Cloud
 
Package Details
- Repository
 - prismacloud paloaltonetworks/terraform-provider-prismacloud
 - License
 - Notes
 - This Pulumi package is based on the 
prismacloudTerraform Provider. 
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks