1. Packages
  2. Azure Native v1
  3. API Docs
  4. cdn
  5. SecurityPolicy
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.cdn.SecurityPolicy

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    SecurityPolicy association for AzureFrontDoor profile API Version: 2020-09-01.

    Example Usage

    SecurityPolicies_Create

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var securityPolicy = new AzureNative.Cdn.SecurityPolicy("securityPolicy", new()
        {
            Parameters = new AzureNative.Cdn.Inputs.SecurityPolicyWebApplicationFirewallParametersArgs
            {
                Associations = new[]
                {
                    new AzureNative.Cdn.Inputs.SecurityPolicyWebApplicationFirewallAssociationArgs
                    {
                        Domains = new[]
                        {
                            new AzureNative.Cdn.Inputs.ResourceReferenceArgs
                            {
                                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1",
                            },
                            new AzureNative.Cdn.Inputs.ResourceReferenceArgs
                            {
                                Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2",
                            },
                        },
                        PatternsToMatch = new[]
                        {
                            "/images",
                            "/videos",
                        },
                    },
                },
                Type = "WebApplicationFirewall",
                WafPolicy = new AzureNative.Cdn.Inputs.ResourceReferenceArgs
                {
                    Id = "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest",
                },
            },
            ProfileName = "profile1",
            ResourceGroupName = "RG",
            SecurityPolicyName = "securityPolicy1",
        });
    
    });
    

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.cdn.SecurityPolicy;
    import com.pulumi.azurenative.cdn.SecurityPolicyArgs;
    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 securityPolicy = new SecurityPolicy("securityPolicy", SecurityPolicyArgs.builder()        
                .parameters(Map.ofEntries(
                    Map.entry("associations", Map.ofEntries(
                        Map.entry("domains",                     
                            Map.of("id", "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1"),
                            Map.of("id", "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2")),
                        Map.entry("patternsToMatch",                     
                            "/images",
                            "/videos")
                    )),
                    Map.entry("type", "WebApplicationFirewall"),
                    Map.entry("wafPolicy", Map.of("id", "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"))
                ))
                .profileName("profile1")
                .resourceGroupName("RG")
                .securityPolicyName("securityPolicy1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    security_policy = azure_native.cdn.SecurityPolicy("securityPolicy",
        parameters=azure_native.cdn.SecurityPolicyWebApplicationFirewallParametersResponseArgs(
            associations=[{
                "domains": [
                    azure_native.cdn.ResourceReferenceArgs(
                        id="/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1",
                    ),
                    azure_native.cdn.ResourceReferenceArgs(
                        id="/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2",
                    ),
                ],
                "patternsToMatch": [
                    "/images",
                    "/videos",
                ],
            }],
            type="WebApplicationFirewall",
            waf_policy=azure_native.cdn.ResourceReferenceArgs(
                id="/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest",
            ),
        ),
        profile_name="profile1",
        resource_group_name="RG",
        security_policy_name="securityPolicy1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const securityPolicy = new azure_native.cdn.SecurityPolicy("securityPolicy", {
        parameters: {
            associations: [{
                domains: [
                    {
                        id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1",
                    },
                    {
                        id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2",
                    },
                ],
                patternsToMatch: [
                    "/images",
                    "/videos",
                ],
            }],
            type: "WebApplicationFirewall",
            wafPolicy: {
                id: "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest",
            },
        },
        profileName: "profile1",
        resourceGroupName: "RG",
        securityPolicyName: "securityPolicy1",
    });
    
    resources:
      securityPolicy:
        type: azure-native:cdn:SecurityPolicy
        properties:
          parameters:
            associations:
              - domains:
                  - id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain1
                  - id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afddomains/testdomain2
                patternsToMatch:
                  - /images
                  - /videos
            type: WebApplicationFirewall
            wafPolicy:
              id: /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest
          profileName: profile1
          resourceGroupName: RG
          securityPolicyName: securityPolicy1
    

    Create SecurityPolicy Resource

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

    Constructor syntax

    new SecurityPolicy(name: string, args: SecurityPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityPolicy(resource_name: str,
                       args: SecurityPolicyArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       profile_name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       parameters: Optional[SecurityPolicyWebApplicationFirewallParametersArgs] = None,
                       security_policy_name: Optional[str] = None)
    func NewSecurityPolicy(ctx *Context, name string, args SecurityPolicyArgs, opts ...ResourceOption) (*SecurityPolicy, error)
    public SecurityPolicy(string name, SecurityPolicyArgs args, CustomResourceOptions? opts = null)
    public SecurityPolicy(String name, SecurityPolicyArgs args)
    public SecurityPolicy(String name, SecurityPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:cdn:SecurityPolicy
    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 SecurityPolicyArgs
    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 SecurityPolicyArgs
    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 SecurityPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityPolicyArgs
    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 securityPolicyResource = new AzureNative.Cdn.SecurityPolicy("securityPolicyResource", new()
    {
        ProfileName = "string",
        ResourceGroupName = "string",
        Parameters = 
        {
            { "type", "WebApplicationFirewall" },
            { "associations", new[]
            {
                
                {
                    { "domains", new[]
                    {
                        
                        {
                            { "id", "string" },
                        },
                    } },
                    { "patternsToMatch", new[]
                    {
                        "string",
                    } },
                },
            } },
            { "wafPolicy", 
            {
                { "id", "string" },
            } },
        },
        SecurityPolicyName = "string",
    });
    
    example, err := cdn.NewSecurityPolicy(ctx, "securityPolicyResource", &cdn.SecurityPolicyArgs{
    	ProfileName:       "string",
    	ResourceGroupName: "string",
    	Parameters: map[string]interface{}{
    		"type": "WebApplicationFirewall",
    		"associations": []map[string]interface{}{
    			map[string]interface{}{
    				"domains": []map[string]interface{}{
    					map[string]interface{}{
    						"id": "string",
    					},
    				},
    				"patternsToMatch": []string{
    					"string",
    				},
    			},
    		},
    		"wafPolicy": map[string]interface{}{
    			"id": "string",
    		},
    	},
    	SecurityPolicyName: "string",
    })
    
    var securityPolicyResource = new SecurityPolicy("securityPolicyResource", SecurityPolicyArgs.builder()
        .profileName("string")
        .resourceGroupName("string")
        .parameters(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .securityPolicyName("string")
        .build());
    
    security_policy_resource = azure_native.cdn.SecurityPolicy("securityPolicyResource",
        profile_name=string,
        resource_group_name=string,
        parameters={
            type: WebApplicationFirewall,
            associations: [{
                domains: [{
                    id: string,
                }],
                patternsToMatch: [string],
            }],
            wafPolicy: {
                id: string,
            },
        },
        security_policy_name=string)
    
    const securityPolicyResource = new azure_native.cdn.SecurityPolicy("securityPolicyResource", {
        profileName: "string",
        resourceGroupName: "string",
        parameters: {
            type: "WebApplicationFirewall",
            associations: [{
                domains: [{
                    id: "string",
                }],
                patternsToMatch: ["string"],
            }],
            wafPolicy: {
                id: "string",
            },
        },
        securityPolicyName: "string",
    });
    
    type: azure-native:cdn:SecurityPolicy
    properties:
        parameters:
            associations:
                - domains:
                    - id: string
                  patternsToMatch:
                    - string
            type: WebApplicationFirewall
            wafPolicy:
                id: string
        profileName: string
        resourceGroupName: string
        securityPolicyName: string
    

    SecurityPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecurityPolicy resource accepts the following input properties:

    ProfileName string
    Name of the CDN profile which is unique within the resource group.
    ResourceGroupName string
    Name of the Resource group within the Azure subscription.
    Parameters Pulumi.AzureNative.Cdn.Inputs.SecurityPolicyWebApplicationFirewallParameters
    object which contains security policy parameters
    SecurityPolicyName string
    Name of the security policy under the profile.
    ProfileName string
    Name of the CDN profile which is unique within the resource group.
    ResourceGroupName string
    Name of the Resource group within the Azure subscription.
    Parameters SecurityPolicyWebApplicationFirewallParametersArgs
    object which contains security policy parameters
    SecurityPolicyName string
    Name of the security policy under the profile.
    profileName String
    Name of the CDN profile which is unique within the resource group.
    resourceGroupName String
    Name of the Resource group within the Azure subscription.
    parameters SecurityPolicyWebApplicationFirewallParameters
    object which contains security policy parameters
    securityPolicyName String
    Name of the security policy under the profile.
    profileName string
    Name of the CDN profile which is unique within the resource group.
    resourceGroupName string
    Name of the Resource group within the Azure subscription.
    parameters SecurityPolicyWebApplicationFirewallParameters
    object which contains security policy parameters
    securityPolicyName string
    Name of the security policy under the profile.
    profile_name str
    Name of the CDN profile which is unique within the resource group.
    resource_group_name str
    Name of the Resource group within the Azure subscription.
    parameters SecurityPolicyWebApplicationFirewallParametersArgs
    object which contains security policy parameters
    security_policy_name str
    Name of the security policy under the profile.
    profileName String
    Name of the CDN profile which is unique within the resource group.
    resourceGroupName String
    Name of the Resource group within the Azure subscription.
    parameters Property Map
    object which contains security policy parameters
    securityPolicyName String
    Name of the security policy under the profile.

    Outputs

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

    DeploymentStatus string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    ProvisioningState string
    Provisioning status
    SystemData Pulumi.AzureNative.Cdn.Outputs.SystemDataResponse
    Read only system data
    Type string
    Resource type.
    DeploymentStatus string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    ProvisioningState string
    Provisioning status
    SystemData SystemDataResponse
    Read only system data
    Type string
    Resource type.
    deploymentStatus String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    provisioningState String
    Provisioning status
    systemData SystemDataResponse
    Read only system data
    type String
    Resource type.
    deploymentStatus string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name.
    provisioningState string
    Provisioning status
    systemData SystemDataResponse
    Read only system data
    type string
    Resource type.
    deployment_status str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name.
    provisioning_state str
    Provisioning status
    system_data SystemDataResponse
    Read only system data
    type str
    Resource type.
    deploymentStatus String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    provisioningState String
    Provisioning status
    systemData Property Map
    Read only system data
    type String
    Resource type.

    Supporting Types

    ResourceReference, ResourceReferenceArgs

    Id string
    Resource ID.
    Id string
    Resource ID.
    id String
    Resource ID.
    id string
    Resource ID.
    id str
    Resource ID.
    id String
    Resource ID.

    ResourceReferenceResponse, ResourceReferenceResponseArgs

    Id string
    Resource ID.
    Id string
    Resource ID.
    id String
    Resource ID.
    id string
    Resource ID.
    id str
    Resource ID.
    id String
    Resource ID.

    SecurityPolicyWebApplicationFirewallAssociation, SecurityPolicyWebApplicationFirewallAssociationArgs

    Domains []ResourceReference
    List of domains.
    PatternsToMatch []string
    List of paths
    domains List<ResourceReference>
    List of domains.
    patternsToMatch List<String>
    List of paths
    domains ResourceReference[]
    List of domains.
    patternsToMatch string[]
    List of paths
    domains Sequence[ResourceReference]
    List of domains.
    patterns_to_match Sequence[str]
    List of paths
    domains List<Property Map>
    List of domains.
    patternsToMatch List<String>
    List of paths

    SecurityPolicyWebApplicationFirewallAssociationResponse, SecurityPolicyWebApplicationFirewallAssociationResponseArgs

    Domains []ResourceReferenceResponse
    List of domains.
    PatternsToMatch []string
    List of paths
    domains List<ResourceReferenceResponse>
    List of domains.
    patternsToMatch List<String>
    List of paths
    domains ResourceReferenceResponse[]
    List of domains.
    patternsToMatch string[]
    List of paths
    domains Sequence[ResourceReferenceResponse]
    List of domains.
    patterns_to_match Sequence[str]
    List of paths
    domains List<Property Map>
    List of domains.
    patternsToMatch List<String>
    List of paths

    SecurityPolicyWebApplicationFirewallParameters, SecurityPolicyWebApplicationFirewallParametersArgs

    SecurityPolicyWebApplicationFirewallParametersResponse, SecurityPolicyWebApplicationFirewallParametersResponseArgs

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC)
    CreatedBy string
    An identifier for the identity that created the resource
    CreatedByType string
    The type of identity that created the resource
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    An identifier for the identity that last modified the resource
    LastModifiedByType string
    The type of identity that last modified the resource
    CreatedAt string
    The timestamp of resource creation (UTC)
    CreatedBy string
    An identifier for the identity that created the resource
    CreatedByType string
    The type of identity that created the resource
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    An identifier for the identity that last modified the resource
    LastModifiedByType string
    The type of identity that last modified the resource
    createdAt String
    The timestamp of resource creation (UTC)
    createdBy String
    An identifier for the identity that created the resource
    createdByType String
    The type of identity that created the resource
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    An identifier for the identity that last modified the resource
    lastModifiedByType String
    The type of identity that last modified the resource
    createdAt string
    The timestamp of resource creation (UTC)
    createdBy string
    An identifier for the identity that created the resource
    createdByType string
    The type of identity that created the resource
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    An identifier for the identity that last modified the resource
    lastModifiedByType string
    The type of identity that last modified the resource
    created_at str
    The timestamp of resource creation (UTC)
    created_by str
    An identifier for the identity that created the resource
    created_by_type str
    The type of identity that created the resource
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    An identifier for the identity that last modified the resource
    last_modified_by_type str
    The type of identity that last modified the resource
    createdAt String
    The timestamp of resource creation (UTC)
    createdBy String
    An identifier for the identity that created the resource
    createdByType String
    The type of identity that created the resource
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    An identifier for the identity that last modified the resource
    lastModifiedByType String
    The type of identity that last modified the resource

    Import

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

    $ pulumi import azure-native:cdn:SecurityPolicy securityPolicy1 /subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securityPolicies/securityPolicy1 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi