All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.network.kotlin.DdosProtectionPlanArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.network.kotlin
import com.pulumi.azure.network.DdosProtectionPlanArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an AzureNetwork DDoS Protection Plan.
* > **NOTE** Azure only allows `one` DDoS Protection Plan per region.
* > **NOTE** The DDoS Protection Plan is a [high-cost service](https://azure.microsoft.com/en-us/pricing/details/ddos-protection/#pricing). Please keep this in mind while testing and learning.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleDdosProtectionPlan = new azure.network.DdosProtectionPlan("example", {
* name: "example-protection-plan",
* location: example.location,
* resourceGroupName: example.name,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_ddos_protection_plan = azure.network.DdosProtectionPlan("example",
* name="example-protection-plan",
* location=example.location,
* resource_group_name=example.name)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleDdosProtectionPlan = new Azure.Network.DdosProtectionPlan("example", new()
* {
* Name = "example-protection-plan",
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = network.NewDdosProtectionPlan(ctx, "example", &network.DdosProtectionPlanArgs{
* Name: pulumi.String("example-protection-plan"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.network.DdosProtectionPlan;
* import com.pulumi.azure.network.DdosProtectionPlanArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleDdosProtectionPlan = new DdosProtectionPlan("exampleDdosProtectionPlan", DdosProtectionPlanArgs.builder()
* .name("example-protection-plan")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleDdosProtectionPlan:
* type: azure:network:DdosProtectionPlan
* name: example
* properties:
* name: example-protection-plan
* location: ${example.location}
* resourceGroupName: ${example.name}
* ```
*
* ## Import
* Azure DDoS Protection Plan can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:network/ddosProtectionPlan:DdosProtectionPlan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/ddosProtectionPlans/testddospplan
* ```
* @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* @property name Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
* @property tags A mapping of tags to assign to the resource.
*/
public data class DdosProtectionPlanArgs(
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.network.DdosProtectionPlanArgs =
com.pulumi.azure.network.DdosProtectionPlanArgs.builder()
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [DdosProtectionPlanArgs].
*/
@PulumiTagMarker
public class DdosProtectionPlanArgsBuilder internal constructor() {
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("odkytjclmrdoaocf")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.
*/
@JvmName("ttlnnisxhfmgjujr")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("mldlclfipchjbyor")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("rpbfyqfejhpqliga")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*/
@JvmName("ewalsvldsohtxoaj")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created.
*/
@JvmName("gxpmytmkwthjuqhe")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("oduidydmdvfpgrbp")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A mapping of tags to assign to the resource.
*/
@JvmName("krpdcctcpbyieret")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags to assign to the resource.
*/
@JvmName("snylwticakuoidpn")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): DdosProtectionPlanArgs = DdosProtectionPlanArgs(
location = location,
name = name,
resourceGroupName = resourceGroupName,
tags = tags,
)
}