1. Packages
  2. Palo Alto Networks Cloud NGFW for AWS Provider
  3. API Docs
  4. CustomUrlCategory
Palo Alto Networks Cloud NGFW for AWS v0.1.1 published on Saturday, Mar 15, 2025 by Pulumi

cloudngfwaws.CustomUrlCategory

Explore with Pulumi AI

Resource for custom url category manipulation.

Admin Permission Type

  • Rulestack (for scope="Local")
  • Global Rulestack (for scope="Global")

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudngfwaws from "@pulumi/cloudngfwaws";

const r = new cloudngfwaws.Rulestack("r", {
    name: "terraform-rulestack",
    scope: "Local",
    accountId: "123456789",
    description: "Made by Pulumi",
    profileConfig: {
        antiSpyware: "BestPractice",
    },
});
const example = new cloudngfwaws.CustomUrlCategory("example", {
    rulestack: r.name,
    name: "tf-custom-category",
    description: "Also configured by Terraform",
    urlLists: [
        "example.com",
        "paloaltonetworks.com",
        "foobar.org",
    ],
    action: "alert",
});
Copy
import pulumi
import pulumi_cloudngfwaws as cloudngfwaws

r = cloudngfwaws.Rulestack("r",
    name="terraform-rulestack",
    scope="Local",
    account_id="123456789",
    description="Made by Pulumi",
    profile_config={
        "anti_spyware": "BestPractice",
    })
example = cloudngfwaws.CustomUrlCategory("example",
    rulestack=r.name,
    name="tf-custom-category",
    description="Also configured by Terraform",
    url_lists=[
        "example.com",
        "paloaltonetworks.com",
        "foobar.org",
    ],
    action="alert")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		r, err := cloudngfwaws.NewRulestack(ctx, "r", &cloudngfwaws.RulestackArgs{
			Name:        pulumi.String("terraform-rulestack"),
			Scope:       pulumi.String("Local"),
			AccountId:   pulumi.String("123456789"),
			Description: pulumi.String("Made by Pulumi"),
			ProfileConfig: &cloudngfwaws.RulestackProfileConfigArgs{
				AntiSpyware: pulumi.String("BestPractice"),
			},
		})
		if err != nil {
			return err
		}
		_, err = cloudngfwaws.NewCustomUrlCategory(ctx, "example", &cloudngfwaws.CustomUrlCategoryArgs{
			Rulestack:   r.Name,
			Name:        pulumi.String("tf-custom-category"),
			Description: pulumi.String("Also configured by Terraform"),
			UrlLists: pulumi.StringArray{
				pulumi.String("example.com"),
				pulumi.String("paloaltonetworks.com"),
				pulumi.String("foobar.org"),
			},
			Action: pulumi.String("alert"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudNgfwAws = Pulumi.CloudNgfwAws;

return await Deployment.RunAsync(() => 
{
    var r = new CloudNgfwAws.Rulestack("r", new()
    {
        Name = "terraform-rulestack",
        Scope = "Local",
        AccountId = "123456789",
        Description = "Made by Pulumi",
        ProfileConfig = new CloudNgfwAws.Inputs.RulestackProfileConfigArgs
        {
            AntiSpyware = "BestPractice",
        },
    });

    var example = new CloudNgfwAws.CustomUrlCategory("example", new()
    {
        Rulestack = r.Name,
        Name = "tf-custom-category",
        Description = "Also configured by Terraform",
        UrlLists = new[]
        {
            "example.com",
            "paloaltonetworks.com",
            "foobar.org",
        },
        Action = "alert",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudngfwaws.Rulestack;
import com.pulumi.cloudngfwaws.RulestackArgs;
import com.pulumi.cloudngfwaws.inputs.RulestackProfileConfigArgs;
import com.pulumi.cloudngfwaws.CustomUrlCategory;
import com.pulumi.cloudngfwaws.CustomUrlCategoryArgs;
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 r = new Rulestack("r", RulestackArgs.builder()
            .name("terraform-rulestack")
            .scope("Local")
            .accountId("123456789")
            .description("Made by Pulumi")
            .profileConfig(RulestackProfileConfigArgs.builder()
                .antiSpyware("BestPractice")
                .build())
            .build());

        var example = new CustomUrlCategory("example", CustomUrlCategoryArgs.builder()
            .rulestack(r.name())
            .name("tf-custom-category")
            .description("Also configured by Terraform")
            .urlLists(            
                "example.com",
                "paloaltonetworks.com",
                "foobar.org")
            .action("alert")
            .build());

    }
}
Copy
resources:
  example:
    type: cloudngfwaws:CustomUrlCategory
    properties:
      rulestack: ${r.name}
      name: tf-custom-category
      description: Also configured by Terraform
      urlLists:
        - example.com
        - paloaltonetworks.com
        - foobar.org
      action: alert
  r:
    type: cloudngfwaws:Rulestack
    properties:
      name: terraform-rulestack
      scope: Local
      accountId: '123456789'
      description: Made by Pulumi
      profileConfig:
        antiSpyware: BestPractice
Copy

Create CustomUrlCategory Resource

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

Constructor syntax

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

@overload
def CustomUrlCategory(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      rulestack: Optional[str] = None,
                      url_lists: Optional[Sequence[str]] = None,
                      action: Optional[str] = None,
                      audit_comment: Optional[str] = None,
                      description: Optional[str] = None,
                      name: Optional[str] = None,
                      scope: Optional[str] = None)
func NewCustomUrlCategory(ctx *Context, name string, args CustomUrlCategoryArgs, opts ...ResourceOption) (*CustomUrlCategory, error)
public CustomUrlCategory(string name, CustomUrlCategoryArgs args, CustomResourceOptions? opts = null)
public CustomUrlCategory(String name, CustomUrlCategoryArgs args)
public CustomUrlCategory(String name, CustomUrlCategoryArgs args, CustomResourceOptions options)
type: cloudngfwaws:CustomUrlCategory
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 This property is required. CustomUrlCategoryArgs
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 This property is required. CustomUrlCategoryArgs
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 This property is required. CustomUrlCategoryArgs
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 This property is required. CustomUrlCategoryArgs
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. CustomUrlCategoryArgs
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 customUrlCategoryResource = new CloudNgfwAws.CustomUrlCategory("customUrlCategoryResource", new()
{
    Rulestack = "string",
    UrlLists = new[]
    {
        "string",
    },
    Action = "string",
    AuditComment = "string",
    Description = "string",
    Name = "string",
    Scope = "string",
});
Copy
example, err := cloudngfwaws.NewCustomUrlCategory(ctx, "customUrlCategoryResource", &cloudngfwaws.CustomUrlCategoryArgs{
	Rulestack: pulumi.String("string"),
	UrlLists: pulumi.StringArray{
		pulumi.String("string"),
	},
	Action:       pulumi.String("string"),
	AuditComment: pulumi.String("string"),
	Description:  pulumi.String("string"),
	Name:         pulumi.String("string"),
	Scope:        pulumi.String("string"),
})
Copy
var customUrlCategoryResource = new CustomUrlCategory("customUrlCategoryResource", CustomUrlCategoryArgs.builder()
    .rulestack("string")
    .urlLists("string")
    .action("string")
    .auditComment("string")
    .description("string")
    .name("string")
    .scope("string")
    .build());
Copy
custom_url_category_resource = cloudngfwaws.CustomUrlCategory("customUrlCategoryResource",
    rulestack="string",
    url_lists=["string"],
    action="string",
    audit_comment="string",
    description="string",
    name="string",
    scope="string")
Copy
const customUrlCategoryResource = new cloudngfwaws.CustomUrlCategory("customUrlCategoryResource", {
    rulestack: "string",
    urlLists: ["string"],
    action: "string",
    auditComment: "string",
    description: "string",
    name: "string",
    scope: "string",
});
Copy
type: cloudngfwaws:CustomUrlCategory
properties:
    action: string
    auditComment: string
    description: string
    name: string
    rulestack: string
    scope: string
    urlLists:
        - string
Copy

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

Rulestack
This property is required.
Changes to this property will trigger replacement.
string
The rulestack.
UrlLists This property is required. List<string>
The URL list for this custom URL category.
Action string
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
AuditComment string
The audit comment.
Description string
The description.
Name Changes to this property will trigger replacement. string
The name.
Scope Changes to this property will trigger replacement. string
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
Rulestack
This property is required.
Changes to this property will trigger replacement.
string
The rulestack.
UrlLists This property is required. []string
The URL list for this custom URL category.
Action string
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
AuditComment string
The audit comment.
Description string
The description.
Name Changes to this property will trigger replacement. string
The name.
Scope Changes to this property will trigger replacement. string
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
rulestack
This property is required.
Changes to this property will trigger replacement.
String
The rulestack.
urlLists This property is required. List<String>
The URL list for this custom URL category.
action String
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
auditComment String
The audit comment.
description String
The description.
name Changes to this property will trigger replacement. String
The name.
scope Changes to this property will trigger replacement. String
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
rulestack
This property is required.
Changes to this property will trigger replacement.
string
The rulestack.
urlLists This property is required. string[]
The URL list for this custom URL category.
action string
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
auditComment string
The audit comment.
description string
The description.
name Changes to this property will trigger replacement. string
The name.
scope Changes to this property will trigger replacement. string
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
rulestack
This property is required.
Changes to this property will trigger replacement.
str
The rulestack.
url_lists This property is required. Sequence[str]
The URL list for this custom URL category.
action str
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
audit_comment str
The audit comment.
description str
The description.
name Changes to this property will trigger replacement. str
The name.
scope Changes to this property will trigger replacement. str
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
rulestack
This property is required.
Changes to this property will trigger replacement.
String
The rulestack.
urlLists This property is required. List<String>
The URL list for this custom URL category.
action String
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
auditComment String
The audit comment.
description String
The description.
name Changes to this property will trigger replacement. String
The name.
scope Changes to this property will trigger replacement. String
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
UpdateToken string
The update token.
Id string
The provider-assigned unique ID for this managed resource.
UpdateToken string
The update token.
id String
The provider-assigned unique ID for this managed resource.
updateToken String
The update token.
id string
The provider-assigned unique ID for this managed resource.
updateToken string
The update token.
id str
The provider-assigned unique ID for this managed resource.
update_token str
The update token.
id String
The provider-assigned unique ID for this managed resource.
updateToken String
The update token.

Look up Existing CustomUrlCategory Resource

Get an existing CustomUrlCategory 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?: CustomUrlCategoryState, opts?: CustomResourceOptions): CustomUrlCategory
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        audit_comment: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        rulestack: Optional[str] = None,
        scope: Optional[str] = None,
        update_token: Optional[str] = None,
        url_lists: Optional[Sequence[str]] = None) -> CustomUrlCategory
func GetCustomUrlCategory(ctx *Context, name string, id IDInput, state *CustomUrlCategoryState, opts ...ResourceOption) (*CustomUrlCategory, error)
public static CustomUrlCategory Get(string name, Input<string> id, CustomUrlCategoryState? state, CustomResourceOptions? opts = null)
public static CustomUrlCategory get(String name, Output<String> id, CustomUrlCategoryState state, CustomResourceOptions options)
resources:  _:    type: cloudngfwaws:CustomUrlCategory    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:
Action string
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
AuditComment string
The audit comment.
Description string
The description.
Name Changes to this property will trigger replacement. string
The name.
Rulestack Changes to this property will trigger replacement. string
The rulestack.
Scope Changes to this property will trigger replacement. string
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
UpdateToken string
The update token.
UrlLists List<string>
The URL list for this custom URL category.
Action string
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
AuditComment string
The audit comment.
Description string
The description.
Name Changes to this property will trigger replacement. string
The name.
Rulestack Changes to this property will trigger replacement. string
The rulestack.
Scope Changes to this property will trigger replacement. string
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
UpdateToken string
The update token.
UrlLists []string
The URL list for this custom URL category.
action String
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
auditComment String
The audit comment.
description String
The description.
name Changes to this property will trigger replacement. String
The name.
rulestack Changes to this property will trigger replacement. String
The rulestack.
scope Changes to this property will trigger replacement. String
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
updateToken String
The update token.
urlLists List<String>
The URL list for this custom URL category.
action string
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
auditComment string
The audit comment.
description string
The description.
name Changes to this property will trigger replacement. string
The name.
rulestack Changes to this property will trigger replacement. string
The rulestack.
scope Changes to this property will trigger replacement. string
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
updateToken string
The update token.
urlLists string[]
The URL list for this custom URL category.
action str
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
audit_comment str
The audit comment.
description str
The description.
name Changes to this property will trigger replacement. str
The name.
rulestack Changes to this property will trigger replacement. str
The rulestack.
scope Changes to this property will trigger replacement. str
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
update_token str
The update token.
url_lists Sequence[str]
The URL list for this custom URL category.
action String
The action to take. Valid values are none, alert, allow, block, continue, or override. Defaults to none.
auditComment String
The audit comment.
description String
The description.
name Changes to this property will trigger replacement. String
The name.
rulestack Changes to this property will trigger replacement. String
The rulestack.
scope Changes to this property will trigger replacement. String
The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are Local or Global. Defaults to Local.
updateToken String
The update token.
urlLists List<String>
The URL list for this custom URL category.

Import

import name is ::<category_name>

$ pulumi import cloudngfwaws:index/customUrlCategory:CustomUrlCategory example Local:terraform-rulestack:tf-custom-category
Copy

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

Package Details

Repository
cloudngfwaws pulumi/pulumi-cloudngfwaws
License
Apache-2.0
Notes
This Pulumi package is based on the cloudngfwaws Terraform Provider.