1. Packages
  2. Fortimanager Provider
  3. API Docs
  4. ObjectWafProfileMethodMethodpolicy
fortimanager 1.14.0 published on Tuesday, Apr 15, 2025 by fortinetdev

fortimanager.ObjectWafProfileMethodMethodpolicy

Explore with Pulumi AI

HTTP method policy.

This resource is a sub resource for variable method_policy of resource fortimanager.ObjectWafProfileMethod. Conflict and overwrite may occur if use both of them.

Example Usage

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

const trnameObjectWafProfile = new fortimanager.ObjectWafProfile("trnameObjectWafProfile", {});
const trnameObjectWafProfileMethodMethodpolicy = new fortimanager.ObjectWafProfileMethodMethodpolicy("trnameObjectWafProfileMethodMethodpolicy", {
    fosid: 1,
    pattern: "https://www.example.com/path/to/resource?param1=value1&param2=value2",
    regex: "enable",
    profile: trnameObjectWafProfile.name,
}, {
    dependsOn: [trnameObjectWafProfile],
});
Copy
import pulumi
import pulumi_fortimanager as fortimanager

trname_object_waf_profile = fortimanager.ObjectWafProfile("trnameObjectWafProfile")
trname_object_waf_profile_method_methodpolicy = fortimanager.ObjectWafProfileMethodMethodpolicy("trnameObjectWafProfileMethodMethodpolicy",
    fosid=1,
    pattern="https://www.example.com/path/to/resource?param1=value1&param2=value2",
    regex="enable",
    profile=trname_object_waf_profile.name,
    opts = pulumi.ResourceOptions(depends_on=[trname_object_waf_profile]))
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/fortimanager/fortimanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		trnameObjectWafProfile, err := fortimanager.NewObjectWafProfile(ctx, "trnameObjectWafProfile", nil)
		if err != nil {
			return err
		}
		_, err = fortimanager.NewObjectWafProfileMethodMethodpolicy(ctx, "trnameObjectWafProfileMethodMethodpolicy", &fortimanager.ObjectWafProfileMethodMethodpolicyArgs{
			Fosid:   pulumi.Float64(1),
			Pattern: pulumi.String("https://www.example.com/path/to/resource?param1=value1&param2=value2"),
			Regex:   pulumi.String("enable"),
			Profile: trnameObjectWafProfile.Name,
		}, pulumi.DependsOn([]pulumi.Resource{
			trnameObjectWafProfile,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortimanager = Pulumi.Fortimanager;

return await Deployment.RunAsync(() => 
{
    var trnameObjectWafProfile = new Fortimanager.ObjectWafProfile("trnameObjectWafProfile");

    var trnameObjectWafProfileMethodMethodpolicy = new Fortimanager.ObjectWafProfileMethodMethodpolicy("trnameObjectWafProfileMethodMethodpolicy", new()
    {
        Fosid = 1,
        Pattern = "https://www.example.com/path/to/resource?param1=value1&param2=value2",
        Regex = "enable",
        Profile = trnameObjectWafProfile.Name,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            trnameObjectWafProfile,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortimanager.ObjectWafProfile;
import com.pulumi.fortimanager.ObjectWafProfileMethodMethodpolicy;
import com.pulumi.fortimanager.ObjectWafProfileMethodMethodpolicyArgs;
import com.pulumi.resources.CustomResourceOptions;
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 trnameObjectWafProfile = new ObjectWafProfile("trnameObjectWafProfile");

        var trnameObjectWafProfileMethodMethodpolicy = new ObjectWafProfileMethodMethodpolicy("trnameObjectWafProfileMethodMethodpolicy", ObjectWafProfileMethodMethodpolicyArgs.builder()
            .fosid(1)
            .pattern("https://www.example.com/path/to/resource?param1=value1&param2=value2")
            .regex("enable")
            .profile(trnameObjectWafProfile.name())
            .build(), CustomResourceOptions.builder()
                .dependsOn(trnameObjectWafProfile)
                .build());

    }
}
Copy
resources:
  trnameObjectWafProfileMethodMethodpolicy:
    type: fortimanager:ObjectWafProfileMethodMethodpolicy
    properties:
      fosid: 1
      pattern: https://www.example.com/path/to/resource?param1=value1&param2=value2
      regex: enable
      profile: ${trnameObjectWafProfile.name}
    options:
      dependsOn:
        - ${trnameObjectWafProfile}
  trnameObjectWafProfile:
    type: fortimanager:ObjectWafProfile
Copy

Create ObjectWafProfileMethodMethodpolicy Resource

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

Constructor syntax

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

@overload
def ObjectWafProfileMethodMethodpolicy(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       profile: Optional[str] = None,
                                       address: Optional[str] = None,
                                       adom: Optional[str] = None,
                                       allowed_methods: Optional[Sequence[str]] = None,
                                       fosid: Optional[float] = None,
                                       object_waf_profile_method_methodpolicy_id: Optional[str] = None,
                                       pattern: Optional[str] = None,
                                       regex: Optional[str] = None,
                                       scopetype: Optional[str] = None)
func NewObjectWafProfileMethodMethodpolicy(ctx *Context, name string, args ObjectWafProfileMethodMethodpolicyArgs, opts ...ResourceOption) (*ObjectWafProfileMethodMethodpolicy, error)
public ObjectWafProfileMethodMethodpolicy(string name, ObjectWafProfileMethodMethodpolicyArgs args, CustomResourceOptions? opts = null)
public ObjectWafProfileMethodMethodpolicy(String name, ObjectWafProfileMethodMethodpolicyArgs args)
public ObjectWafProfileMethodMethodpolicy(String name, ObjectWafProfileMethodMethodpolicyArgs args, CustomResourceOptions options)
type: fortimanager:ObjectWafProfileMethodMethodpolicy
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. ObjectWafProfileMethodMethodpolicyArgs
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. ObjectWafProfileMethodMethodpolicyArgs
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. ObjectWafProfileMethodMethodpolicyArgs
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. ObjectWafProfileMethodMethodpolicyArgs
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. ObjectWafProfileMethodMethodpolicyArgs
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 objectWafProfileMethodMethodpolicyResource = new Fortimanager.ObjectWafProfileMethodMethodpolicy("objectWafProfileMethodMethodpolicyResource", new()
{
    Profile = "string",
    Address = "string",
    Adom = "string",
    AllowedMethods = new[]
    {
        "string",
    },
    Fosid = 0,
    ObjectWafProfileMethodMethodpolicyId = "string",
    Pattern = "string",
    Regex = "string",
    Scopetype = "string",
});
Copy
example, err := fortimanager.NewObjectWafProfileMethodMethodpolicy(ctx, "objectWafProfileMethodMethodpolicyResource", &fortimanager.ObjectWafProfileMethodMethodpolicyArgs{
Profile: pulumi.String("string"),
Address: pulumi.String("string"),
Adom: pulumi.String("string"),
AllowedMethods: pulumi.StringArray{
pulumi.String("string"),
},
Fosid: pulumi.Float64(0),
ObjectWafProfileMethodMethodpolicyId: pulumi.String("string"),
Pattern: pulumi.String("string"),
Regex: pulumi.String("string"),
Scopetype: pulumi.String("string"),
})
Copy
var objectWafProfileMethodMethodpolicyResource = new ObjectWafProfileMethodMethodpolicy("objectWafProfileMethodMethodpolicyResource", ObjectWafProfileMethodMethodpolicyArgs.builder()
    .profile("string")
    .address("string")
    .adom("string")
    .allowedMethods("string")
    .fosid(0)
    .objectWafProfileMethodMethodpolicyId("string")
    .pattern("string")
    .regex("string")
    .scopetype("string")
    .build());
Copy
object_waf_profile_method_methodpolicy_resource = fortimanager.ObjectWafProfileMethodMethodpolicy("objectWafProfileMethodMethodpolicyResource",
    profile="string",
    address="string",
    adom="string",
    allowed_methods=["string"],
    fosid=0,
    object_waf_profile_method_methodpolicy_id="string",
    pattern="string",
    regex="string",
    scopetype="string")
Copy
const objectWafProfileMethodMethodpolicyResource = new fortimanager.ObjectWafProfileMethodMethodpolicy("objectWafProfileMethodMethodpolicyResource", {
    profile: "string",
    address: "string",
    adom: "string",
    allowedMethods: ["string"],
    fosid: 0,
    objectWafProfileMethodMethodpolicyId: "string",
    pattern: "string",
    regex: "string",
    scopetype: "string",
});
Copy
type: fortimanager:ObjectWafProfileMethodMethodpolicy
properties:
    address: string
    adom: string
    allowedMethods:
        - string
    fosid: 0
    objectWafProfileMethodMethodpolicyId: string
    pattern: string
    profile: string
    regex: string
    scopetype: string
Copy

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

Profile This property is required. string
Profile.
Address string
Host address.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedMethods List<string>
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
Fosid double
HTTP method policy ID.
ObjectWafProfileMethodMethodpolicyId string
an identifier for the resource with format {{fosid}}.
Pattern string
URL pattern.
Regex string
Enable/disable regular expression based pattern match. Valid values: disable, enable.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
Profile This property is required. string
Profile.
Address string
Host address.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedMethods []string
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
Fosid float64
HTTP method policy ID.
ObjectWafProfileMethodMethodpolicyId string
an identifier for the resource with format {{fosid}}.
Pattern string
URL pattern.
Regex string
Enable/disable regular expression based pattern match. Valid values: disable, enable.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
profile This property is required. String
Profile.
address String
Host address.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedMethods List<String>
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid Double
HTTP method policy ID.
objectWafProfileMethodMethodpolicyId String
an identifier for the resource with format {{fosid}}.
pattern String
URL pattern.
regex String
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
profile This property is required. string
Profile.
address string
Host address.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedMethods string[]
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid number
HTTP method policy ID.
objectWafProfileMethodMethodpolicyId string
an identifier for the resource with format {{fosid}}.
pattern string
URL pattern.
regex string
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
profile This property is required. str
Profile.
address str
Host address.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowed_methods Sequence[str]
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid float
HTTP method policy ID.
object_waf_profile_method_methodpolicy_id str
an identifier for the resource with format {{fosid}}.
pattern str
URL pattern.
regex str
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype str
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
profile This property is required. String
Profile.
address String
Host address.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedMethods List<String>
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid Number
HTTP method policy ID.
objectWafProfileMethodMethodpolicyId String
an identifier for the resource with format {{fosid}}.
pattern String
URL pattern.
regex String
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.

Outputs

All input properties are implicitly available as output properties. Additionally, the ObjectWafProfileMethodMethodpolicy 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 ObjectWafProfileMethodMethodpolicy Resource

Get an existing ObjectWafProfileMethodMethodpolicy 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?: ObjectWafProfileMethodMethodpolicyState, opts?: CustomResourceOptions): ObjectWafProfileMethodMethodpolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address: Optional[str] = None,
        adom: Optional[str] = None,
        allowed_methods: Optional[Sequence[str]] = None,
        fosid: Optional[float] = None,
        object_waf_profile_method_methodpolicy_id: Optional[str] = None,
        pattern: Optional[str] = None,
        profile: Optional[str] = None,
        regex: Optional[str] = None,
        scopetype: Optional[str] = None) -> ObjectWafProfileMethodMethodpolicy
func GetObjectWafProfileMethodMethodpolicy(ctx *Context, name string, id IDInput, state *ObjectWafProfileMethodMethodpolicyState, opts ...ResourceOption) (*ObjectWafProfileMethodMethodpolicy, error)
public static ObjectWafProfileMethodMethodpolicy Get(string name, Input<string> id, ObjectWafProfileMethodMethodpolicyState? state, CustomResourceOptions? opts = null)
public static ObjectWafProfileMethodMethodpolicy get(String name, Output<String> id, ObjectWafProfileMethodMethodpolicyState state, CustomResourceOptions options)
resources:  _:    type: fortimanager:ObjectWafProfileMethodMethodpolicy    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:
Address string
Host address.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedMethods List<string>
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
Fosid double
HTTP method policy ID.
ObjectWafProfileMethodMethodpolicyId string
an identifier for the resource with format {{fosid}}.
Pattern string
URL pattern.
Profile string
Profile.
Regex string
Enable/disable regular expression based pattern match. Valid values: disable, enable.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
Address string
Host address.
Adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
AllowedMethods []string
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
Fosid float64
HTTP method policy ID.
ObjectWafProfileMethodMethodpolicyId string
an identifier for the resource with format {{fosid}}.
Pattern string
URL pattern.
Profile string
Profile.
Regex string
Enable/disable regular expression based pattern match. Valid values: disable, enable.
Scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
address String
Host address.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedMethods List<String>
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid Double
HTTP method policy ID.
objectWafProfileMethodMethodpolicyId String
an identifier for the resource with format {{fosid}}.
pattern String
URL pattern.
profile String
Profile.
regex String
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
address string
Host address.
adom string
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedMethods string[]
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid number
HTTP method policy ID.
objectWafProfileMethodMethodpolicyId string
an identifier for the resource with format {{fosid}}.
pattern string
URL pattern.
profile string
Profile.
regex string
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype string
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
address str
Host address.
adom str
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowed_methods Sequence[str]
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid float
HTTP method policy ID.
object_waf_profile_method_methodpolicy_id str
an identifier for the resource with format {{fosid}}.
pattern str
URL pattern.
profile str
Profile.
regex str
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype str
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.
address String
Host address.
adom String
Adom. This value is valid only when the scopetype is adom, otherwise the value of adom in the provider will be inherited.
allowedMethods List<String>
Allowed Methods. Valid values: delete, get, head, options, post, put, trace, others, connect.
fosid Number
HTTP method policy ID.
objectWafProfileMethodMethodpolicyId String
an identifier for the resource with format {{fosid}}.
pattern String
URL pattern.
profile String
Profile.
regex String
Enable/disable regular expression based pattern match. Valid values: disable, enable.
scopetype String
The scope of application of the resource. Valid values: inherit, adom, global. The inherit means that the scopetype of the provider will be inherited, and adom will also be inherited. The default value is inherit.

Import

ObjectWaf ProfileMethodMethodPolicy can be imported using any of these accepted formats:

Set import_options = [“profile=YOUR_VALUE”] in the provider section.

$ export “FORTIMANAGER_IMPORT_TABLE”=“true”

$ pulumi import fortimanager:index/objectWafProfileMethodMethodpolicy:ObjectWafProfileMethodMethodpolicy labelname {{fosid}}
Copy

$ unset “FORTIMANAGER_IMPORT_TABLE”

-> Hint: The scopetype and adom for import will directly inherit the scopetype and adom configuration of the provider.

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

Package Details

Repository
fortimanager fortinetdev/terraform-provider-fortimanager
License
Notes
This Pulumi package is based on the fortimanager Terraform Provider.