-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Network-2018-02-01] DDoS Protection Plan resource #2567
Merged
anuchandy
merged 7 commits into
Azure:Network-2018-02-01
from
murilogr:dev_murocha_ddosProtectionPlan
Mar 13, 2018
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1a8f014
Initial version
murilogr 57ee8c0
Add eol
murilogr 917a892
Add extra property in example
murilogr a38173e
Add default values for fields
murilogr b224ae6
Rename operation IDs
murilogr 9a32d84
Make 'id' read-only for all network resources
murilogr 4fb4bf5
Revert "Make 'id' read-only for all network resources"
murilogr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
337 changes: 337 additions & 0 deletions
337
...tion/network/resource-manager/Microsoft.Network/stable/2018-02-01/ddosProtectionPlan.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "NetworkManagementClient", | ||
"description": "The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.", | ||
"version": "2018-02-01" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}": { | ||
"delete": { | ||
"tags": [ | ||
"DdosProtectionPlans" | ||
], | ||
"operationId": "DdosProtectionPlans_Delete", | ||
"description": "Deletes the specified DDoS protection plan.", | ||
"parameters": [ | ||
{ | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource group." | ||
}, | ||
{ | ||
"name": "ddosProtectionPlanName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the DDoS protection plan." | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"204": { | ||
"description": "Request successful. Resource does not exist." | ||
}, | ||
"202": { | ||
"description": "Accepted and the operation will complete asynchronously." | ||
}, | ||
"200": { | ||
"description": "Delete successful." | ||
} | ||
}, | ||
"x-ms-long-running-operation": true, | ||
"x-ms-examples": { | ||
"Delete DDoS protection plan": { | ||
"$ref": "./examples/DdosProtectionPlanDelete.json" | ||
} | ||
} | ||
}, | ||
"get": { | ||
"tags": [ | ||
"DdosProtectionPlans" | ||
], | ||
"operationId": "DdosProtectionPlans_Get", | ||
"description": "Gets information about the specified DDoS protection plan.", | ||
"parameters": [ | ||
{ | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource group." | ||
}, | ||
{ | ||
"name": "ddosProtectionPlanName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the DDoS protection plan." | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Request successful. The operation returns the specified DDoS protection plan resource.", | ||
"schema": { | ||
"$ref": "#/definitions/DdosProtectionPlan" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Get DDoS protection plan": { | ||
"$ref": "./examples/DdosProtectionPlanGet.json" | ||
} | ||
} | ||
}, | ||
"put": { | ||
"tags": [ | ||
"DdosProtectionPlans" | ||
], | ||
"operationId": "DdosProtectionPlans_CreateOrUpdate", | ||
"description": "Creates or updates a DDoS protection plan.", | ||
"parameters": [ | ||
{ | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource group." | ||
}, | ||
{ | ||
"name": "ddosProtectionPlanName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the DDoS protection plan." | ||
}, | ||
{ | ||
"name": "parameters", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/DdosProtectionPlan" | ||
}, | ||
"description": "Parameters supplied to the create or update operation." | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Create successful. The operation returns the resulting DDoS protection plan resource.", | ||
"schema": { | ||
"$ref": "#/definitions/DdosProtectionPlan" | ||
} | ||
}, | ||
"200": { | ||
"description": "Update successful. The operation returns the resulting DDoS protection plan resource.", | ||
"schema": { | ||
"$ref": "#/definitions/DdosProtectionPlan" | ||
} | ||
} | ||
}, | ||
"x-ms-long-running-operation": true, | ||
"x-ms-examples": { | ||
"Create DDoS protection plan": { | ||
"$ref": "./examples/DdosProtectionPlanCreate.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans": { | ||
"get": { | ||
"tags": [ | ||
"DdosProtectionPlans" | ||
], | ||
"operationId": "DdosProtectionPlans_List", | ||
"description": "Gets all DDoS protection plans in a subscription.", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Request successful. The operation returns a list of DDoS protection plan resources.", | ||
"schema": { | ||
"$ref": "#/definitions/DdosProtectionPlanListResult" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"List all DDoS protection plans": { | ||
"$ref": "./examples/DdosProtectionPlanListAll.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans": { | ||
"get": { | ||
"tags": [ | ||
"DdosProtectionPlans" | ||
], | ||
"operationId": "DdosProtectionPlans_ListByResourceGroup", | ||
"description": "Gets all the DDoS protection plans in a resource group.", | ||
"parameters": [ | ||
{ | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource group." | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Request successful. The operation returns a list of DDoS protection plan resources.", | ||
"schema": { | ||
"$ref": "#/definitions/DdosProtectionPlanListResult" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"List DDoS protection plans in resource group": { | ||
"$ref": "./examples/DdosProtectionPlanList.json" | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"DdosProtectionPlan": { | ||
"properties": { | ||
"properties": { | ||
"x-ms-client-flatten": true, | ||
"$ref": "#/definitions/DdosProtectionPlanPropertiesFormat", | ||
"description": "Properties of the DDoS protection plan." | ||
}, | ||
"etag": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "A unique read-only string that changes whenever the resource is updated." | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "./network.json#/definitions/Resource" | ||
} | ||
], | ||
"description": "A DDoS protection plan in a resource group." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems only properties we can set on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's correct |
||
}, | ||
"DdosProtectionPlanPropertiesFormat": { | ||
"properties": { | ||
"resourceGuid": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups." | ||
}, | ||
"provisioningState": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'." | ||
}, | ||
"virtualNetworks": { | ||
"readOnly": true, | ||
"type": "array", | ||
"items": { | ||
"$ref": "./network.json#/definitions/SubResource" | ||
}, | ||
"description": "The list of virtual networks associated with the DDoS protection plan resource. This list is read-only." | ||
} | ||
}, | ||
"description": "DDoS protection plan properties." | ||
}, | ||
"DdosProtectionPlanListResult": { | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/DdosProtectionPlan" | ||
}, | ||
"description": "A list of DDoS protection plans." | ||
}, | ||
"nextLink": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "The URL to get the next set of results." | ||
} | ||
}, | ||
"description": "A list of DDoS protection plans." | ||
} | ||
}, | ||
"parameters": { | ||
"SubscriptionIdParameter": { | ||
"name": "subscriptionId", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." | ||
}, | ||
"ApiVersionParameter": { | ||
"name": "api-version", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"description": "Client API version." | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...source-manager/Microsoft.Network/stable/2018-02-01/examples/DdosProtectionPlanCreate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-02-01", | ||
"subscriptionId": "subid", | ||
"resourceGroupName": "rg1", | ||
"ddosProtectionPlanName": "test-plan", | ||
"parameters": { | ||
"location": "westus", | ||
"properties": {} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"name": "test-plan", | ||
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosProtectionPlans/test-plan", | ||
"type": "Microsoft.Network/ddosProtectionPlans", | ||
"location": "westus", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"resourceGuid": "00000000-0000-0000-0000-000000000000", | ||
"virtualNetworks": [] | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"name": "test-plan", | ||
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosProtectionPlans/test-plan", | ||
"type": "Microsoft.Network/ddosProtectionPlans", | ||
"location": "westus", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"resourceGuid": "00000000-0000-0000-0000-000000000000", | ||
"virtualNetworks": [] | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...source-manager/Microsoft.Network/stable/2018-02-01/examples/DdosProtectionPlanDelete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-02-01", | ||
"subscriptionId": "subid", | ||
"resourceGroupName": "rg1", | ||
"ddosProtectionPlanName": "test-plan" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": {}, | ||
"204": {} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the response if one or more vnets are referencing ddpp? If they are referencing the dopp, but the enableddpp property is set to false?
@ravbhatnagar, when setting the ddpp property of a vnet to reference a ddpp considered a write operation on the ddpp from a RBAC perspective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple VNETs can be associated with a DdosProtectionPlan. EnableDdosProtection does not affect the relationship, it only depends on the plan to exist.
You can write only from the VNET side and you need to have permissions to write to the DdosProtectionPlan (you have if it's in the same subscription).