GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans?api-version=2023-05-01
URI Parameters
Name
In
Required
Type
Description
subscriptionId
path
True
string
The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Network/ddosProtectionPlans?api-version=2023-05-01
/** Samples for DdosProtectionPlans List. */
public final class Main {
/*
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/examples/DdosProtectionPlanListAll.json
*/
/**
* Sample code: List all DDoS protection plans.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void listAllDDoSProtectionPlans(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getDdosProtectionPlans().list(com.azure.core.util.Context.NONE);
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python ddos_protection_plan_list_all.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.ddos_protection_plans.list()
for item in response:
print(item)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/examples/DdosProtectionPlanListAll.json
if __name__ == "__main__":
main()
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-05-01/examples/DdosProtectionPlanListAll.json
// this example is just showing the usage of "DdosProtectionPlans_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "subid";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
await foreach (DdosProtectionPlanResource item in subscriptionResource.GetDdosProtectionPlansAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
DdosProtectionPlanData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
The list of public IPs associated with the DDoS protection plan resource. This list is read-only.
properties.resourceGuid
string
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.