1. Packages
  2. Prismacloud Provider
  3. API Docs
  4. getPolicy
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks

prismacloud.getPolicy

Explore with Pulumi AI

prismacloud logo
prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks

    Retrieve information on a specific policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as prismacloud from "@pulumi/prismacloud";
    
    const example = prismacloud.getPolicy({
        name: "My Policy",
    });
    
    import pulumi
    import pulumi_prismacloud as prismacloud
    
    example = prismacloud.get_policy(name="My Policy")
    
    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.LookupPolicy(ctx, &prismacloud.LookupPolicyArgs{
    			Name: pulumi.StringRef("My Policy"),
    		}, 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.GetPolicy.Invoke(new()
        {
            Name = "My Policy",
        });
    
    });
    
    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.GetPolicyArgs;
    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.getPolicy(GetPolicyArgs.builder()
                .name("My Policy")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: prismacloud:getPolicy
          arguments:
            name: My Policy
    

    Using getPolicy

    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 getPolicy(args: GetPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyResult>
    function getPolicyOutput(args: GetPolicyOutputArgs, opts?: InvokeOptions): Output<GetPolicyResult>
    def get_policy(id: Optional[str] = None,
                   name: Optional[str] = None,
                   policy_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetPolicyResult
    def get_policy_output(id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   policy_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetPolicyResult]
    func LookupPolicy(ctx *Context, args *LookupPolicyArgs, opts ...InvokeOption) (*LookupPolicyResult, error)
    func LookupPolicyOutput(ctx *Context, args *LookupPolicyOutputArgs, opts ...InvokeOption) LookupPolicyResultOutput

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

    public static class GetPolicy 
    {
        public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyResult> Invoke(GetPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
    public static Output<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: prismacloud:index/getPolicy:getPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Name string
    Policy name
    PolicyId string
    Policy ID
    Id string
    Name string
    Policy name
    PolicyId string
    Policy ID
    id String
    name String
    Policy name
    policyId String
    Policy ID
    id string
    name string
    Policy name
    policyId string
    Policy ID
    id str
    name str
    Policy name
    policy_id str
    Policy ID
    id String
    name String
    Policy name
    policyId String
    Policy ID

    getPolicy Result

    The following output properties are available:

    CloudType string
    Cloud type
    ComplianceMetadatas List<GetPolicyComplianceMetadata>
    List of compliance data. Each item has compliance standard, requirement, and/or section information, as defined below
    CreatedBy string
    Created by
    CreatedOn double
    (int) Created on
    Deleted bool
    (bool) Deleted
    Description string
    Description
    Enabled bool
    (bool) Enabled
    Id string
    Labels List<string>
    List of labels
    LastModifiedBy string
    Last modified by
    LastModifiedOn double
    (int) Last modified on
    Name string
    Name
    OpenAlertsCount double
    (int) Open alerts count
    Overridden bool
    (bool) Overridden
    Owner string
    Owner
    PolicyCategory string
    Policy category
    PolicyClass string
    Policy class
    PolicyId string
    Policy ID
    PolicyMode string
    Policy mode
    PolicySubtypes List<string>
    Policy subtypes
    PolicyType string
    Policy type
    Recommendation string
    Recommendation.
    Remediable bool
    (bool) Is remediable or not
    Remediations List<GetPolicyRemediation>
    Model for remediation, as defined below
    RestrictAlertDismissal bool
    (bool) Restrict alert dismissal
    RuleLastModifiedOn double
    (int) Rule last modified on
    Rules List<GetPolicyRule>
    Model for the rule, as defined below
    Severity string
    Severity
    SystemDefault bool
    (bool) If policy is a system default policy or not
    CloudType string
    Cloud type
    ComplianceMetadatas []GetPolicyComplianceMetadata
    List of compliance data. Each item has compliance standard, requirement, and/or section information, as defined below
    CreatedBy string
    Created by
    CreatedOn float64
    (int) Created on
    Deleted bool
    (bool) Deleted
    Description string
    Description
    Enabled bool
    (bool) Enabled
    Id string
    Labels []string
    List of labels
    LastModifiedBy string
    Last modified by
    LastModifiedOn float64
    (int) Last modified on
    Name string
    Name
    OpenAlertsCount float64
    (int) Open alerts count
    Overridden bool
    (bool) Overridden
    Owner string
    Owner
    PolicyCategory string
    Policy category
    PolicyClass string
    Policy class
    PolicyId string
    Policy ID
    PolicyMode string
    Policy mode
    PolicySubtypes []string
    Policy subtypes
    PolicyType string
    Policy type
    Recommendation string
    Recommendation.
    Remediable bool
    (bool) Is remediable or not
    Remediations []GetPolicyRemediation
    Model for remediation, as defined below
    RestrictAlertDismissal bool
    (bool) Restrict alert dismissal
    RuleLastModifiedOn float64
    (int) Rule last modified on
    Rules []GetPolicyRule
    Model for the rule, as defined below
    Severity string
    Severity
    SystemDefault bool
    (bool) If policy is a system default policy or not
    cloudType String
    Cloud type
    complianceMetadatas List<GetPolicyComplianceMetadata>
    List of compliance data. Each item has compliance standard, requirement, and/or section information, as defined below
    createdBy String
    Created by
    createdOn Double
    (int) Created on
    deleted Boolean
    (bool) Deleted
    description String
    Description
    enabled Boolean
    (bool) Enabled
    id String
    labels List<String>
    List of labels
    lastModifiedBy String
    Last modified by
    lastModifiedOn Double
    (int) Last modified on
    name String
    Name
    openAlertsCount Double
    (int) Open alerts count
    overridden Boolean
    (bool) Overridden
    owner String
    Owner
    policyCategory String
    Policy category
    policyClass String
    Policy class
    policyId String
    Policy ID
    policyMode String
    Policy mode
    policySubtypes List<String>
    Policy subtypes
    policyType String
    Policy type
    recommendation String
    Recommendation.
    remediable Boolean
    (bool) Is remediable or not
    remediations List<GetPolicyRemediation>
    Model for remediation, as defined below
    restrictAlertDismissal Boolean
    (bool) Restrict alert dismissal
    ruleLastModifiedOn Double
    (int) Rule last modified on
    rules List<GetPolicyRule>
    Model for the rule, as defined below
    severity String
    Severity
    systemDefault Boolean
    (bool) If policy is a system default policy or not
    cloudType string
    Cloud type
    complianceMetadatas GetPolicyComplianceMetadata[]
    List of compliance data. Each item has compliance standard, requirement, and/or section information, as defined below
    createdBy string
    Created by
    createdOn number
    (int) Created on
    deleted boolean
    (bool) Deleted
    description string
    Description
    enabled boolean
    (bool) Enabled
    id string
    labels string[]
    List of labels
    lastModifiedBy string
    Last modified by
    lastModifiedOn number
    (int) Last modified on
    name string
    Name
    openAlertsCount number
    (int) Open alerts count
    overridden boolean
    (bool) Overridden
    owner string
    Owner
    policyCategory string
    Policy category
    policyClass string
    Policy class
    policyId string
    Policy ID
    policyMode string
    Policy mode
    policySubtypes string[]
    Policy subtypes
    policyType string
    Policy type
    recommendation string
    Recommendation.
    remediable boolean
    (bool) Is remediable or not
    remediations GetPolicyRemediation[]
    Model for remediation, as defined below
    restrictAlertDismissal boolean
    (bool) Restrict alert dismissal
    ruleLastModifiedOn number
    (int) Rule last modified on
    rules GetPolicyRule[]
    Model for the rule, as defined below
    severity string
    Severity
    systemDefault boolean
    (bool) If policy is a system default policy or not
    cloud_type str
    Cloud type
    compliance_metadatas Sequence[GetPolicyComplianceMetadata]
    List of compliance data. Each item has compliance standard, requirement, and/or section information, as defined below
    created_by str
    Created by
    created_on float
    (int) Created on
    deleted bool
    (bool) Deleted
    description str
    Description
    enabled bool
    (bool) Enabled
    id str
    labels Sequence[str]
    List of labels
    last_modified_by str
    Last modified by
    last_modified_on float
    (int) Last modified on
    name str
    Name
    open_alerts_count float
    (int) Open alerts count
    overridden bool
    (bool) Overridden
    owner str
    Owner
    policy_category str
    Policy category
    policy_class str
    Policy class
    policy_id str
    Policy ID
    policy_mode str
    Policy mode
    policy_subtypes Sequence[str]
    Policy subtypes
    policy_type str
    Policy type
    recommendation str
    Recommendation.
    remediable bool
    (bool) Is remediable or not
    remediations Sequence[GetPolicyRemediation]
    Model for remediation, as defined below
    restrict_alert_dismissal bool
    (bool) Restrict alert dismissal
    rule_last_modified_on float
    (int) Rule last modified on
    rules Sequence[GetPolicyRule]
    Model for the rule, as defined below
    severity str
    Severity
    system_default bool
    (bool) If policy is a system default policy or not
    cloudType String
    Cloud type
    complianceMetadatas List<Property Map>
    List of compliance data. Each item has compliance standard, requirement, and/or section information, as defined below
    createdBy String
    Created by
    createdOn Number
    (int) Created on
    deleted Boolean
    (bool) Deleted
    description String
    Description
    enabled Boolean
    (bool) Enabled
    id String
    labels List<String>
    List of labels
    lastModifiedBy String
    Last modified by
    lastModifiedOn Number
    (int) Last modified on
    name String
    Name
    openAlertsCount Number
    (int) Open alerts count
    overridden Boolean
    (bool) Overridden
    owner String
    Owner
    policyCategory String
    Policy category
    policyClass String
    Policy class
    policyId String
    Policy ID
    policyMode String
    Policy mode
    policySubtypes List<String>
    Policy subtypes
    policyType String
    Policy type
    recommendation String
    Recommendation.
    remediable Boolean
    (bool) Is remediable or not
    remediations List<Property Map>
    Model for remediation, as defined below
    restrictAlertDismissal Boolean
    (bool) Restrict alert dismissal
    ruleLastModifiedOn Number
    (int) Rule last modified on
    rules List<Property Map>
    Model for the rule, as defined below
    severity String
    Severity
    systemDefault Boolean
    (bool) If policy is a system default policy or not

    Supporting Types

    GetPolicyComplianceMetadata

    ComplianceId string
    Compliance Section UUID
    CustomAssigned bool
    (bool) Custom assigned
    PolicyId string
    Policy ID
    RequirementDescription string
    Requirement description
    RequirementId string
    Requirement ID
    RequirementName string
    Requirement name
    SectionDescription string
    Section description
    SectionId string
    Section ID
    SectionLabel string
    Section label
    StandardDescription string
    Compliance standard description
    StandardName string
    Compliance standard name
    ComplianceId string
    Compliance Section UUID
    CustomAssigned bool
    (bool) Custom assigned
    PolicyId string
    Policy ID
    RequirementDescription string
    Requirement description
    RequirementId string
    Requirement ID
    RequirementName string
    Requirement name
    SectionDescription string
    Section description
    SectionId string
    Section ID
    SectionLabel string
    Section label
    StandardDescription string
    Compliance standard description
    StandardName string
    Compliance standard name
    complianceId String
    Compliance Section UUID
    customAssigned Boolean
    (bool) Custom assigned
    policyId String
    Policy ID
    requirementDescription String
    Requirement description
    requirementId String
    Requirement ID
    requirementName String
    Requirement name
    sectionDescription String
    Section description
    sectionId String
    Section ID
    sectionLabel String
    Section label
    standardDescription String
    Compliance standard description
    standardName String
    Compliance standard name
    complianceId string
    Compliance Section UUID
    customAssigned boolean
    (bool) Custom assigned
    policyId string
    Policy ID
    requirementDescription string
    Requirement description
    requirementId string
    Requirement ID
    requirementName string
    Requirement name
    sectionDescription string
    Section description
    sectionId string
    Section ID
    sectionLabel string
    Section label
    standardDescription string
    Compliance standard description
    standardName string
    Compliance standard name
    compliance_id str
    Compliance Section UUID
    custom_assigned bool
    (bool) Custom assigned
    policy_id str
    Policy ID
    requirement_description str
    Requirement description
    requirement_id str
    Requirement ID
    requirement_name str
    Requirement name
    section_description str
    Section description
    section_id str
    Section ID
    section_label str
    Section label
    standard_description str
    Compliance standard description
    standard_name str
    Compliance standard name
    complianceId String
    Compliance Section UUID
    customAssigned Boolean
    (bool) Custom assigned
    policyId String
    Policy ID
    requirementDescription String
    Requirement description
    requirementId String
    Requirement ID
    requirementName String
    Requirement name
    sectionDescription String
    Section description
    sectionId String
    Section ID
    sectionLabel String
    Section label
    standardDescription String
    Compliance standard description
    standardName String
    Compliance standard name

    GetPolicyRemediation

    Actions List<GetPolicyRemediationAction>
    List of actions, as defined below
    CliScriptJsonSchemaString string
    CLI script JSON schema
    CliScriptTemplate string
    CLI script template
    Description string
    Description
    TemplateType string
    Template type
    Actions []GetPolicyRemediationAction
    List of actions, as defined below
    CliScriptJsonSchemaString string
    CLI script JSON schema
    CliScriptTemplate string
    CLI script template
    Description string
    Description
    TemplateType string
    Template type
    actions List<GetPolicyRemediationAction>
    List of actions, as defined below
    cliScriptJsonSchemaString String
    CLI script JSON schema
    cliScriptTemplate String
    CLI script template
    description String
    Description
    templateType String
    Template type
    actions GetPolicyRemediationAction[]
    List of actions, as defined below
    cliScriptJsonSchemaString string
    CLI script JSON schema
    cliScriptTemplate string
    CLI script template
    description string
    Description
    templateType string
    Template type
    actions Sequence[GetPolicyRemediationAction]
    List of actions, as defined below
    cli_script_json_schema_string str
    CLI script JSON schema
    cli_script_template str
    CLI script template
    description str
    Description
    template_type str
    Template type
    actions List<Property Map>
    List of actions, as defined below
    cliScriptJsonSchemaString String
    CLI script JSON schema
    cliScriptTemplate String
    CLI script template
    description String
    Description
    templateType String
    Template type

    GetPolicyRemediationAction

    Operation string
    Operation
    Payload string
    Payload
    Operation string
    Operation
    Payload string
    Payload
    operation String
    Operation
    payload String
    Payload
    operation string
    Operation
    payload string
    Payload
    operation str
    Operation
    payload str
    Payload
    operation String
    Operation
    payload String
    Payload

    GetPolicyRule

    ApiName string
    API name
    Childrens List<GetPolicyRuleChildren>
    Children description for build policy, as defined below
    CloudAccount string
    Cloud account
    CloudType string
    Cloud type
    Criteria string
    Criteria for build policy.
    DataCriterias List<GetPolicyRuleDataCriteria>
    Criteria for DLP Rule, as defined below
    Name string
    Policy name
    Parameters Dictionary<string, string>
    (map of strings) Parameters
    ResourceIdPath string
    Resource ID path
    ResourceType string
    Resource type
    RuleType string
    Type of rule or RQL query
    ApiName string
    API name
    Childrens []GetPolicyRuleChildren
    Children description for build policy, as defined below
    CloudAccount string
    Cloud account
    CloudType string
    Cloud type
    Criteria string
    Criteria for build policy.
    DataCriterias []GetPolicyRuleDataCriteria
    Criteria for DLP Rule, as defined below
    Name string
    Policy name
    Parameters map[string]string
    (map of strings) Parameters
    ResourceIdPath string
    Resource ID path
    ResourceType string
    Resource type
    RuleType string
    Type of rule or RQL query
    apiName String
    API name
    childrens List<GetPolicyRuleChildren>
    Children description for build policy, as defined below
    cloudAccount String
    Cloud account
    cloudType String
    Cloud type
    criteria String
    Criteria for build policy.
    dataCriterias List<GetPolicyRuleDataCriteria>
    Criteria for DLP Rule, as defined below
    name String
    Policy name
    parameters Map<String,String>
    (map of strings) Parameters
    resourceIdPath String
    Resource ID path
    resourceType String
    Resource type
    ruleType String
    Type of rule or RQL query
    apiName string
    API name
    childrens GetPolicyRuleChildren[]
    Children description for build policy, as defined below
    cloudAccount string
    Cloud account
    cloudType string
    Cloud type
    criteria string
    Criteria for build policy.
    dataCriterias GetPolicyRuleDataCriteria[]
    Criteria for DLP Rule, as defined below
    name string
    Policy name
    parameters {[key: string]: string}
    (map of strings) Parameters
    resourceIdPath string
    Resource ID path
    resourceType string
    Resource type
    ruleType string
    Type of rule or RQL query
    api_name str
    API name
    childrens Sequence[GetPolicyRuleChildren]
    Children description for build policy, as defined below
    cloud_account str
    Cloud account
    cloud_type str
    Cloud type
    criteria str
    Criteria for build policy.
    data_criterias Sequence[GetPolicyRuleDataCriteria]
    Criteria for DLP Rule, as defined below
    name str
    Policy name
    parameters Mapping[str, str]
    (map of strings) Parameters
    resource_id_path str
    Resource ID path
    resource_type str
    Resource type
    rule_type str
    Type of rule or RQL query
    apiName String
    API name
    childrens List<Property Map>
    Children description for build policy, as defined below
    cloudAccount String
    Cloud account
    cloudType String
    Cloud type
    criteria String
    Criteria for build policy.
    dataCriterias List<Property Map>
    Criteria for DLP Rule, as defined below
    name String
    Policy name
    parameters Map<String>
    (map of strings) Parameters
    resourceIdPath String
    Resource ID path
    resourceType String
    Resource type
    ruleType String
    Type of rule or RQL query

    GetPolicyRuleChildren

    Criteria string
    Criteria for build policy.
    Metadata Dictionary<string, string>
    YAML string for code build policy.
    Recommendation string
    Recommendation.
    Type string
    Type of policy.
    Criteria string
    Criteria for build policy.
    Metadata map[string]string
    YAML string for code build policy.
    Recommendation string
    Recommendation.
    Type string
    Type of policy.
    criteria String
    Criteria for build policy.
    metadata Map<String,String>
    YAML string for code build policy.
    recommendation String
    Recommendation.
    type String
    Type of policy.
    criteria string
    Criteria for build policy.
    metadata {[key: string]: string}
    YAML string for code build policy.
    recommendation string
    Recommendation.
    type string
    Type of policy.
    criteria str
    Criteria for build policy.
    metadata Mapping[str, str]
    YAML string for code build policy.
    recommendation str
    Recommendation.
    type str
    Type of policy.
    criteria String
    Criteria for build policy.
    metadata Map<String>
    YAML string for code build policy.
    recommendation String
    Recommendation.
    type String
    Type of policy.

    GetPolicyRuleDataCriteria

    ClassificationResult string
    Data Profile name required for DLP rule criteria
    Exposure string
    File exposure
    Extensions List<string>
    List of file extensions
    ClassificationResult string
    Data Profile name required for DLP rule criteria
    Exposure string
    File exposure
    Extensions []string
    List of file extensions
    classificationResult String
    Data Profile name required for DLP rule criteria
    exposure String
    File exposure
    extensions List<String>
    List of file extensions
    classificationResult string
    Data Profile name required for DLP rule criteria
    exposure string
    File exposure
    extensions string[]
    List of file extensions
    classification_result str
    Data Profile name required for DLP rule criteria
    exposure str
    File exposure
    extensions Sequence[str]
    List of file extensions
    classificationResult String
    Data Profile name required for DLP rule criteria
    exposure String
    File exposure
    extensions List<String>
    List of file extensions

    Package Details

    Repository
    prismacloud paloaltonetworks/terraform-provider-prismacloud
    License
    Notes
    This Pulumi package is based on the prismacloud Terraform Provider.
    prismacloud logo
    prismacloud 1.7.0 published on Monday, Apr 14, 2025 by paloaltonetworks