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

com.pulumi.azurenative.cache.kotlin.AccessPolicyAssignmentArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cache.kotlin

import com.pulumi.azurenative.cache.AccessPolicyAssignmentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Response to an operation on access policy assignment
 * Azure REST API version: 2023-05-01-preview.
 * Other available API versions: 2023-08-01, 2024-03-01, 2024-04-01-preview, 2024-09-01-preview.
 * ## Example Usage
 * ### RedisCacheAccessPolicyAssignmentCreateUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var accessPolicyAssignment = new AzureNative.Cache.AccessPolicyAssignment("accessPolicyAssignment", new()
 *     {
 *         AccessPolicyAssignmentName = "accessPolicyAssignmentName1",
 *         AccessPolicyName = "accessPolicy1",
 *         CacheName = "cache1",
 *         ObjectId = "6497c918-11ad-41e7-1b0f-7c518a87d0b0",
 *         ObjectIdAlias = "TestAADAppRedis",
 *         ResourceGroupName = "rg1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	cache "github.com/pulumi/pulumi-azure-native-sdk/cache/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cache.NewAccessPolicyAssignment(ctx, "accessPolicyAssignment", &cache.AccessPolicyAssignmentArgs{
 * 			AccessPolicyAssignmentName: pulumi.String("accessPolicyAssignmentName1"),
 * 			AccessPolicyName:           pulumi.String("accessPolicy1"),
 * 			CacheName:                  pulumi.String("cache1"),
 * 			ObjectId:                   pulumi.String("6497c918-11ad-41e7-1b0f-7c518a87d0b0"),
 * 			ObjectIdAlias:              pulumi.String("TestAADAppRedis"),
 * 			ResourceGroupName:          pulumi.String("rg1"),
 * 		})
 * 		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.cache.AccessPolicyAssignment;
 * import com.pulumi.azurenative.cache.AccessPolicyAssignmentArgs;
 * 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 accessPolicyAssignment = new AccessPolicyAssignment("accessPolicyAssignment", AccessPolicyAssignmentArgs.builder()
 *             .accessPolicyAssignmentName("accessPolicyAssignmentName1")
 *             .accessPolicyName("accessPolicy1")
 *             .cacheName("cache1")
 *             .objectId("6497c918-11ad-41e7-1b0f-7c518a87d0b0")
 *             .objectIdAlias("TestAADAppRedis")
 *             .resourceGroupName("rg1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:cache:AccessPolicyAssignment accessPolicyAssignmentName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/accessPolicyAssignments/{accessPolicyAssignmentName}
 * ```
 * @property accessPolicyAssignmentName The name of the access policy assignment.
 * @property accessPolicyName The name of the access policy that is being assigned
 * @property cacheName The name of the Redis cache.
 * @property objectId Object Id to assign access policy to
 * @property objectIdAlias User friendly name for object id. Also represents username for token based authentication
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 */
public data class AccessPolicyAssignmentArgs(
    public val accessPolicyAssignmentName: Output? = null,
    public val accessPolicyName: Output? = null,
    public val cacheName: Output? = null,
    public val objectId: Output? = null,
    public val objectIdAlias: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cache.AccessPolicyAssignmentArgs =
        com.pulumi.azurenative.cache.AccessPolicyAssignmentArgs.builder()
            .accessPolicyAssignmentName(accessPolicyAssignmentName?.applyValue({ args0 -> args0 }))
            .accessPolicyName(accessPolicyName?.applyValue({ args0 -> args0 }))
            .cacheName(cacheName?.applyValue({ args0 -> args0 }))
            .objectId(objectId?.applyValue({ args0 -> args0 }))
            .objectIdAlias(objectIdAlias?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AccessPolicyAssignmentArgs].
 */
@PulumiTagMarker
public class AccessPolicyAssignmentArgsBuilder internal constructor() {
    private var accessPolicyAssignmentName: Output? = null

    private var accessPolicyName: Output? = null

    private var cacheName: Output? = null

    private var objectId: Output? = null

    private var objectIdAlias: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value The name of the access policy assignment.
     */
    @JvmName("msctqgycpxhchfnr")
    public suspend fun accessPolicyAssignmentName(`value`: Output) {
        this.accessPolicyAssignmentName = value
    }

    /**
     * @param value The name of the access policy that is being assigned
     */
    @JvmName("oyhiylvtmjmbpbqt")
    public suspend fun accessPolicyName(`value`: Output) {
        this.accessPolicyName = value
    }

    /**
     * @param value The name of the Redis cache.
     */
    @JvmName("nmpwhikgljbdecad")
    public suspend fun cacheName(`value`: Output) {
        this.cacheName = value
    }

    /**
     * @param value Object Id to assign access policy to
     */
    @JvmName("gengrqqlfonotdby")
    public suspend fun objectId(`value`: Output) {
        this.objectId = value
    }

    /**
     * @param value User friendly name for object id. Also represents username for token based authentication
     */
    @JvmName("cwccrmtxsmraeulj")
    public suspend fun objectIdAlias(`value`: Output) {
        this.objectIdAlias = value
    }

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

    /**
     * @param value The name of the access policy assignment.
     */
    @JvmName("mpidjptprolnphwx")
    public suspend fun accessPolicyAssignmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessPolicyAssignmentName = mapped
    }

    /**
     * @param value The name of the access policy that is being assigned
     */
    @JvmName("scymemfkhvaajikn")
    public suspend fun accessPolicyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessPolicyName = mapped
    }

    /**
     * @param value The name of the Redis cache.
     */
    @JvmName("rdcatokbiixjlwlu")
    public suspend fun cacheName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cacheName = mapped
    }

    /**
     * @param value Object Id to assign access policy to
     */
    @JvmName("oadiotuqtckrmtro")
    public suspend fun objectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectId = mapped
    }

    /**
     * @param value User friendly name for object id. Also represents username for token based authentication
     */
    @JvmName("ssfvrobwuhhsrfil")
    public suspend fun objectIdAlias(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectIdAlias = mapped
    }

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

    internal fun build(): AccessPolicyAssignmentArgs = AccessPolicyAssignmentArgs(
        accessPolicyAssignmentName = accessPolicyAssignmentName,
        accessPolicyName = accessPolicyName,
        cacheName = cacheName,
        objectId = objectId,
        objectIdAlias = objectIdAlias,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy