1. Packages
  2. Packages
  3. Power Platform
  4. API Docs
  5. DlpPolicy
Viewing docs for Power Platform v0.3.3
published on Monday, May 18, 2026 by rpothin
powerplatform logo
Viewing docs for Power Platform v0.3.3
published on Monday, May 18, 2026 by rpothin

    Manages a Power Platform Data Loss Prevention (DLP) policy. DLP policies define rules to control how connectors can share data. Note: Deletion removes all rule sets from the policy, as the SDK does not expose a direct policy delete endpoint.

    Create DlpPolicy Resource

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

    Constructor syntax

    new DlpPolicy(name: string, args: DlpPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def DlpPolicy(resource_name: str,
                  args: DlpPolicyArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def DlpPolicy(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  name: Optional[str] = None,
                  rule_sets: Optional[Sequence[RuleSetArgs]] = None)
    func NewDlpPolicy(ctx *Context, name string, args DlpPolicyArgs, opts ...ResourceOption) (*DlpPolicy, error)
    public DlpPolicy(string name, DlpPolicyArgs args, CustomResourceOptions? opts = null)
    public DlpPolicy(String name, DlpPolicyArgs args)
    public DlpPolicy(String name, DlpPolicyArgs args, CustomResourceOptions options)
    
    type: powerplatform:DlpPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "powerplatform_dlppolicy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DlpPolicyArgs
    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 DlpPolicyArgs
    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 DlpPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DlpPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DlpPolicyArgs
    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 dlpPolicyResource = new Powerplatform.DlpPolicy("dlpPolicyResource", new()
    {
        Name = "string",
        RuleSets = new[]
        {
            new Powerplatform.Inputs.RuleSetArgs
            {
                Id = "string",
                Inputs = 
                {
                    { "string", "any" },
                },
                Version = "string",
            },
        },
    });
    
    example, err := powerplatform.NewDlpPolicy(ctx, "dlpPolicyResource", &powerplatform.DlpPolicyArgs{
    	Name: pulumi.String("string"),
    	RuleSets: powerplatform.RuleSetArray{
    		&powerplatform.RuleSetArgs{
    			Id: pulumi.String("string"),
    			Inputs: pulumi.Map{
    				"string": pulumi.Any("any"),
    			},
    			Version: pulumi.String("string"),
    		},
    	},
    })
    
    resource "powerplatform_dlppolicy" "dlpPolicyResource" {
      name = "string"
      rule_sets {
        id = "string"
        inputs = {
          "string" = "any"
        }
        version = "string"
      }
    }
    
    var dlpPolicyResource = new DlpPolicy("dlpPolicyResource", DlpPolicyArgs.builder()
        .name("string")
        .ruleSets(RuleSetArgs.builder()
            .id("string")
            .inputs(Map.of("string", "any"))
            .version("string")
            .build())
        .build());
    
    dlp_policy_resource = powerplatform.DlpPolicy("dlpPolicyResource",
        name="string",
        rule_sets=[{
            "id": "string",
            "inputs": {
                "string": "any",
            },
            "version": "string",
        }])
    
    const dlpPolicyResource = new powerplatform.DlpPolicy("dlpPolicyResource", {
        name: "string",
        ruleSets: [{
            id: "string",
            inputs: {
                string: "any",
            },
            version: "string",
        }],
    });
    
    type: powerplatform:DlpPolicy
    properties:
        name: string
        ruleSets:
            - id: string
              inputs:
                string: any
              version: string
    

    DlpPolicy 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 DlpPolicy resource accepts the following input properties:

    Name string
    The name of the DLP policy.
    RuleSets List<RuleSet>
    The rule sets that define the DLP policy rules.
    Name string
    The name of the DLP policy.
    RuleSets []RuleSetArgs
    The rule sets that define the DLP policy rules.
    name string
    The name of the DLP policy.
    rule_sets list(object)
    The rule sets that define the DLP policy rules.
    name String
    The name of the DLP policy.
    ruleSets List<RuleSet>
    The rule sets that define the DLP policy rules.
    name string
    The name of the DLP policy.
    ruleSets RuleSet[]
    The rule sets that define the DLP policy rules.
    name str
    The name of the DLP policy.
    rule_sets Sequence[RuleSetArgs]
    The rule sets that define the DLP policy rules.
    name String
    The name of the DLP policy.
    ruleSets List<Property Map>
    The rule sets that define the DLP policy rules.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The timestamp when the policy was last modified.
    RuleSetCount int
    The number of rule sets in the policy.
    TenantId string
    The tenant ID that owns the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The timestamp when the policy was last modified.
    RuleSetCount int
    The number of rule sets in the policy.
    TenantId string
    The tenant ID that owns the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    last_modified string
    The timestamp when the policy was last modified.
    rule_set_count number
    The number of rule sets in the policy.
    tenant_id string
    The tenant ID that owns the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The timestamp when the policy was last modified.
    ruleSetCount Integer
    The number of rule sets in the policy.
    tenantId String
    The tenant ID that owns the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    The timestamp when the policy was last modified.
    ruleSetCount number
    The number of rule sets in the policy.
    tenantId string
    The tenant ID that owns the policy.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified str
    The timestamp when the policy was last modified.
    rule_set_count int
    The number of rule sets in the policy.
    tenant_id str
    The tenant ID that owns the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The timestamp when the policy was last modified.
    ruleSetCount Number
    The number of rule sets in the policy.
    tenantId String
    The tenant ID that owns the policy.

    Supporting Types

    RuleSet, RuleSetArgs

    A rule set for a DLP policy, defining data loss prevention rules.
    Id string
    The unique identifier of the rule set.
    Inputs Dictionary<string, object>
    The inputs for the rule set, which may vary based on the rule.
    Version string
    The version of the rule set.
    Id string
    The unique identifier of the rule set.
    Inputs map[string]interface{}
    The inputs for the rule set, which may vary based on the rule.
    Version string
    The version of the rule set.
    id string
    The unique identifier of the rule set.
    inputs map(any)
    The inputs for the rule set, which may vary based on the rule.
    version string
    The version of the rule set.
    id String
    The unique identifier of the rule set.
    inputs Map<String,Object>
    The inputs for the rule set, which may vary based on the rule.
    version String
    The version of the rule set.
    id string
    The unique identifier of the rule set.
    inputs {[key: string]: any}
    The inputs for the rule set, which may vary based on the rule.
    version string
    The version of the rule set.
    id str
    The unique identifier of the rule set.
    inputs Mapping[str, Any]
    The inputs for the rule set, which may vary based on the rule.
    version str
    The version of the rule set.
    id String
    The unique identifier of the rule set.
    inputs Map<Any>
    The inputs for the rule set, which may vary based on the rule.
    version String
    The version of the rule set.

    Package Details

    Repository
    powerplatform rpothin/pulumi-powerplatform
    License
    MIT
    powerplatform logo
    Viewing docs for Power Platform v0.3.3
    published on Monday, May 18, 2026 by rpothin

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial