1. Packages
  2. Zscaler Internet Access (ZIA)
  3. API Docs
  4. CasbMalwareRule
pulumi-resource-zia v1.3.3 published on Friday, Feb 27, 2026 by Zscaler
zia logo
pulumi-resource-zia v1.3.3 published on Friday, Feb 27, 2026 by Zscaler

    The zia_casb_malware_rules resource manages CASB (Cloud Access Security Broker) malware rules in the Zscaler Internet Access (ZIA) cloud service. CASB malware rules define malware detection and prevention policies for SaaS applications.

    Example Usage

    CASB Malware Rule

    Example coming soon!

    Example coming soon!

    Example coming soon!

    import * as zia from "@bdzscaler/pulumi-zia";
    
    const example = new zia.CasbMalwareRule("example", {
        name: "Example CASB Malware Rule",
        type: "CASB_MALWARE",
        order: 1,
        state: "ENABLED",
        action: "QUARANTINE",
    });
    
    import zscaler_pulumi_zia as zia
    
    example = zia.CasbMalwareRule("example",
        name="Example CASB Malware Rule",
        type="CASB_MALWARE",
        order=1,
        state="ENABLED",
        action="QUARANTINE",
    )
    
    resources:
      example:
        type: zia:CasbMalwareRule
        properties:
          name: Example CASB Malware Rule
          type: CASB_MALWARE
          order: 1
          state: ENABLED
          action: QUARANTINE
    

    Create CasbMalwareRule Resource

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

    Constructor syntax

    new CasbMalwareRule(name: string, args: CasbMalwareRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CasbMalwareRule(resource_name: str,
                        args: CasbMalwareRuleArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def CasbMalwareRule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        name: Optional[str] = None,
                        type: Optional[str] = None,
                        order: Optional[int] = None,
                        casb_tombstone_template_id: Optional[int] = None,
                        cloud_app_tenant_ids: Optional[Sequence[int]] = None,
                        cloud_app_tenants: Optional[Sequence[int]] = None,
                        description: Optional[str] = None,
                        labels: Optional[Sequence[int]] = None,
                        action: Optional[str] = None,
                        casb_email_label_id: Optional[int] = None,
                        quarantine_location: Optional[str] = None,
                        scan_inbound_email_link: Optional[str] = None,
                        state: Optional[str] = None,
                        buckets: Optional[Sequence[int]] = None)
    func NewCasbMalwareRule(ctx *Context, name string, args CasbMalwareRuleArgs, opts ...ResourceOption) (*CasbMalwareRule, error)
    public CasbMalwareRule(string name, CasbMalwareRuleArgs args, CustomResourceOptions? opts = null)
    public CasbMalwareRule(String name, CasbMalwareRuleArgs args)
    public CasbMalwareRule(String name, CasbMalwareRuleArgs args, CustomResourceOptions options)
    
    type: zia:CasbMalwareRule
    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 CasbMalwareRuleArgs
    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 CasbMalwareRuleArgs
    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 CasbMalwareRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CasbMalwareRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CasbMalwareRuleArgs
    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 casbMalwareRuleResource = new Zia.CasbMalwareRule("casbMalwareRuleResource", new()
    {
        Name = "string",
        Type = "string",
        Order = 0,
        CasbTombstoneTemplateId = 0,
        CloudAppTenantIds = new[]
        {
            0,
        },
        CloudAppTenants = new[]
        {
            0,
        },
        Description = "string",
        Labels = new[]
        {
            0,
        },
        Action = "string",
        CasbEmailLabelId = 0,
        QuarantineLocation = "string",
        ScanInboundEmailLink = "string",
        State = "string",
        Buckets = new[]
        {
            0,
        },
    });
    
    example, err := zia.NewCasbMalwareRule(ctx, "casbMalwareRuleResource", &zia.CasbMalwareRuleArgs{
    	Name:                    pulumi.String("string"),
    	Type:                    pulumi.String("string"),
    	Order:                   pulumi.Int(0),
    	CasbTombstoneTemplateId: pulumi.Int(0),
    	CloudAppTenantIds: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	CloudAppTenants: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	Description: pulumi.String("string"),
    	Labels: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	Action:               pulumi.String("string"),
    	CasbEmailLabelId:     pulumi.Int(0),
    	QuarantineLocation:   pulumi.String("string"),
    	ScanInboundEmailLink: pulumi.String("string"),
    	State:                pulumi.String("string"),
    	Buckets: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    })
    
    var casbMalwareRuleResource = new CasbMalwareRule("casbMalwareRuleResource", CasbMalwareRuleArgs.builder()
        .name("string")
        .type("string")
        .order(0)
        .casbTombstoneTemplateId(0)
        .cloudAppTenantIds(0)
        .cloudAppTenants(0)
        .description("string")
        .labels(0)
        .action("string")
        .casbEmailLabelId(0)
        .quarantineLocation("string")
        .scanInboundEmailLink("string")
        .state("string")
        .buckets(0)
        .build());
    
    casb_malware_rule_resource = zia.CasbMalwareRule("casbMalwareRuleResource",
        name="string",
        type="string",
        order=0,
        casb_tombstone_template_id=0,
        cloud_app_tenant_ids=[0],
        cloud_app_tenants=[0],
        description="string",
        labels=[0],
        action="string",
        casb_email_label_id=0,
        quarantine_location="string",
        scan_inbound_email_link="string",
        state="string",
        buckets=[0])
    
    const casbMalwareRuleResource = new zia.CasbMalwareRule("casbMalwareRuleResource", {
        name: "string",
        type: "string",
        order: 0,
        casbTombstoneTemplateId: 0,
        cloudAppTenantIds: [0],
        cloudAppTenants: [0],
        description: "string",
        labels: [0],
        action: "string",
        casbEmailLabelId: 0,
        quarantineLocation: "string",
        scanInboundEmailLink: "string",
        state: "string",
        buckets: [0],
    });
    
    type: zia:CasbMalwareRule
    properties:
        action: string
        buckets:
            - 0
        casbEmailLabelId: 0
        casbTombstoneTemplateId: 0
        cloudAppTenantIds:
            - 0
        cloudAppTenants:
            - 0
        description: string
        labels:
            - 0
        name: string
        order: 0
        quarantineLocation: string
        scanInboundEmailLink: string
        state: string
        type: string
    

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

    Name string
    The name of the CASB malware rule. Must be unique.
    Order int
    The order of execution of the rule with respect to other CASB malware rules.
    Type string
    The rule type (e.g. CASB_MALWARE).
    Action string
    Action taken when the rule is matched (e.g. QUARANTINE, ALLOW, BLOCK).
    Buckets List<int>
    IDs of buckets.
    CasbEmailLabelId int
    ID of the CASB email label.
    CasbTombstoneTemplateId int
    ID of the CASB tombstone template.
    CloudAppTenantIds List<int>
    IDs of cloud application tenant identifiers.
    CloudAppTenants List<int>
    IDs of cloud application tenants.
    Description string
    Additional information about the CASB malware rule.
    Labels List<int>
    IDs of labels associated with the rule.
    QuarantineLocation string
    Quarantine location for matched malware content.
    ScanInboundEmailLink string
    Whether to scan inbound email links.
    State string
    Rule state. Valid values: ENABLED, DISABLED.
    Name string
    The name of the CASB malware rule. Must be unique.
    Order int
    The order of execution of the rule with respect to other CASB malware rules.
    Type string
    The rule type (e.g. CASB_MALWARE).
    Action string
    Action taken when the rule is matched (e.g. QUARANTINE, ALLOW, BLOCK).
    Buckets []int
    IDs of buckets.
    CasbEmailLabelId int
    ID of the CASB email label.
    CasbTombstoneTemplateId int
    ID of the CASB tombstone template.
    CloudAppTenantIds []int
    IDs of cloud application tenant identifiers.
    CloudAppTenants []int
    IDs of cloud application tenants.
    Description string
    Additional information about the CASB malware rule.
    Labels []int
    IDs of labels associated with the rule.
    QuarantineLocation string
    Quarantine location for matched malware content.
    ScanInboundEmailLink string
    Whether to scan inbound email links.
    State string
    Rule state. Valid values: ENABLED, DISABLED.
    name String
    The name of the CASB malware rule. Must be unique.
    order Integer
    The order of execution of the rule with respect to other CASB malware rules.
    type String
    The rule type (e.g. CASB_MALWARE).
    action String
    Action taken when the rule is matched (e.g. QUARANTINE, ALLOW, BLOCK).
    buckets List<Integer>
    IDs of buckets.
    casbEmailLabelId Integer
    ID of the CASB email label.
    casbTombstoneTemplateId Integer
    ID of the CASB tombstone template.
    cloudAppTenantIds List<Integer>
    IDs of cloud application tenant identifiers.
    cloudAppTenants List<Integer>
    IDs of cloud application tenants.
    description String
    Additional information about the CASB malware rule.
    labels List<Integer>
    IDs of labels associated with the rule.
    quarantineLocation String
    Quarantine location for matched malware content.
    scanInboundEmailLink String
    Whether to scan inbound email links.
    state String
    Rule state. Valid values: ENABLED, DISABLED.
    name string
    The name of the CASB malware rule. Must be unique.
    order number
    The order of execution of the rule with respect to other CASB malware rules.
    type string
    The rule type (e.g. CASB_MALWARE).
    action string
    Action taken when the rule is matched (e.g. QUARANTINE, ALLOW, BLOCK).
    buckets number[]
    IDs of buckets.
    casbEmailLabelId number
    ID of the CASB email label.
    casbTombstoneTemplateId number
    ID of the CASB tombstone template.
    cloudAppTenantIds number[]
    IDs of cloud application tenant identifiers.
    cloudAppTenants number[]
    IDs of cloud application tenants.
    description string
    Additional information about the CASB malware rule.
    labels number[]
    IDs of labels associated with the rule.
    quarantineLocation string
    Quarantine location for matched malware content.
    scanInboundEmailLink string
    Whether to scan inbound email links.
    state string
    Rule state. Valid values: ENABLED, DISABLED.
    name str
    The name of the CASB malware rule. Must be unique.
    order int
    The order of execution of the rule with respect to other CASB malware rules.
    type str
    The rule type (e.g. CASB_MALWARE).
    action str
    Action taken when the rule is matched (e.g. QUARANTINE, ALLOW, BLOCK).
    buckets Sequence[int]
    IDs of buckets.
    casb_email_label_id int
    ID of the CASB email label.
    casb_tombstone_template_id int
    ID of the CASB tombstone template.
    cloud_app_tenant_ids Sequence[int]
    IDs of cloud application tenant identifiers.
    cloud_app_tenants Sequence[int]
    IDs of cloud application tenants.
    description str
    Additional information about the CASB malware rule.
    labels Sequence[int]
    IDs of labels associated with the rule.
    quarantine_location str
    Quarantine location for matched malware content.
    scan_inbound_email_link str
    Whether to scan inbound email links.
    state str
    Rule state. Valid values: ENABLED, DISABLED.
    name String
    The name of the CASB malware rule. Must be unique.
    order Number
    The order of execution of the rule with respect to other CASB malware rules.
    type String
    The rule type (e.g. CASB_MALWARE).
    action String
    Action taken when the rule is matched (e.g. QUARANTINE, ALLOW, BLOCK).
    buckets List<Number>
    IDs of buckets.
    casbEmailLabelId Number
    ID of the CASB email label.
    casbTombstoneTemplateId Number
    ID of the CASB tombstone template.
    cloudAppTenantIds List<Number>
    IDs of cloud application tenant identifiers.
    cloudAppTenants List<Number>
    IDs of cloud application tenants.
    description String
    Additional information about the CASB malware rule.
    labels List<Number>
    IDs of labels associated with the rule.
    quarantineLocation String
    Quarantine location for matched malware content.
    scanInboundEmailLink String
    Whether to scan inbound email links.
    state String
    Rule state. Valid values: ENABLED, DISABLED.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId int
    The system-generated ID of the CASB malware rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId int
    The system-generated ID of the CASB malware rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId Integer
    The system-generated ID of the CASB malware rule.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleId number
    The system-generated ID of the CASB malware rule.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_id int
    The system-generated ID of the CASB malware rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId Number
    The system-generated ID of the CASB malware rule.

    Import

    An existing CASB Malware Rule can be imported using its resource ID, e.g.

    $ pulumi import zia:index:CasbMalwareRule example 12345
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    zia zscaler/pulumi-zia
    License
    zia logo
    pulumi-resource-zia v1.3.3 published on Friday, Feb 27, 2026 by Zscaler
      Meet Neo: Your AI Platform Teammate