1. Packages
  2. Zscaler Internet Access (ZIA)
  3. API Docs
  4. UrlCategory
Viewing docs for pulumi-resource-zia v1.3.8
published on Friday, Mar 13, 2026 by Zscaler
zia logo
Viewing docs for pulumi-resource-zia v1.3.8
published on Friday, Mar 13, 2026 by Zscaler

    The zia_url_categories resource manages custom URL categories in the Zscaler Internet Access (ZIA) cloud service. Custom URL categories allow administrators to define their own groupings of URLs, keywords, and IP ranges for use in URL filtering policies.

    For more information, see the ZIA URL Categories documentation.

    Example Usage

    Basic Custom URL Category

    Example coming soon!

    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	zia "github.com/zscaler/pulumi-zia/sdk/go/pulumi-zia"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zia.NewUrlCategory(ctx, "example", &zia.UrlCategoryArgs{
    			ConfiguredName: pulumi.StringRef("Example Custom Category"),
    			Description:    pulumi.StringRef("Custom category for internal tools"),
    			SuperCategory:  pulumi.StringRef("USER_DEFINED"),
    			Type:           pulumi.StringRef("URL_CATEGORY"),
    			Urls:           pulumi.ToStringArray([]string{"internal.example.com", "tools.example.com"}),
    			CustomCategory: pulumi.BoolRef(true),
    		})
    		return err
    	})
    }
    

    Example coming soon!

    import * as zia from "@bdzscaler/pulumi-zia";
    
    const example = new zia.UrlCategory("example", {
        configuredName: "Example Custom Category",
        description: "Custom category for internal tools",
        superCategory: "USER_DEFINED",
        type: "URL_CATEGORY",
        urls: [
            "internal.example.com",
            "tools.example.com",
        ],
        customCategory: true,
    });
    
    import zscaler_pulumi_zia as zia
    
    example = zia.UrlCategory("example",
        configured_name="Example Custom Category",
        description="Custom category for internal tools",
        super_category="USER_DEFINED",
        type="URL_CATEGORY",
        urls=[
            "internal.example.com",
            "tools.example.com",
        ],
        custom_category=True,
    )
    
    resources:
      example:
        type: zia:UrlCategory
        properties:
          configuredName: Example Custom Category
          description: Custom category for internal tools
          superCategory: USER_DEFINED
          type: URL_CATEGORY
          urls:
            - internal.example.com
            - tools.example.com
          customCategory: true
    

    Create UrlCategory Resource

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

    Constructor syntax

    new UrlCategory(name: string, args?: UrlCategoryArgs, opts?: CustomResourceOptions);
    @overload
    def UrlCategory(resource_name: str,
                    args: Optional[UrlCategoryArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def UrlCategory(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    configured_name: Optional[str] = None,
                    custom_category: Optional[bool] = None,
                    db_categorized_urls: Optional[Sequence[str]] = None,
                    description: Optional[str] = None,
                    ip_ranges: Optional[Sequence[str]] = None,
                    ip_ranges_retaining_parent_category: Optional[Sequence[str]] = None,
                    keywords: Optional[Sequence[str]] = None,
                    keywords_retaining_parent_category: Optional[Sequence[str]] = None,
                    regex_patterns: Optional[Sequence[str]] = None,
                    regex_patterns_retaining_parent_category: Optional[Sequence[str]] = None,
                    scopes: Optional[Sequence[UrlCategoryScopeInputArgs]] = None,
                    super_category: Optional[str] = None,
                    type: Optional[str] = None,
                    url_keyword_counts: Optional[UrlCategoryUrlKeywordCountsInputArgs] = None,
                    url_type: Optional[str] = None,
                    urls: Optional[Sequence[str]] = None)
    func NewUrlCategory(ctx *Context, name string, args *UrlCategoryArgs, opts ...ResourceOption) (*UrlCategory, error)
    public UrlCategory(string name, UrlCategoryArgs? args = null, CustomResourceOptions? opts = null)
    public UrlCategory(String name, UrlCategoryArgs args)
    public UrlCategory(String name, UrlCategoryArgs args, CustomResourceOptions options)
    
    type: zia:UrlCategory
    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 UrlCategoryArgs
    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 UrlCategoryArgs
    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 UrlCategoryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UrlCategoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UrlCategoryArgs
    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 urlCategoryResource = new Zia.UrlCategory("urlCategoryResource", new()
    {
        ConfiguredName = "string",
        CustomCategory = false,
        DbCategorizedUrls = new[]
        {
            "string",
        },
        Description = "string",
        IpRanges = new[]
        {
            "string",
        },
        IpRangesRetainingParentCategory = new[]
        {
            "string",
        },
        Keywords = new[]
        {
            "string",
        },
        KeywordsRetainingParentCategory = new[]
        {
            "string",
        },
        RegexPatterns = new[]
        {
            "string",
        },
        RegexPatternsRetainingParentCategory = new[]
        {
            "string",
        },
        Scopes = new[]
        {
            new Zia.Inputs.UrlCategoryScopeInputArgs
            {
                ScopeEntities = new[]
                {
                    0,
                },
                ScopeGroupMemberEntities = new[]
                {
                    0,
                },
                Type = "string",
            },
        },
        SuperCategory = "string",
        Type = "string",
        UrlKeywordCounts = new Zia.Inputs.UrlCategoryUrlKeywordCountsInputArgs
        {
            RetainParentKeywordCount = 0,
            RetainParentUrlCount = 0,
            TotalKeywordCount = 0,
            TotalUrlCount = 0,
        },
        UrlType = "string",
        Urls = new[]
        {
            "string",
        },
    });
    
    example, err := zia.NewUrlCategory(ctx, "urlCategoryResource", &zia.UrlCategoryArgs{
    	ConfiguredName: pulumi.String("string"),
    	CustomCategory: pulumi.Bool(false),
    	DbCategorizedUrls: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	IpRanges: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IpRangesRetainingParentCategory: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Keywords: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	KeywordsRetainingParentCategory: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RegexPatterns: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RegexPatternsRetainingParentCategory: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Scopes: pulumizia.UrlCategoryScopeInputArray{
    		&pulumizia.UrlCategoryScopeInputArgs{
    			ScopeEntities: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    			ScopeGroupMemberEntities: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    			Type: pulumi.String("string"),
    		},
    	},
    	SuperCategory: pulumi.String("string"),
    	Type:          pulumi.String("string"),
    	UrlKeywordCounts: &pulumizia.UrlCategoryUrlKeywordCountsInputArgs{
    		RetainParentKeywordCount: pulumi.Int(0),
    		RetainParentUrlCount:     pulumi.Int(0),
    		TotalKeywordCount:        pulumi.Int(0),
    		TotalUrlCount:            pulumi.Int(0),
    	},
    	UrlType: pulumi.String("string"),
    	Urls: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var urlCategoryResource = new UrlCategory("urlCategoryResource", UrlCategoryArgs.builder()
        .configuredName("string")
        .customCategory(false)
        .dbCategorizedUrls("string")
        .description("string")
        .ipRanges("string")
        .ipRangesRetainingParentCategory("string")
        .keywords("string")
        .keywordsRetainingParentCategory("string")
        .regexPatterns("string")
        .regexPatternsRetainingParentCategory("string")
        .scopes(UrlCategoryScopeInputArgs.builder()
            .scopeEntities(0)
            .scopeGroupMemberEntities(0)
            .type("string")
            .build())
        .superCategory("string")
        .type("string")
        .urlKeywordCounts(UrlCategoryUrlKeywordCountsInputArgs.builder()
            .retainParentKeywordCount(0)
            .retainParentUrlCount(0)
            .totalKeywordCount(0)
            .totalUrlCount(0)
            .build())
        .urlType("string")
        .urls("string")
        .build());
    
    url_category_resource = zia.UrlCategory("urlCategoryResource",
        configured_name="string",
        custom_category=False,
        db_categorized_urls=["string"],
        description="string",
        ip_ranges=["string"],
        ip_ranges_retaining_parent_category=["string"],
        keywords=["string"],
        keywords_retaining_parent_category=["string"],
        regex_patterns=["string"],
        regex_patterns_retaining_parent_category=["string"],
        scopes=[{
            "scope_entities": [0],
            "scope_group_member_entities": [0],
            "type": "string",
        }],
        super_category="string",
        type="string",
        url_keyword_counts={
            "retain_parent_keyword_count": 0,
            "retain_parent_url_count": 0,
            "total_keyword_count": 0,
            "total_url_count": 0,
        },
        url_type="string",
        urls=["string"])
    
    const urlCategoryResource = new zia.UrlCategory("urlCategoryResource", {
        configuredName: "string",
        customCategory: false,
        dbCategorizedUrls: ["string"],
        description: "string",
        ipRanges: ["string"],
        ipRangesRetainingParentCategory: ["string"],
        keywords: ["string"],
        keywordsRetainingParentCategory: ["string"],
        regexPatterns: ["string"],
        regexPatternsRetainingParentCategory: ["string"],
        scopes: [{
            scopeEntities: [0],
            scopeGroupMemberEntities: [0],
            type: "string",
        }],
        superCategory: "string",
        type: "string",
        urlKeywordCounts: {
            retainParentKeywordCount: 0,
            retainParentUrlCount: 0,
            totalKeywordCount: 0,
            totalUrlCount: 0,
        },
        urlType: "string",
        urls: ["string"],
    });
    
    type: zia:UrlCategory
    properties:
        configuredName: string
        customCategory: false
        dbCategorizedUrls:
            - string
        description: string
        ipRanges:
            - string
        ipRangesRetainingParentCategory:
            - string
        keywords:
            - string
        keywordsRetainingParentCategory:
            - string
        regexPatterns:
            - string
        regexPatternsRetainingParentCategory:
            - string
        scopes:
            - scopeEntities:
                - 0
              scopeGroupMemberEntities:
                - 0
              type: string
        superCategory: string
        type: string
        urlKeywordCounts:
            retainParentKeywordCount: 0
            retainParentUrlCount: 0
            totalKeywordCount: 0
            totalUrlCount: 0
        urlType: string
        urls:
            - string
    

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

    ConfiguredName string
    The name of the URL category. Must be unique.
    CustomCategory bool
    If true, this is a custom URL category. Set to true for custom categories.
    DbCategorizedUrls List<string>
    URLs added to a custom URL category that have been categorized by the Zscaler database.
    Description string
    A description of the URL category. Maximum 256 characters.
    IpRanges List<string>
    List of custom IP address ranges associated with the URL category.
    IpRangesRetainingParentCategory List<string>
    List of IP ranges that retain their parent category classification.
    Keywords List<string>
    List of custom keywords associated with the URL category.
    KeywordsRetainingParentCategory List<string>
    List of keywords that retain their parent category classification.
    RegexPatterns List<string>
    List of regex-based patterns for URL matching.
    RegexPatternsRetainingParentCategory List<string>
    List of regex patterns that retain their parent category classification.
    Scopes List<zscaler.PulumiPackage.Zia.Inputs.UrlCategoryScopeInput>
    Scopes for the custom URL category, defining location or department restrictions.
    SuperCategory string
    The super category for the URL category (e.g., USER_DEFINED).
    Type string
    The type of URL category. Valid values: URL_CATEGORY, TLD_CATEGORY, ALL.
    UrlKeywordCounts zscaler.PulumiPackage.Zia.Inputs.UrlCategoryUrlKeywordCountsInput
    URL and keyword count statistics for the category.
    UrlType string
    The URL type. Valid values: EXACT, REGEX.
    Urls List<string>
    List of custom URLs to add to the category.
    ConfiguredName string
    The name of the URL category. Must be unique.
    CustomCategory bool
    If true, this is a custom URL category. Set to true for custom categories.
    DbCategorizedUrls []string
    URLs added to a custom URL category that have been categorized by the Zscaler database.
    Description string
    A description of the URL category. Maximum 256 characters.
    IpRanges []string
    List of custom IP address ranges associated with the URL category.
    IpRangesRetainingParentCategory []string
    List of IP ranges that retain their parent category classification.
    Keywords []string
    List of custom keywords associated with the URL category.
    KeywordsRetainingParentCategory []string
    List of keywords that retain their parent category classification.
    RegexPatterns []string
    List of regex-based patterns for URL matching.
    RegexPatternsRetainingParentCategory []string
    List of regex patterns that retain their parent category classification.
    Scopes []UrlCategoryScopeInputArgs
    Scopes for the custom URL category, defining location or department restrictions.
    SuperCategory string
    The super category for the URL category (e.g., USER_DEFINED).
    Type string
    The type of URL category. Valid values: URL_CATEGORY, TLD_CATEGORY, ALL.
    UrlKeywordCounts UrlCategoryUrlKeywordCountsInputArgs
    URL and keyword count statistics for the category.
    UrlType string
    The URL type. Valid values: EXACT, REGEX.
    Urls []string
    List of custom URLs to add to the category.
    configuredName String
    The name of the URL category. Must be unique.
    customCategory Boolean
    If true, this is a custom URL category. Set to true for custom categories.
    dbCategorizedUrls List<String>
    URLs added to a custom URL category that have been categorized by the Zscaler database.
    description String
    A description of the URL category. Maximum 256 characters.
    ipRanges List<String>
    List of custom IP address ranges associated with the URL category.
    ipRangesRetainingParentCategory List<String>
    List of IP ranges that retain their parent category classification.
    keywords List<String>
    List of custom keywords associated with the URL category.
    keywordsRetainingParentCategory List<String>
    List of keywords that retain their parent category classification.
    regexPatterns List<String>
    List of regex-based patterns for URL matching.
    regexPatternsRetainingParentCategory List<String>
    List of regex patterns that retain their parent category classification.
    scopes List<UrlCategoryScopeInput>
    Scopes for the custom URL category, defining location or department restrictions.
    superCategory String
    The super category for the URL category (e.g., USER_DEFINED).
    type String
    The type of URL category. Valid values: URL_CATEGORY, TLD_CATEGORY, ALL.
    urlKeywordCounts UrlCategoryUrlKeywordCountsInput
    URL and keyword count statistics for the category.
    urlType String
    The URL type. Valid values: EXACT, REGEX.
    urls List<String>
    List of custom URLs to add to the category.
    configuredName string
    The name of the URL category. Must be unique.
    customCategory boolean
    If true, this is a custom URL category. Set to true for custom categories.
    dbCategorizedUrls string[]
    URLs added to a custom URL category that have been categorized by the Zscaler database.
    description string
    A description of the URL category. Maximum 256 characters.
    ipRanges string[]
    List of custom IP address ranges associated with the URL category.
    ipRangesRetainingParentCategory string[]
    List of IP ranges that retain their parent category classification.
    keywords string[]
    List of custom keywords associated with the URL category.
    keywordsRetainingParentCategory string[]
    List of keywords that retain their parent category classification.
    regexPatterns string[]
    List of regex-based patterns for URL matching.
    regexPatternsRetainingParentCategory string[]
    List of regex patterns that retain their parent category classification.
    scopes UrlCategoryScopeInput[]
    Scopes for the custom URL category, defining location or department restrictions.
    superCategory string
    The super category for the URL category (e.g., USER_DEFINED).
    type string
    The type of URL category. Valid values: URL_CATEGORY, TLD_CATEGORY, ALL.
    urlKeywordCounts UrlCategoryUrlKeywordCountsInput
    URL and keyword count statistics for the category.
    urlType string
    The URL type. Valid values: EXACT, REGEX.
    urls string[]
    List of custom URLs to add to the category.
    configured_name str
    The name of the URL category. Must be unique.
    custom_category bool
    If true, this is a custom URL category. Set to true for custom categories.
    db_categorized_urls Sequence[str]
    URLs added to a custom URL category that have been categorized by the Zscaler database.
    description str
    A description of the URL category. Maximum 256 characters.
    ip_ranges Sequence[str]
    List of custom IP address ranges associated with the URL category.
    ip_ranges_retaining_parent_category Sequence[str]
    List of IP ranges that retain their parent category classification.
    keywords Sequence[str]
    List of custom keywords associated with the URL category.
    keywords_retaining_parent_category Sequence[str]
    List of keywords that retain their parent category classification.
    regex_patterns Sequence[str]
    List of regex-based patterns for URL matching.
    regex_patterns_retaining_parent_category Sequence[str]
    List of regex patterns that retain their parent category classification.
    scopes Sequence[UrlCategoryScopeInputArgs]
    Scopes for the custom URL category, defining location or department restrictions.
    super_category str
    The super category for the URL category (e.g., USER_DEFINED).
    type str
    The type of URL category. Valid values: URL_CATEGORY, TLD_CATEGORY, ALL.
    url_keyword_counts UrlCategoryUrlKeywordCountsInputArgs
    URL and keyword count statistics for the category.
    url_type str
    The URL type. Valid values: EXACT, REGEX.
    urls Sequence[str]
    List of custom URLs to add to the category.
    configuredName String
    The name of the URL category. Must be unique.
    customCategory Boolean
    If true, this is a custom URL category. Set to true for custom categories.
    dbCategorizedUrls List<String>
    URLs added to a custom URL category that have been categorized by the Zscaler database.
    description String
    A description of the URL category. Maximum 256 characters.
    ipRanges List<String>
    List of custom IP address ranges associated with the URL category.
    ipRangesRetainingParentCategory List<String>
    List of IP ranges that retain their parent category classification.
    keywords List<String>
    List of custom keywords associated with the URL category.
    keywordsRetainingParentCategory List<String>
    List of keywords that retain their parent category classification.
    regexPatterns List<String>
    List of regex-based patterns for URL matching.
    regexPatternsRetainingParentCategory List<String>
    List of regex patterns that retain their parent category classification.
    scopes List<Property Map>
    Scopes for the custom URL category, defining location or department restrictions.
    superCategory String
    The super category for the URL category (e.g., USER_DEFINED).
    type String
    The type of URL category. Valid values: URL_CATEGORY, TLD_CATEGORY, ALL.
    urlKeywordCounts Property Map
    URL and keyword count statistics for the category.
    urlType String
    The URL type. Valid values: EXACT, REGEX.
    urls List<String>
    List of custom URLs to add to the category.

    Outputs

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

    CategoryId string
    The system-generated ID of the URL category.
    Id string
    The provider-assigned unique ID for this managed resource.
    CustomIpRangesCount int
    The number of custom IP ranges in the category.
    CustomUrlsCount int
    The number of custom URLs in the category.
    Editable bool
    Whether the URL category is editable.
    IpRangesRetainingParentCategoryCount int
    The number of IP ranges retaining parent category.
    UrlsRetainingParentCategoryCount int
    The number of URLs retaining parent category.
    Val int
    The internal numeric value of the URL category.
    CategoryId string
    The system-generated ID of the URL category.
    Id string
    The provider-assigned unique ID for this managed resource.
    CustomIpRangesCount int
    The number of custom IP ranges in the category.
    CustomUrlsCount int
    The number of custom URLs in the category.
    Editable bool
    Whether the URL category is editable.
    IpRangesRetainingParentCategoryCount int
    The number of IP ranges retaining parent category.
    UrlsRetainingParentCategoryCount int
    The number of URLs retaining parent category.
    Val int
    The internal numeric value of the URL category.
    categoryId String
    The system-generated ID of the URL category.
    id String
    The provider-assigned unique ID for this managed resource.
    customIpRangesCount Integer
    The number of custom IP ranges in the category.
    customUrlsCount Integer
    The number of custom URLs in the category.
    editable Boolean
    Whether the URL category is editable.
    ipRangesRetainingParentCategoryCount Integer
    The number of IP ranges retaining parent category.
    urlsRetainingParentCategoryCount Integer
    The number of URLs retaining parent category.
    val Integer
    The internal numeric value of the URL category.
    categoryId string
    The system-generated ID of the URL category.
    id string
    The provider-assigned unique ID for this managed resource.
    customIpRangesCount number
    The number of custom IP ranges in the category.
    customUrlsCount number
    The number of custom URLs in the category.
    editable boolean
    Whether the URL category is editable.
    ipRangesRetainingParentCategoryCount number
    The number of IP ranges retaining parent category.
    urlsRetainingParentCategoryCount number
    The number of URLs retaining parent category.
    val number
    The internal numeric value of the URL category.
    category_id str
    The system-generated ID of the URL category.
    id str
    The provider-assigned unique ID for this managed resource.
    custom_ip_ranges_count int
    The number of custom IP ranges in the category.
    custom_urls_count int
    The number of custom URLs in the category.
    editable bool
    Whether the URL category is editable.
    ip_ranges_retaining_parent_category_count int
    The number of IP ranges retaining parent category.
    urls_retaining_parent_category_count int
    The number of URLs retaining parent category.
    val int
    The internal numeric value of the URL category.
    categoryId String
    The system-generated ID of the URL category.
    id String
    The provider-assigned unique ID for this managed resource.
    customIpRangesCount Number
    The number of custom IP ranges in the category.
    customUrlsCount Number
    The number of custom URLs in the category.
    editable Boolean
    Whether the URL category is editable.
    ipRangesRetainingParentCategoryCount Number
    The number of IP ranges retaining parent category.
    urlsRetainingParentCategoryCount Number
    The number of URLs retaining parent category.
    val Number
    The internal numeric value of the URL category.

    Supporting Types

    UrlCategoryScopeInput, UrlCategoryScopeInputArgs

    scopeEntities List<Integer>
    scopeGroupMemberEntities List<Integer>
    type String
    scope_entities Sequence[int]
    scope_group_member_entities Sequence[int]
    type str
    scopeEntities List<Number>
    scopeGroupMemberEntities List<Number>
    type String

    UrlCategoryUrlKeywordCountsInput, UrlCategoryUrlKeywordCountsInputArgs

    Import

    An existing URL Category can be imported using its resource ID, e.g.

    $ pulumi import zia:index:UrlCategory example CUSTOM_01
    

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

    Package Details

    Repository
    zia zscaler/pulumi-zia
    License
    zia logo
    Viewing docs for pulumi-resource-zia v1.3.8
    published on Friday, Mar 13, 2026 by Zscaler
      Try Pulumi Cloud free. Your team will thank you.