1. Packages
  2. CrowdStrike
  3. API Docs
  4. PreventionPolicyPrecedence
CrowdStrike v0.0.14 published on Monday, May 5, 2025 by CrowdStrike

crowdstrike.PreventionPolicyPrecedence

Explore with Pulumi AI

crowdstrike logo
CrowdStrike v0.0.14 published on Monday, May 5, 2025 by CrowdStrike

    This resource allows you set the precedence of Prevention Policies based on the order of IDs.

    API Scopes

    The following API scopes are required:

    • Prevention policies | Read & Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as crowdstrike from "@crowdstrike/pulumi";
    
    const example = new crowdstrike.PreventionPolicyPrecedence("example", {
        ids: [
            "a1j09y3yq0wnrpb5o6jlij9e4f40k6lq",
            "2asia54xti93bg0jbr5hfpqqbhxbyeoa",
            "xuzq8hs1uyc2s7zdar3fli0shiyl22vc",
        ],
        platformName: "linux",
        enforcement: "dynamic",
    });
    export const preventionPolicyPrecedence = example;
    
    import pulumi
    import crowdstrike_pulumi as crowdstrike
    
    example = crowdstrike.PreventionPolicyPrecedence("example",
        ids=[
            "a1j09y3yq0wnrpb5o6jlij9e4f40k6lq",
            "2asia54xti93bg0jbr5hfpqqbhxbyeoa",
            "xuzq8hs1uyc2s7zdar3fli0shiyl22vc",
        ],
        platform_name="linux",
        enforcement="dynamic")
    pulumi.export("preventionPolicyPrecedence", example)
    
    package main
    
    import (
    	"github.com/crowdstrike/pulumi-crowdstrike/sdk/go/crowdstrike"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := crowdstrike.NewPreventionPolicyPrecedence(ctx, "example", &crowdstrike.PreventionPolicyPrecedenceArgs{
    			Ids: pulumi.StringArray{
    				pulumi.String("a1j09y3yq0wnrpb5o6jlij9e4f40k6lq"),
    				pulumi.String("2asia54xti93bg0jbr5hfpqqbhxbyeoa"),
    				pulumi.String("xuzq8hs1uyc2s7zdar3fli0shiyl22vc"),
    			},
    			PlatformName: pulumi.String("linux"),
    			Enforcement:  pulumi.String("dynamic"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("preventionPolicyPrecedence", example)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Crowdstrike = CrowdStrike.Crowdstrike;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Crowdstrike.PreventionPolicyPrecedence("example", new()
        {
            Ids = new[]
            {
                "a1j09y3yq0wnrpb5o6jlij9e4f40k6lq",
                "2asia54xti93bg0jbr5hfpqqbhxbyeoa",
                "xuzq8hs1uyc2s7zdar3fli0shiyl22vc",
            },
            PlatformName = "linux",
            Enforcement = "dynamic",
        });
    
        return new Dictionary<string, object?>
        {
            ["preventionPolicyPrecedence"] = example,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.crowdstrike.crowdstrike.PreventionPolicyPrecedence;
    import com.crowdstrike.crowdstrike.PreventionPolicyPrecedenceArgs;
    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) {
            var example = new PreventionPolicyPrecedence("example", PreventionPolicyPrecedenceArgs.builder()
                .ids(            
                    "a1j09y3yq0wnrpb5o6jlij9e4f40k6lq",
                    "2asia54xti93bg0jbr5hfpqqbhxbyeoa",
                    "xuzq8hs1uyc2s7zdar3fli0shiyl22vc")
                .platformName("linux")
                .enforcement("dynamic")
                .build());
    
            ctx.export("preventionPolicyPrecedence", example);
        }
    }
    
    resources:
      example:
        type: crowdstrike:PreventionPolicyPrecedence
        properties:
          ids:
            - a1j09y3yq0wnrpb5o6jlij9e4f40k6lq
            - 2asia54xti93bg0jbr5hfpqqbhxbyeoa
            - xuzq8hs1uyc2s7zdar3fli0shiyl22vc
          platformName: linux
          enforcement: dynamic
    outputs:
      preventionPolicyPrecedence: ${example}
    

    Create PreventionPolicyPrecedence Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PreventionPolicyPrecedence(name: string, args: PreventionPolicyPrecedenceArgs, opts?: CustomResourceOptions);
    @overload
    def PreventionPolicyPrecedence(resource_name: str,
                                   args: PreventionPolicyPrecedenceArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def PreventionPolicyPrecedence(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   enforcement: Optional[str] = None,
                                   ids: Optional[Sequence[str]] = None,
                                   platform_name: Optional[str] = None)
    func NewPreventionPolicyPrecedence(ctx *Context, name string, args PreventionPolicyPrecedenceArgs, opts ...ResourceOption) (*PreventionPolicyPrecedence, error)
    public PreventionPolicyPrecedence(string name, PreventionPolicyPrecedenceArgs args, CustomResourceOptions? opts = null)
    public PreventionPolicyPrecedence(String name, PreventionPolicyPrecedenceArgs args)
    public PreventionPolicyPrecedence(String name, PreventionPolicyPrecedenceArgs args, CustomResourceOptions options)
    
    type: crowdstrike:PreventionPolicyPrecedence
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PreventionPolicyPrecedenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PreventionPolicyPrecedenceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PreventionPolicyPrecedenceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PreventionPolicyPrecedenceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PreventionPolicyPrecedenceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var preventionPolicyPrecedenceResource = new Crowdstrike.PreventionPolicyPrecedence("preventionPolicyPrecedenceResource", new()
    {
        Enforcement = "string",
        Ids = new[]
        {
            "string",
        },
        PlatformName = "string",
    });
    
    example, err := crowdstrike.NewPreventionPolicyPrecedence(ctx, "preventionPolicyPrecedenceResource", &crowdstrike.PreventionPolicyPrecedenceArgs{
    	Enforcement: pulumi.String("string"),
    	Ids: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PlatformName: pulumi.String("string"),
    })
    
    var preventionPolicyPrecedenceResource = new PreventionPolicyPrecedence("preventionPolicyPrecedenceResource", PreventionPolicyPrecedenceArgs.builder()
        .enforcement("string")
        .ids("string")
        .platformName("string")
        .build());
    
    prevention_policy_precedence_resource = crowdstrike.PreventionPolicyPrecedence("preventionPolicyPrecedenceResource",
        enforcement="string",
        ids=["string"],
        platform_name="string")
    
    const preventionPolicyPrecedenceResource = new crowdstrike.PreventionPolicyPrecedence("preventionPolicyPrecedenceResource", {
        enforcement: "string",
        ids: ["string"],
        platformName: "string",
    });
    
    type: crowdstrike:PreventionPolicyPrecedence
    properties:
        enforcement: string
        ids:
            - string
        platformName: string
    

    PreventionPolicyPrecedence Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PreventionPolicyPrecedence resource accepts the following input properties:

    Enforcement string
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    Ids List<string>
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    PlatformName string
    That platform of the prevention policies. (Windows, Mac, Linux)
    Enforcement string
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    Ids []string
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    PlatformName string
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement String
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids List<String>
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    platformName String
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement string
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids string[]
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    platformName string
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement str
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids Sequence[str]
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    platform_name str
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement String
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids List<String>
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    platformName String
    That platform of the prevention policies. (Windows, Mac, Linux)

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PreventionPolicyPrecedence resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String

    Look up Existing PreventionPolicyPrecedence Resource

    Get an existing PreventionPolicyPrecedence resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PreventionPolicyPrecedenceState, opts?: CustomResourceOptions): PreventionPolicyPrecedence
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enforcement: Optional[str] = None,
            ids: Optional[Sequence[str]] = None,
            last_updated: Optional[str] = None,
            platform_name: Optional[str] = None) -> PreventionPolicyPrecedence
    func GetPreventionPolicyPrecedence(ctx *Context, name string, id IDInput, state *PreventionPolicyPrecedenceState, opts ...ResourceOption) (*PreventionPolicyPrecedence, error)
    public static PreventionPolicyPrecedence Get(string name, Input<string> id, PreventionPolicyPrecedenceState? state, CustomResourceOptions? opts = null)
    public static PreventionPolicyPrecedence get(String name, Output<String> id, PreventionPolicyPrecedenceState state, CustomResourceOptions options)
    resources:  _:    type: crowdstrike:PreventionPolicyPrecedence    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Enforcement string
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    Ids List<string>
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    LastUpdated string
    PlatformName string
    That platform of the prevention policies. (Windows, Mac, Linux)
    Enforcement string
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    Ids []string
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    LastUpdated string
    PlatformName string
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement String
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids List<String>
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    lastUpdated String
    platformName String
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement string
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids string[]
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    lastUpdated string
    platformName string
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement str
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids Sequence[str]
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    last_updated str
    platform_name str
    That platform of the prevention policies. (Windows, Mac, Linux)
    enforcement String
    The enforcement type for this resource. strict requires all non-default prevention policy ids for platform to be provided. dynamic will ensure the provided policies have precedence over others. When using dynamic, policy ids not included in ids will retain their current ordering after the managed ids.
    ids List<String>
    The policy ids in order. The first ID specified will have the highest precedence and the last ID specified will have the lowest.
    lastUpdated String
    platformName String
    That platform of the prevention policies. (Windows, Mac, Linux)

    Package Details

    Repository
    crowdstrike crowdstrike/pulumi-crowdstrike
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the crowdstrike Terraform Provider.
    crowdstrike logo
    CrowdStrike v0.0.14 published on Monday, May 5, 2025 by CrowdStrike