com.pulumi.azure.paloalto.kotlin.LocalRulestackPrefixList.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.paloalto.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [LocalRulestackPrefixList].
*/
@PulumiTagMarker
public class LocalRulestackPrefixListResourceBuilder internal constructor() {
public var name: String? = null
public var args: LocalRulestackPrefixListArgs = LocalRulestackPrefixListArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend LocalRulestackPrefixListArgsBuilder.() -> Unit) {
val builder = LocalRulestackPrefixListArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): LocalRulestackPrefixList {
val builtJavaResource =
com.pulumi.azure.paloalto.LocalRulestackPrefixList(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LocalRulestackPrefixList(builtJavaResource)
}
}
/**
* Manages a Palo Alto Local Rulestack Prefix List.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "rg-example",
* location: "West Europe",
* });
* const exampleLocalRulestack = new azure.paloalto.LocalRulestack("example", {
* name: "example",
* resourceGroupName: example.name,
* location: example.location,
* });
* const exampleLocalRulestackPrefixList = new azure.paloalto.LocalRulestackPrefixList("example", {
* name: "example",
* rulestackId: exampleLocalRulestack.id,
* prefixLists: ["10.0.1.0/24"],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="rg-example",
* location="West Europe")
* example_local_rulestack = azure.paloalto.LocalRulestack("example",
* name="example",
* resource_group_name=example.name,
* location=example.location)
* example_local_rulestack_prefix_list = azure.paloalto.LocalRulestackPrefixList("example",
* name="example",
* rulestack_id=example_local_rulestack.id,
* prefix_lists=["10.0.1.0/24"])
* ```
* ```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 = "rg-example",
* Location = "West Europe",
* });
* var exampleLocalRulestack = new Azure.PaloAlto.LocalRulestack("example", new()
* {
* Name = "example",
* ResourceGroupName = example.Name,
* Location = example.Location,
* });
* var exampleLocalRulestackPrefixList = new Azure.PaloAlto.LocalRulestackPrefixList("example", new()
* {
* Name = "example",
* RulestackId = exampleLocalRulestack.Id,
* PrefixLists = new[]
* {
* "10.0.1.0/24",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/paloalto"
* "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("rg-example"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
* Name: pulumi.String("example"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* })
* if err != nil {
* return err
* }
* _, err = paloalto.NewLocalRulestackPrefixList(ctx, "example", &paloalto.LocalRulestackPrefixListArgs{
* Name: pulumi.String("example"),
* RulestackId: exampleLocalRulestack.ID(),
* PrefixLists: pulumi.StringArray{
* pulumi.String("10.0.1.0/24"),
* },
* })
* 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.paloalto.LocalRulestack;
* import com.pulumi.azure.paloalto.LocalRulestackArgs;
* import com.pulumi.azure.paloalto.LocalRulestackPrefixList;
* import com.pulumi.azure.paloalto.LocalRulestackPrefixListArgs;
* 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("rg-example")
* .location("West Europe")
* .build());
* var exampleLocalRulestack = new LocalRulestack("exampleLocalRulestack", LocalRulestackArgs.builder()
* .name("example")
* .resourceGroupName(example.name())
* .location(example.location())
* .build());
* var exampleLocalRulestackPrefixList = new LocalRulestackPrefixList("exampleLocalRulestackPrefixList", LocalRulestackPrefixListArgs.builder()
* .name("example")
* .rulestackId(exampleLocalRulestack.id())
* .prefixLists("10.0.1.0/24")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: rg-example
* location: West Europe
* exampleLocalRulestack:
* type: azure:paloalto:LocalRulestack
* name: example
* properties:
* name: example
* resourceGroupName: ${example.name}
* location: ${example.location}
* exampleLocalRulestackPrefixList:
* type: azure:paloalto:LocalRulestackPrefixList
* name: example
* properties:
* name: example
* rulestackId: ${exampleLocalRulestack.id}
* prefixLists:
* - 10.0.1.0/24
* ```
*
* ## Import
* Palo Alto Local Rulestack Prefix Lists can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:paloalto/localRulestackPrefixList:LocalRulestackPrefixList example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack/prefixLists/myFQDNList1
* ```
*/
public class LocalRulestackPrefixList internal constructor(
override val javaResource: com.pulumi.azure.paloalto.LocalRulestackPrefixList,
) : KotlinCustomResource(javaResource, LocalRulestackPrefixListMapper) {
/**
* The comment for Audit purposes.
*/
public val auditComment: Output?
get() = javaResource.auditComment().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The description for the Prefix List.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name which should be used for this Palo Alto Local Rulestack Prefix List.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Specifies a list of Prefixes.
*/
public val prefixLists: Output>
get() = javaResource.prefixLists().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
*/
public val rulestackId: Output
get() = javaResource.rulestackId().applyValue({ args0 -> args0 })
}
public object LocalRulestackPrefixListMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.paloalto.LocalRulestackPrefixList::class == javaResource::class
override fun map(javaResource: Resource): LocalRulestackPrefixList =
LocalRulestackPrefixList(javaResource as com.pulumi.azure.paloalto.LocalRulestackPrefixList)
}
/**
* @see [LocalRulestackPrefixList].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [LocalRulestackPrefixList].
*/
public suspend fun localRulestackPrefixList(
name: String,
block: suspend LocalRulestackPrefixListResourceBuilder.() -> Unit,
): LocalRulestackPrefixList {
val builder = LocalRulestackPrefixListResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [LocalRulestackPrefixList].
* @param name The _unique_ name of the resulting resource.
*/
public fun localRulestackPrefixList(name: String): LocalRulestackPrefixList {
val builder = LocalRulestackPrefixListResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy