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

com.pulumi.azurenative.authorization.kotlin.ScopeAccessReviewHistoryDefinitionByIdArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.authorization.kotlin

import com.pulumi.azurenative.authorization.ScopeAccessReviewHistoryDefinitionByIdArgs.builder
import com.pulumi.azurenative.authorization.kotlin.enums.AccessReviewRecurrenceRangeType
import com.pulumi.azurenative.authorization.kotlin.enums.AccessReviewResult
import com.pulumi.azurenative.authorization.kotlin.inputs.AccessReviewHistoryInstanceArgs
import com.pulumi.azurenative.authorization.kotlin.inputs.AccessReviewHistoryInstanceArgsBuilder
import com.pulumi.azurenative.authorization.kotlin.inputs.AccessReviewScopeArgs
import com.pulumi.azurenative.authorization.kotlin.inputs.AccessReviewScopeArgsBuilder
import com.pulumi.core.Either
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Access Review History Definition.
 * Azure REST API version: 2021-12-01-preview. Prior API version in Azure Native 1.x: 2021-12-01-preview.
 * ## Example Usage
 * ### PutAccessReviewHistoryDefinition
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var scopeAccessReviewHistoryDefinitionById = new AzureNative.Authorization.ScopeAccessReviewHistoryDefinitionById("scopeAccessReviewHistoryDefinitionById", new()
 *     {
 *         HistoryDefinitionId = "44724910-d7a5-4c29-b28f-db73e717165a",
 *         Scope = "subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := authorization.NewScopeAccessReviewHistoryDefinitionById(ctx, "scopeAccessReviewHistoryDefinitionById", &authorization.ScopeAccessReviewHistoryDefinitionByIdArgs{
 * 			HistoryDefinitionId: pulumi.String("44724910-d7a5-4c29-b28f-db73e717165a"),
 * 			Scope:               pulumi.String("subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a"),
 * 		})
 * 		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.authorization.ScopeAccessReviewHistoryDefinitionById;
 * import com.pulumi.azurenative.authorization.ScopeAccessReviewHistoryDefinitionByIdArgs;
 * 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 scopeAccessReviewHistoryDefinitionById = new ScopeAccessReviewHistoryDefinitionById("scopeAccessReviewHistoryDefinitionById", ScopeAccessReviewHistoryDefinitionByIdArgs.builder()
 *             .historyDefinitionId("44724910-d7a5-4c29-b28f-db73e717165a")
 *             .scope("subscriptions/129a304b-4aea-4b86-a9f7-ba7e2b23737a")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:authorization:ScopeAccessReviewHistoryDefinitionById 44724910-d7a5-4c29-b28f-db73e717165a /{scope}/providers/Microsoft.Authorization/accessReviewHistoryDefinitions/{historyDefinitionId}
 * ```
 * @property decisions Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied the data will only contain review results in which the decision maker approved or denied a review request.
 * @property displayName The display name for the history definition.
 * @property endDate The DateTime when the review is scheduled to end. Required if type is endDate
 * @property historyDefinitionId The id of the access review history definition.
 * @property instances Set of access review history instances for this history definition.
 * @property interval The interval for recurrence. For a quarterly review, the interval is 3 for type : absoluteMonthly.
 * @property numberOfOccurrences The number of times to repeat the access review. Required and must be positive if type is numbered.
 * @property scope The scope of the resource.
 * @property scopes A collection of scopes used when selecting review history data
 * @property startDate The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create.
 * @property type The recurrence range type. The possible values are: endDate, noEnd, numbered.
 */
public data class ScopeAccessReviewHistoryDefinitionByIdArgs(
    public val decisions: Output>>? = null,
    public val displayName: Output? = null,
    public val endDate: Output? = null,
    public val historyDefinitionId: Output? = null,
    public val instances: Output>? = null,
    public val interval: Output? = null,
    public val numberOfOccurrences: Output? = null,
    public val scope: Output? = null,
    public val scopes: Output>? = null,
    public val startDate: Output? = null,
    public val type: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.authorization.ScopeAccessReviewHistoryDefinitionByIdArgs =
        com.pulumi.azurenative.authorization.ScopeAccessReviewHistoryDefinitionByIdArgs.builder()
            .decisions(
                decisions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .endDate(endDate?.applyValue({ args0 -> args0 }))
            .historyDefinitionId(historyDefinitionId?.applyValue({ args0 -> args0 }))
            .instances(
                instances?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .interval(interval?.applyValue({ args0 -> args0 }))
            .numberOfOccurrences(numberOfOccurrences?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0 }))
            .scopes(scopes?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .startDate(startDate?.applyValue({ args0 -> args0 }))
            .type(
                type?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ScopeAccessReviewHistoryDefinitionByIdArgs].
 */
@PulumiTagMarker
public class ScopeAccessReviewHistoryDefinitionByIdArgsBuilder internal constructor() {
    private var decisions: Output>>? = null

    private var displayName: Output? = null

    private var endDate: Output? = null

    private var historyDefinitionId: Output? = null

    private var instances: Output>? = null

    private var interval: Output? = null

    private var numberOfOccurrences: Output? = null

    private var scope: Output? = null

    private var scopes: Output>? = null

    private var startDate: Output? = null

    private var type: Output>? = null

    /**
     * @param value Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied the data will only contain review results in which the decision maker approved or denied a review request.
     */
    @JvmName("bevggotafwrouert")
    public suspend fun decisions(`value`: Output>>) {
        this.decisions = value
    }

    @JvmName("xevtobyhxoesvbyd")
    public suspend fun decisions(vararg values: Output>) {
        this.decisions = Output.all(values.asList())
    }

    /**
     * @param values Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied the data will only contain review results in which the decision maker approved or denied a review request.
     */
    @JvmName("gmrwjhkkktritjsf")
    public suspend fun decisions(values: List>>) {
        this.decisions = Output.all(values)
    }

    /**
     * @param value The display name for the history definition.
     */
    @JvmName("feqwmwfjbnyrpsac")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The DateTime when the review is scheduled to end. Required if type is endDate
     */
    @JvmName("gdkroghxvulltrsl")
    public suspend fun endDate(`value`: Output) {
        this.endDate = value
    }

    /**
     * @param value The id of the access review history definition.
     */
    @JvmName("mqppumjwbxyfmctc")
    public suspend fun historyDefinitionId(`value`: Output) {
        this.historyDefinitionId = value
    }

    /**
     * @param value Set of access review history instances for this history definition.
     */
    @JvmName("scxhmvrreyfxcraf")
    public suspend fun instances(`value`: Output>) {
        this.instances = value
    }

    @JvmName("tgkljanmdqkoydmv")
    public suspend fun instances(vararg values: Output) {
        this.instances = Output.all(values.asList())
    }

    /**
     * @param values Set of access review history instances for this history definition.
     */
    @JvmName("lbngduaclwgasvlq")
    public suspend fun instances(values: List>) {
        this.instances = Output.all(values)
    }

    /**
     * @param value The interval for recurrence. For a quarterly review, the interval is 3 for type : absoluteMonthly.
     */
    @JvmName("ojlbklgtwstpqlrw")
    public suspend fun interval(`value`: Output) {
        this.interval = value
    }

    /**
     * @param value The number of times to repeat the access review. Required and must be positive if type is numbered.
     */
    @JvmName("ricieysetbxxvgaa")
    public suspend fun numberOfOccurrences(`value`: Output) {
        this.numberOfOccurrences = value
    }

    /**
     * @param value The scope of the resource.
     */
    @JvmName("acdtyxuuvbjkobyu")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value A collection of scopes used when selecting review history data
     */
    @JvmName("msbblapdavtklugv")
    public suspend fun scopes(`value`: Output>) {
        this.scopes = value
    }

    @JvmName("llvviybqdhwhsbwr")
    public suspend fun scopes(vararg values: Output) {
        this.scopes = Output.all(values.asList())
    }

    /**
     * @param values A collection of scopes used when selecting review history data
     */
    @JvmName("ossolunfxkpicfxo")
    public suspend fun scopes(values: List>) {
        this.scopes = Output.all(values)
    }

    /**
     * @param value The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create.
     */
    @JvmName("srickrranlsmkdag")
    public suspend fun startDate(`value`: Output) {
        this.startDate = value
    }

    /**
     * @param value The recurrence range type. The possible values are: endDate, noEnd, numbered.
     */
    @JvmName("dptsmqbecopqwjgp")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied the data will only contain review results in which the decision maker approved or denied a review request.
     */
    @JvmName("yelnbwqtininrjrj")
    public suspend fun decisions(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.decisions = mapped
    }

    /**
     * @param values Collection of review decisions which the history data should be filtered on. For example if Approve and Deny are supplied the data will only contain review results in which the decision maker approved or denied a review request.
     */
    @JvmName("idykgbcyhsstxsnw")
    public suspend fun decisions(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.decisions = mapped
    }

    /**
     * @param value The display name for the history definition.
     */
    @JvmName("minwyiyeklemcihr")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The DateTime when the review is scheduled to end. Required if type is endDate
     */
    @JvmName("qdjakvdtcxrypmng")
    public suspend fun endDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endDate = mapped
    }

    /**
     * @param value The id of the access review history definition.
     */
    @JvmName("kmmifeypqlrslfws")
    public suspend fun historyDefinitionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.historyDefinitionId = mapped
    }

    /**
     * @param value Set of access review history instances for this history definition.
     */
    @JvmName("btmracpyiutevaim")
    public suspend fun instances(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instances = mapped
    }

    /**
     * @param argument Set of access review history instances for this history definition.
     */
    @JvmName("cpkuhwllwsxvhvon")
    public suspend fun instances(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccessReviewHistoryInstanceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.instances = mapped
    }

    /**
     * @param argument Set of access review history instances for this history definition.
     */
    @JvmName("kbjvubjditkbrhro")
    public suspend fun instances(vararg argument: suspend AccessReviewHistoryInstanceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessReviewHistoryInstanceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.instances = mapped
    }

    /**
     * @param argument Set of access review history instances for this history definition.
     */
    @JvmName("awitwgahturdefvo")
    public suspend fun instances(argument: suspend AccessReviewHistoryInstanceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccessReviewHistoryInstanceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.instances = mapped
    }

    /**
     * @param values Set of access review history instances for this history definition.
     */
    @JvmName("cockhvjypxswsjac")
    public suspend fun instances(vararg values: AccessReviewHistoryInstanceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instances = mapped
    }

    /**
     * @param value The interval for recurrence. For a quarterly review, the interval is 3 for type : absoluteMonthly.
     */
    @JvmName("pxtqdjmgtrjryfjw")
    public suspend fun interval(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interval = mapped
    }

    /**
     * @param value The number of times to repeat the access review. Required and must be positive if type is numbered.
     */
    @JvmName("dpigadryrpiviqkp")
    public suspend fun numberOfOccurrences(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numberOfOccurrences = mapped
    }

    /**
     * @param value The scope of the resource.
     */
    @JvmName("amhcvpmxxdyjmmmu")
    public suspend fun scope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value A collection of scopes used when selecting review history data
     */
    @JvmName("vrfqbtkmauojklxx")
    public suspend fun scopes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    /**
     * @param argument A collection of scopes used when selecting review history data
     */
    @JvmName("yvbjnqlxmgpffndu")
    public suspend fun scopes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccessReviewScopeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.scopes = mapped
    }

    /**
     * @param argument A collection of scopes used when selecting review history data
     */
    @JvmName("pfbgdpajoainspoc")
    public suspend fun scopes(vararg argument: suspend AccessReviewScopeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessReviewScopeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.scopes = mapped
    }

    /**
     * @param argument A collection of scopes used when selecting review history data
     */
    @JvmName("witcuqqoedxrstwj")
    public suspend fun scopes(argument: suspend AccessReviewScopeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccessReviewScopeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.scopes = mapped
    }

    /**
     * @param values A collection of scopes used when selecting review history data
     */
    @JvmName("buesvenntshqgrml")
    public suspend fun scopes(vararg values: AccessReviewScopeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    /**
     * @param value The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create.
     */
    @JvmName("ofmpekwehxdxqfni")
    public suspend fun startDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startDate = mapped
    }

    /**
     * @param value The recurrence range type. The possible values are: endDate, noEnd, numbered.
     */
    @JvmName("ygsdewxcqubhvflw")
    public suspend fun type(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The recurrence range type. The possible values are: endDate, noEnd, numbered.
     */
    @JvmName("xykyqcviogpbmvsb")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The recurrence range type. The possible values are: endDate, noEnd, numbered.
     */
    @JvmName("phosofrgutmctkft")
    public fun type(`value`: AccessReviewRecurrenceRangeType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ScopeAccessReviewHistoryDefinitionByIdArgs =
        ScopeAccessReviewHistoryDefinitionByIdArgs(
            decisions = decisions,
            displayName = displayName,
            endDate = endDate,
            historyDefinitionId = historyDefinitionId,
            instances = instances,
            interval = interval,
            numberOfOccurrences = numberOfOccurrences,
            scope = scope,
            scopes = scopes,
            startDate = startDate,
            type = type,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy