All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.paloalto.kotlin.LocalRulestackOutboundTrustCertificateAssociation.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@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

/**
 * Builder for [LocalRulestackOutboundTrustCertificateAssociation].
 */
@PulumiTagMarker
public class LocalRulestackOutboundTrustCertificateAssociationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: LocalRulestackOutboundTrustCertificateAssociationArgs =
        LocalRulestackOutboundTrustCertificateAssociationArgs()

    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 LocalRulestackOutboundTrustCertificateAssociationArgsBuilder.() -> Unit) {
        val builder = LocalRulestackOutboundTrustCertificateAssociationArgsBuilder()
        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(): LocalRulestackOutboundTrustCertificateAssociation {
        val builtJavaResource =
            com.pulumi.azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )

        return LocalRulestackOutboundTrustCertificateAssociation(builtJavaResource)
    }
}

/**
 * Manages a Palo Alto Networks Rulestack Outbound Trust Certificate Association.
 * ## 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 exampleLocalRulestackCertificate = new azure.paloalto.LocalRulestackCertificate("example", {
 *     name: "example",
 *     rulestackId: exampleLocalRulestack.id,
 *     selfSigned: true,
 * });
 * const exampleLocalRulestackOutboundTrustCertificateAssociation = new azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation("example", {certificateId: exampleLocalRulestackCertificate.id});
 * ```
 * ```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_certificate = azure.paloalto.LocalRulestackCertificate("example",
 *     name="example",
 *     rulestack_id=example_local_rulestack.id,
 *     self_signed=True)
 * example_local_rulestack_outbound_trust_certificate_association = azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation("example", certificate_id=example_local_rulestack_certificate.id)
 * ```
 * ```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 exampleLocalRulestackCertificate = new Azure.PaloAlto.LocalRulestackCertificate("example", new()
 *     {
 *         Name = "example",
 *         RulestackId = exampleLocalRulestack.Id,
 *         SelfSigned = true,
 *     });
 *     var exampleLocalRulestackOutboundTrustCertificateAssociation = new Azure.PaloAlto.LocalRulestackOutboundTrustCertificateAssociation("example", new()
 *     {
 *         CertificateId = exampleLocalRulestackCertificate.Id,
 *     });
 * });
 * ```
 * ```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
 * 		}
 * 		exampleLocalRulestackCertificate, err := paloalto.NewLocalRulestackCertificate(ctx, "example", &paloalto.LocalRulestackCertificateArgs{
 * 			Name:        pulumi.String("example"),
 * 			RulestackId: exampleLocalRulestack.ID(),
 * 			SelfSigned:  pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = paloalto.NewLocalRulestackOutboundTrustCertificateAssociation(ctx, "example", &paloalto.LocalRulestackOutboundTrustCertificateAssociationArgs{
 * 			CertificateId: exampleLocalRulestackCertificate.ID(),
 * 		})
 * 		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.LocalRulestackCertificate;
 * import com.pulumi.azure.paloalto.LocalRulestackCertificateArgs;
 * import com.pulumi.azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation;
 * import com.pulumi.azure.paloalto.LocalRulestackOutboundTrustCertificateAssociationArgs;
 * 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 exampleLocalRulestackCertificate = new LocalRulestackCertificate("exampleLocalRulestackCertificate", LocalRulestackCertificateArgs.builder()
 *             .name("example")
 *             .rulestackId(exampleLocalRulestack.id())
 *             .selfSigned(true)
 *             .build());
 *         var exampleLocalRulestackOutboundTrustCertificateAssociation = new LocalRulestackOutboundTrustCertificateAssociation("exampleLocalRulestackOutboundTrustCertificateAssociation", LocalRulestackOutboundTrustCertificateAssociationArgs.builder()
 *             .certificateId(exampleLocalRulestackCertificate.id())
 *             .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}
 *   exampleLocalRulestackCertificate:
 *     type: azure:paloalto:LocalRulestackCertificate
 *     name: example
 *     properties:
 *       name: example
 *       rulestackId: ${exampleLocalRulestack.id}
 *       selfSigned: true
 *   exampleLocalRulestackOutboundTrustCertificateAssociation:
 *     type: azure:paloalto:LocalRulestackOutboundTrustCertificateAssociation
 *     name: example
 *     properties:
 *       certificateId: ${exampleLocalRulestackCertificate.id}
 * ```
 * 
 */
public class LocalRulestackOutboundTrustCertificateAssociation internal constructor(
    override val javaResource:
    com.pulumi.azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation,
) : KotlinCustomResource(javaResource, LocalRulestackOutboundTrustCertificateAssociationMapper) {
    /**
     * The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
     */
    public val certificateId: Output
        get() = javaResource.certificateId().applyValue({ args0 -> args0 })
}

public object LocalRulestackOutboundTrustCertificateAssociationMapper :
    ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation::class == javaResource::class

    override fun map(javaResource: Resource): LocalRulestackOutboundTrustCertificateAssociation =
        LocalRulestackOutboundTrustCertificateAssociation(
            javaResource as
                com.pulumi.azure.paloalto.LocalRulestackOutboundTrustCertificateAssociation,
        )
}

/**
 * @see [LocalRulestackOutboundTrustCertificateAssociation].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [LocalRulestackOutboundTrustCertificateAssociation].
 */
public suspend fun localRulestackOutboundTrustCertificateAssociation(
    name: String,
    block: suspend LocalRulestackOutboundTrustCertificateAssociationResourceBuilder.() -> Unit,
):
    LocalRulestackOutboundTrustCertificateAssociation {
    val builder = LocalRulestackOutboundTrustCertificateAssociationResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [LocalRulestackOutboundTrustCertificateAssociation].
 * @param name The _unique_ name of the resulting resource.
 */
public fun localRulestackOutboundTrustCertificateAssociation(name: String):
    LocalRulestackOutboundTrustCertificateAssociation {
    val builder = LocalRulestackOutboundTrustCertificateAssociationResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy