fastly.NgwafRedaction
Explore with Pulumi AI
Provides a Fastly Next-Gen WAF Redaction, which can automatically redact known patterns of sensitive information.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demoRedaction = new fastly.NgwafRedaction("demo_redaction", {
field: "some field",
type: "request_header",
workspaceId: demo.id,
});
import pulumi
import pulumi_fastly as fastly
demo_redaction = fastly.NgwafRedaction("demo_redaction",
field="some field",
type="request_header",
workspace_id=demo["id"])
package main
import (
"github.com/pulumi/pulumi-fastly/sdk/v11/go/fastly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := fastly.NewNgwafRedaction(ctx, "demo_redaction", &fastly.NgwafRedactionArgs{
Field: pulumi.String("some field"),
Type: pulumi.String("request_header"),
WorkspaceId: pulumi.Any(demo.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fastly = Pulumi.Fastly;
return await Deployment.RunAsync(() =>
{
var demoRedaction = new Fastly.NgwafRedaction("demo_redaction", new()
{
Field = "some field",
Type = "request_header",
WorkspaceId = demo.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.NgwafRedaction;
import com.pulumi.fastly.NgwafRedactionArgs;
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 demoRedaction = new NgwafRedaction("demoRedaction", NgwafRedactionArgs.builder()
.field("some field")
.type("request_header")
.workspaceId(demo.id())
.build());
}
}
resources:
demoRedaction:
type: fastly:NgwafRedaction
name: demo_redaction
properties:
field: some field
type: request_header
workspaceId: ${demo.id}
Create NgwafRedaction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NgwafRedaction(name: string, args: NgwafRedactionArgs, opts?: CustomResourceOptions);
@overload
def NgwafRedaction(resource_name: str,
args: NgwafRedactionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NgwafRedaction(resource_name: str,
opts: Optional[ResourceOptions] = None,
field: Optional[str] = None,
type: Optional[str] = None,
workspace_id: Optional[str] = None)
func NewNgwafRedaction(ctx *Context, name string, args NgwafRedactionArgs, opts ...ResourceOption) (*NgwafRedaction, error)
public NgwafRedaction(string name, NgwafRedactionArgs args, CustomResourceOptions? opts = null)
public NgwafRedaction(String name, NgwafRedactionArgs args)
public NgwafRedaction(String name, NgwafRedactionArgs args, CustomResourceOptions options)
type: fastly:NgwafRedaction
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 NgwafRedactionArgs
- 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 NgwafRedactionArgs
- 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 NgwafRedactionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NgwafRedactionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NgwafRedactionArgs
- 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 ngwafRedactionResource = new Fastly.NgwafRedaction("ngwafRedactionResource", new()
{
Field = "string",
Type = "string",
WorkspaceId = "string",
});
example, err := fastly.NewNgwafRedaction(ctx, "ngwafRedactionResource", &fastly.NgwafRedactionArgs{
Field: pulumi.String("string"),
Type: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
})
var ngwafRedactionResource = new NgwafRedaction("ngwafRedactionResource", NgwafRedactionArgs.builder()
.field("string")
.type("string")
.workspaceId("string")
.build());
ngwaf_redaction_resource = fastly.NgwafRedaction("ngwafRedactionResource",
field="string",
type="string",
workspace_id="string")
const ngwafRedactionResource = new fastly.NgwafRedaction("ngwafRedactionResource", {
field: "string",
type: "string",
workspaceId: "string",
});
type: fastly:NgwafRedaction
properties:
field: string
type: string
workspaceId: string
NgwafRedaction 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 NgwafRedaction resource accepts the following input properties:
- Field string
- The name of the field that should be redacted.
- Type string
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - Workspace
Id string - The ID of the workspace.
- Field string
- The name of the field that should be redacted.
- Type string
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - Workspace
Id string - The ID of the workspace.
- field String
- The name of the field that should be redacted.
- type String
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace
Id String - The ID of the workspace.
- field string
- The name of the field that should be redacted.
- type string
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace
Id string - The ID of the workspace.
- field str
- The name of the field that should be redacted.
- type str
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace_
id str - The ID of the workspace.
- field String
- The name of the field that should be redacted.
- type String
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace
Id String - The ID of the workspace.
Outputs
All input properties are implicitly available as output properties. Additionally, the NgwafRedaction resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NgwafRedaction Resource
Get an existing NgwafRedaction 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?: NgwafRedactionState, opts?: CustomResourceOptions): NgwafRedaction
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
field: Optional[str] = None,
type: Optional[str] = None,
workspace_id: Optional[str] = None) -> NgwafRedaction
func GetNgwafRedaction(ctx *Context, name string, id IDInput, state *NgwafRedactionState, opts ...ResourceOption) (*NgwafRedaction, error)
public static NgwafRedaction Get(string name, Input<string> id, NgwafRedactionState? state, CustomResourceOptions? opts = null)
public static NgwafRedaction get(String name, Output<String> id, NgwafRedactionState state, CustomResourceOptions options)
resources: _: type: fastly:NgwafRedaction get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Field string
- The name of the field that should be redacted.
- Type string
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - Workspace
Id string - The ID of the workspace.
- Field string
- The name of the field that should be redacted.
- Type string
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - Workspace
Id string - The ID of the workspace.
- field String
- The name of the field that should be redacted.
- type String
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace
Id String - The ID of the workspace.
- field string
- The name of the field that should be redacted.
- type string
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace
Id string - The ID of the workspace.
- field str
- The name of the field that should be redacted.
- type str
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace_
id str - The ID of the workspace.
- field String
- The name of the field that should be redacted.
- type String
- The type of field that is being redacted. Accepted values are
request_parameter
,request_header
, andresponse_header
. - workspace
Id String - The ID of the workspace.
Import
Fastly Next-Gen WAF Redactions can be imported using their ID and the ID of the workspace they belong to.
$ pulumi import fastly:index/ngwafRedaction:NgwafRedaction example <workspace_id>/<redaction_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastly
Terraform Provider.