1. Packages
  2. Zscaler Internet Access (ZIA)
  3. API Docs
  4. RuleLabels
Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler

zia.RuleLabels

Explore with Pulumi AI

The zia_rule_labels resource allows the creation and management of rule labels in the Zscaler Internet Access cloud or via the API. This resource can then be associated with resources such as: Firewall Rules and URL filtering rules

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as zia from "@bdzscaler/pulumi-zia";

// ZIA Rule Labels Resource
const example = new zia.RuleLabels("example", {description: "Example"});
Copy
import pulumi
import zscaler_pulumi_zia as zia

# ZIA Rule Labels Resource
example = zia.RuleLabels("example", description="Example")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/zscaler/pulumi-zia/sdk/go/zia"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// ZIA Rule Labels Resource
		_, err := zia.NewRuleLabels(ctx, "example", &zia.RuleLabelsArgs{
			Description: pulumi.String("Example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zia = zscaler.PulumiPackage.Zia;

return await Deployment.RunAsync(() => 
{
    // ZIA Rule Labels Resource
    var example = new Zia.RuleLabels("example", new()
    {
        Description = "Example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zia.RuleLabels;
import com.pulumi.zia.RuleLabelsArgs;
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) {
        // ZIA Rule Labels Resource
        var example = new RuleLabels("example", RuleLabelsArgs.builder()
            .description("Example")
            .build());

    }
}
Copy
resources:
  # ZIA Rule Labels Resource
  example:
    type: zia:RuleLabels
    properties:
      description: Example
Copy

Create RuleLabels Resource

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

Constructor syntax

new RuleLabels(name: string, args?: RuleLabelsArgs, opts?: CustomResourceOptions);
@overload
def RuleLabels(resource_name: str,
               args: Optional[RuleLabelsArgs] = None,
               opts: Optional[ResourceOptions] = None)

@overload
def RuleLabels(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               name: Optional[str] = None)
func NewRuleLabels(ctx *Context, name string, args *RuleLabelsArgs, opts ...ResourceOption) (*RuleLabels, error)
public RuleLabels(string name, RuleLabelsArgs? args = null, CustomResourceOptions? opts = null)
public RuleLabels(String name, RuleLabelsArgs args)
public RuleLabels(String name, RuleLabelsArgs args, CustomResourceOptions options)
type: zia:RuleLabels
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args RuleLabelsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args RuleLabelsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args RuleLabelsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args RuleLabelsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RuleLabelsArgs
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 ruleLabelsResource = new Zia.RuleLabels("ruleLabelsResource", new()
{
    Description = "string",
    Name = "string",
});
Copy
example, err := zia.NewRuleLabels(ctx, "ruleLabelsResource", &zia.RuleLabelsArgs{
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
})
Copy
var ruleLabelsResource = new RuleLabels("ruleLabelsResource", RuleLabelsArgs.builder()
    .description("string")
    .name("string")
    .build());
Copy
rule_labels_resource = zia.RuleLabels("ruleLabelsResource",
    description="string",
    name="string")
Copy
const ruleLabelsResource = new zia.RuleLabels("ruleLabelsResource", {
    description: "string",
    name: "string",
});
Copy
type: zia:RuleLabels
properties:
    description: string
    name: string
Copy

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

Description string
Name string
The name of the devices to be created.
Description string
Name string
The name of the devices to be created.
description String
name String
The name of the devices to be created.
description string
name string
The name of the devices to be created.
description str
name str
The name of the devices to be created.
description String
name String
The name of the devices to be created.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
RuleLabelId int
Id string
The provider-assigned unique ID for this managed resource.
RuleLabelId int
id String
The provider-assigned unique ID for this managed resource.
ruleLabelId Integer
id string
The provider-assigned unique ID for this managed resource.
ruleLabelId number
id str
The provider-assigned unique ID for this managed resource.
rule_label_id int
id String
The provider-assigned unique ID for this managed resource.
ruleLabelId Number

Look up Existing RuleLabels Resource

Get an existing RuleLabels 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?: RuleLabelsState, opts?: CustomResourceOptions): RuleLabels
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        rule_label_id: Optional[int] = None) -> RuleLabels
func GetRuleLabels(ctx *Context, name string, id IDInput, state *RuleLabelsState, opts ...ResourceOption) (*RuleLabels, error)
public static RuleLabels Get(string name, Input<string> id, RuleLabelsState? state, CustomResourceOptions? opts = null)
public static RuleLabels get(String name, Output<String> id, RuleLabelsState state, CustomResourceOptions options)
resources:  _:    type: zia:RuleLabels    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
Name string
The name of the devices to be created.
RuleLabelId int
Description string
Name string
The name of the devices to be created.
RuleLabelId int
description String
name String
The name of the devices to be created.
ruleLabelId Integer
description string
name string
The name of the devices to be created.
ruleLabelId number
description str
name str
The name of the devices to be created.
rule_label_id int
description String
name String
The name of the devices to be created.
ruleLabelId Number

Import

Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZIA configurations into Terraform-compliant HashiCorp Configuration Language.

Visit

zia_rule_labels can be imported by using <LABEL_ID> or <LABEL_NAME> as the import ID.

For example:

$ pulumi import zia:index/ruleLabels:RuleLabels example <label_id>
Copy

or

$ pulumi import zia:index/ruleLabels:RuleLabels example <label_name>
Copy

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

Package Details

Repository
zia zscaler/pulumi-zia
License
MIT
Notes
This Pulumi package is based on the zia Terraform Provider.