Skip to content
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
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
Copy link
Member

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?

Copy link
Author

@murilogr murilogr Mar 9, 2018

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).

"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."
Copy link
Member

@anuchandy anuchandy Mar 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems only properties we can set on DdosProtectionPlan are location and name and tags. Just trying confirm my understanding.

Copy link
Author

Choose a reason for hiding this comment

The 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."
}
}
}
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": []
}
}
}
}
}
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": {}
}
}
Loading