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

com.pulumi.azurenative.apimanagement.kotlin.PrivateEndpointConnectionByNameArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.apimanagement.kotlin

import com.pulumi.azurenative.apimanagement.PrivateEndpointConnectionByNameArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.PrivateEndpointConnectionRequestPropertiesArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.PrivateEndpointConnectionRequestPropertiesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * The Private Endpoint Connection resource.
 * Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2021-04-01-preview.
 * Other available API versions: 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
 * ## Example Usage
 * ### ApiManagementApproveOrRejectPrivateEndpointConnection
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var privateEndpointConnectionByName = new AzureNative.ApiManagement.PrivateEndpointConnectionByName("privateEndpointConnectionByName", new()
 *     {
 *         Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName",
 *         PrivateEndpointConnectionName = "privateEndpointConnectionName",
 *         Properties = new AzureNative.ApiManagement.Inputs.PrivateEndpointConnectionRequestPropertiesArgs
 *         {
 *             PrivateLinkServiceConnectionState = new AzureNative.ApiManagement.Inputs.PrivateLinkServiceConnectionStateArgs
 *             {
 *                 Description = "The Private Endpoint Connection is approved.",
 *                 Status = AzureNative.ApiManagement.PrivateEndpointServiceConnectionStatus.Approved,
 *             },
 *         },
 *         ResourceGroupName = "rg1",
 *         ServiceName = "apimService1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apimanagement.NewPrivateEndpointConnectionByName(ctx, "privateEndpointConnectionByName", &apimanagement.PrivateEndpointConnectionByNameArgs{
 * 			Id:                            pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName"),
 * 			PrivateEndpointConnectionName: pulumi.String("privateEndpointConnectionName"),
 * 			Properties: &apimanagement.PrivateEndpointConnectionRequestPropertiesArgs{
 * 				PrivateLinkServiceConnectionState: &apimanagement.PrivateLinkServiceConnectionStateArgs{
 * 					Description: pulumi.String("The Private Endpoint Connection is approved."),
 * 					Status:      pulumi.String(apimanagement.PrivateEndpointServiceConnectionStatusApproved),
 * 				},
 * 			},
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			ServiceName:       pulumi.String("apimService1"),
 * 		})
 * 		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.azurenative.apimanagement.PrivateEndpointConnectionByName;
 * import com.pulumi.azurenative.apimanagement.PrivateEndpointConnectionByNameArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.PrivateEndpointConnectionRequestPropertiesArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.PrivateLinkServiceConnectionStateArgs;
 * 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 privateEndpointConnectionByName = new PrivateEndpointConnectionByName("privateEndpointConnectionByName", PrivateEndpointConnectionByNameArgs.builder()
 *             .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName")
 *             .privateEndpointConnectionName("privateEndpointConnectionName")
 *             .properties(PrivateEndpointConnectionRequestPropertiesArgs.builder()
 *                 .privateLinkServiceConnectionState(PrivateLinkServiceConnectionStateArgs.builder()
 *                     .description("The Private Endpoint Connection is approved.")
 *                     .status("Approved")
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rg1")
 *             .serviceName("apimService1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:apimanagement:PrivateEndpointConnectionByName privateEndpointConnectionName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}
 * ```
 * @property id Private Endpoint Connection Resource Id.
 * @property privateEndpointConnectionName Name of the private endpoint connection.
 * @property properties The connection state of the private endpoint connection.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property serviceName The name of the API Management service.
 */
public data class PrivateEndpointConnectionByNameArgs(
    public val id: Output? = null,
    public val privateEndpointConnectionName: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val serviceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.apimanagement.PrivateEndpointConnectionByNameArgs =
        com.pulumi.azurenative.apimanagement.PrivateEndpointConnectionByNameArgs.builder()
            .id(id?.applyValue({ args0 -> args0 }))
            .privateEndpointConnectionName(privateEndpointConnectionName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PrivateEndpointConnectionByNameArgs].
 */
@PulumiTagMarker
public class PrivateEndpointConnectionByNameArgsBuilder internal constructor() {
    private var id: Output? = null

    private var privateEndpointConnectionName: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var serviceName: Output? = null

    /**
     * @param value Private Endpoint Connection Resource Id.
     */
    @JvmName("mwgdexqehknfhbtx")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value Name of the private endpoint connection.
     */
    @JvmName("mkryprmtxforlops")
    public suspend fun privateEndpointConnectionName(`value`: Output) {
        this.privateEndpointConnectionName = value
    }

    /**
     * @param value The connection state of the private endpoint connection.
     */
    @JvmName("ggcimlnimdpgshji")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("adninvtfawbsiwiy")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the API Management service.
     */
    @JvmName("iwfmntedvlyxgtqr")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value Private Endpoint Connection Resource Id.
     */
    @JvmName("iusgdpionvuxcxph")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value Name of the private endpoint connection.
     */
    @JvmName("jgoubsccoocsvdti")
    public suspend fun privateEndpointConnectionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateEndpointConnectionName = mapped
    }

    /**
     * @param value The connection state of the private endpoint connection.
     */
    @JvmName("aguxunxsubolqncc")
    public suspend fun properties(`value`: PrivateEndpointConnectionRequestPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument The connection state of the private endpoint connection.
     */
    @JvmName("pjivynlmculmgrgm")
    public suspend fun properties(argument: suspend PrivateEndpointConnectionRequestPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = PrivateEndpointConnectionRequestPropertiesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("ehytjviwjifaxwpf")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The name of the API Management service.
     */
    @JvmName("iaoctiyqnfvaoicx")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    internal fun build(): PrivateEndpointConnectionByNameArgs = PrivateEndpointConnectionByNameArgs(
        id = id,
        privateEndpointConnectionName = privateEndpointConnectionName,
        properties = properties,
        resourceGroupName = resourceGroupName,
        serviceName = serviceName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy