1. Packages
  2. Azure Native v2
  3. API Docs
  4. network
  5. DdosCustomPolicy
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.network.DdosCustomPolicy

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

A DDoS custom policy in a resource group. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.

Other available API versions: 2022-01-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.

Example Usage

Create DDoS custom policy

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var ddosCustomPolicy = new AzureNative.Network.DdosCustomPolicy("ddosCustomPolicy", new()
    {
        DdosCustomPolicyName = "test-ddos-custom-policy",
        Location = "centraluseuap",
        ResourceGroupName = "rg1",
    });

});
Copy
package main

import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewDdosCustomPolicy(ctx, "ddosCustomPolicy", &network.DdosCustomPolicyArgs{
			DdosCustomPolicyName: pulumi.String("test-ddos-custom-policy"),
			Location:             pulumi.String("centraluseuap"),
			ResourceGroupName:    pulumi.String("rg1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.DdosCustomPolicy;
import com.pulumi.azurenative.network.DdosCustomPolicyArgs;
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 ddosCustomPolicy = new DdosCustomPolicy("ddosCustomPolicy", DdosCustomPolicyArgs.builder()
            .ddosCustomPolicyName("test-ddos-custom-policy")
            .location("centraluseuap")
            .resourceGroupName("rg1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const ddosCustomPolicy = new azure_native.network.DdosCustomPolicy("ddosCustomPolicy", {
    ddosCustomPolicyName: "test-ddos-custom-policy",
    location: "centraluseuap",
    resourceGroupName: "rg1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

ddos_custom_policy = azure_native.network.DdosCustomPolicy("ddosCustomPolicy",
    ddos_custom_policy_name="test-ddos-custom-policy",
    location="centraluseuap",
    resource_group_name="rg1")
Copy
resources:
  ddosCustomPolicy:
    type: azure-native:network:DdosCustomPolicy
    properties:
      ddosCustomPolicyName: test-ddos-custom-policy
      location: centraluseuap
      resourceGroupName: rg1
Copy

Create DdosCustomPolicy Resource

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

Constructor syntax

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

@overload
def DdosCustomPolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     resource_group_name: Optional[str] = None,
                     ddos_custom_policy_name: Optional[str] = None,
                     id: Optional[str] = None,
                     location: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
func NewDdosCustomPolicy(ctx *Context, name string, args DdosCustomPolicyArgs, opts ...ResourceOption) (*DdosCustomPolicy, error)
public DdosCustomPolicy(string name, DdosCustomPolicyArgs args, CustomResourceOptions? opts = null)
public DdosCustomPolicy(String name, DdosCustomPolicyArgs args)
public DdosCustomPolicy(String name, DdosCustomPolicyArgs args, CustomResourceOptions options)
type: azure-native:network:DdosCustomPolicy
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. DdosCustomPolicyArgs
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. DdosCustomPolicyArgs
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. DdosCustomPolicyArgs
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. DdosCustomPolicyArgs
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. DdosCustomPolicyArgs
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 ddosCustomPolicyResource = new AzureNative.Network.DdosCustomPolicy("ddosCustomPolicyResource", new()
{
    ResourceGroupName = "string",
    DdosCustomPolicyName = "string",
    Id = "string",
    Location = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := network.NewDdosCustomPolicy(ctx, "ddosCustomPolicyResource", &network.DdosCustomPolicyArgs{
	ResourceGroupName:    "string",
	DdosCustomPolicyName: "string",
	Id:                   "string",
	Location:             "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
})
Copy
var ddosCustomPolicyResource = new DdosCustomPolicy("ddosCustomPolicyResource", DdosCustomPolicyArgs.builder()
    .resourceGroupName("string")
    .ddosCustomPolicyName("string")
    .id("string")
    .location("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
ddos_custom_policy_resource = azure_native.network.DdosCustomPolicy("ddosCustomPolicyResource",
    resource_group_name=string,
    ddos_custom_policy_name=string,
    id=string,
    location=string,
    tags={
        string: string,
    })
Copy
const ddosCustomPolicyResource = new azure_native.network.DdosCustomPolicy("ddosCustomPolicyResource", {
    resourceGroupName: "string",
    ddosCustomPolicyName: "string",
    id: "string",
    location: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:network:DdosCustomPolicy
properties:
    ddosCustomPolicyName: string
    id: string
    location: string
    resourceGroupName: string
    tags:
        string: string
Copy

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

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
DdosCustomPolicyName Changes to this property will trigger replacement. string
The name of the DDoS custom policy.
Id string
Resource ID.
Location string
Resource location.
Tags Dictionary<string, string>
Resource tags.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
DdosCustomPolicyName Changes to this property will trigger replacement. string
The name of the DDoS custom policy.
Id string
Resource ID.
Location string
Resource location.
Tags map[string]string
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
ddosCustomPolicyName Changes to this property will trigger replacement. String
The name of the DDoS custom policy.
id String
Resource ID.
location String
Resource location.
tags Map<String,String>
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
ddosCustomPolicyName Changes to this property will trigger replacement. string
The name of the DDoS custom policy.
id string
Resource ID.
location string
Resource location.
tags {[key: string]: string}
Resource tags.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
ddos_custom_policy_name Changes to this property will trigger replacement. str
The name of the DDoS custom policy.
id str
Resource ID.
location str
Resource location.
tags Mapping[str, str]
Resource tags.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
ddosCustomPolicyName Changes to this property will trigger replacement. String
The name of the DDoS custom policy.
id String
Resource ID.
location String
Resource location.
tags Map<String>
Resource tags.

Outputs

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

Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
ProvisioningState string
The provisioning state of the DDoS custom policy resource.
ResourceGuid string
The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
Type string
Resource type.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
ProvisioningState string
The provisioning state of the DDoS custom policy resource.
ResourceGuid string
The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
Type string
Resource type.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
provisioningState String
The provisioning state of the DDoS custom policy resource.
resourceGuid String
The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
type String
Resource type.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
provisioningState string
The provisioning state of the DDoS custom policy resource.
resourceGuid string
The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
type string
Resource type.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
provisioning_state str
The provisioning state of the DDoS custom policy resource.
resource_guid str
The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
type str
Resource type.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
provisioningState String
The provisioning state of the DDoS custom policy resource.
resourceGuid String
The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
type String
Resource type.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:DdosCustomPolicy test-ddos-custom-policy /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi