Security Policies - Create
Creates a new security policy within the specified profile.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}?api-version=2023-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
profile
|
path | True |
string |
Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. |
resource
|
path | True |
string |
Name of the Resource group within the Azure subscription. Regex pattern: |
security
|
path | True |
string |
Name of the security policy under the profile. |
subscription
|
path | True |
string |
Azure Subscription ID. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. Current version is 2023-05-01. |
Request Body
Name | Type | Description |
---|---|---|
properties.parameters | SecurityPolicyPropertiesParameters: |
object which contains security policy parameters |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
Created. The request has been fulfilled and a new delivery rule has been created. |
|
202 Accepted |
Accepted. The request has been accepted for processing and the operation will complete asynchronously. Headers location: string |
|
Other Status Codes |
Azure Front Door error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
SecurityPolicies_Create
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/securityPolicies/securityPolicy1?api-version=2023-05-01
{
"properties": {
"parameters": {
"type": "WebApplicationFirewall",
"wafPolicy": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"
},
"associations": [
{
"domains": [
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"
},
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"
}
],
"patternsToMatch": [
"/*"
]
}
]
}
}
}
Sample Response
{
"name": "securityPolicy1",
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1",
"type": "Microsoft.Cdn/profiles/securitypolicies",
"properties": {
"parameters": {
"type": "WebApplicationFirewall",
"wafPolicy": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"
},
"associations": [
{
"domains": [
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"
},
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"
}
],
"patternsToMatch": [
"/*"
]
}
]
},
"deploymentStatus": "NotStarted",
"provisioningState": "Succeeded"
}
}
{
"name": "securityPolicy1",
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1",
"type": "Microsoft.Cdn/profiles/securitypolicies",
"properties": {
"parameters": {
"type": "WebApplicationFirewall",
"wafPolicy": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"
},
"associations": [
{
"domains": [
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"
},
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"
}
],
"patternsToMatch": [
"/*"
]
}
]
},
"deploymentStatus": "NotStarted",
"provisioningState": "Succeeded"
}
}
azure-asyncoperation: https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2023-05-01
{
"name": "securityPolicy1",
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/securitypolicies/securityPolicy1",
"type": "Microsoft.Cdn/profiles/securitypolicies",
"properties": {
"parameters": {
"type": "WebApplicationFirewall",
"wafPolicy": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/wafTest"
},
"associations": [
{
"domains": [
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain1"
},
{
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/customdomains/testdomain2"
}
],
"patternsToMatch": [
"/*"
]
}
]
},
"deploymentStatus": "NotStarted",
"provisioningState": "Creating"
}
}
Definitions
Name | Description |
---|---|
Activated |
Reference to another resource along with its state. |
Afd |
Error response |
Afd |
Provisioning status |
Deployment |
|
Error |
The resource management error additional info. |
Error |
The error detail. |
Identity |
The type of identity that creates/modifies resources |
Resource |
Reference to another resource. |
Security |
SecurityPolicy association for AzureFrontDoor profile |
Security |
settings for security policy patterns to match |
Security |
The json object containing security policy waf parameters |
System |
Read only system data |
ActivatedResourceReference
Reference to another resource along with its state.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
isActive |
boolean |
Whether the resource is active or inactive |
AfdErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
AfdProvisioningState
Provisioning status
Name | Type | Description |
---|---|---|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
|
Updating |
string |
DeploymentStatus
Name | Type | Description |
---|---|---|
Failed |
string |
|
InProgress |
string |
|
NotStarted |
string |
|
Succeeded |
string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
IdentityType
The type of identity that creates/modifies resources
Name | Type | Description |
---|---|---|
application |
string |
|
key |
string |
|
managedIdentity |
string |
|
user |
string |
ResourceReference
Reference to another resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
SecurityPolicy
SecurityPolicy association for AzureFrontDoor profile
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
Resource name. |
properties.deploymentStatus | ||
properties.parameters | SecurityPolicyPropertiesParameters: |
object which contains security policy parameters |
properties.profileName |
string |
The name of the profile which holds the security policy. |
properties.provisioningState |
Provisioning status |
|
systemData |
Read only system data |
|
type |
string |
Resource type. |
SecurityPolicyWebApplicationFirewallAssociation
settings for security policy patterns to match
Name | Type | Description |
---|---|---|
domains |
List of domains. |
|
patternsToMatch |
string[] |
List of paths |
SecurityPolicyWebApplicationFirewallParameters
The json object containing security policy waf parameters
Name | Type | Description |
---|---|---|
associations |
Waf associations |
|
type |
string:
Web |
The type of the Security policy to create. |
wafPolicy |
Resource ID. |
SystemData
Read only system data
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC) |
createdBy |
string |
An identifier for the identity that created the resource |
createdByType |
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 |
The type of identity that last modified the resource |