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

com.pulumi.gcp.privilegedaccessmanager.kotlin.EntitlementArgs.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.privilegedaccessmanager.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.privilegedaccessmanager.EntitlementArgs.builder
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementAdditionalNotificationTargetsArgs
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementAdditionalNotificationTargetsArgsBuilder
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementApprovalWorkflowArgs
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementApprovalWorkflowArgsBuilder
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementEligibleUserArgs
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementEligibleUserArgsBuilder
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementPrivilegedAccessArgs
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementPrivilegedAccessArgsBuilder
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementRequesterJustificationConfigArgs
import com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementRequesterJustificationConfigArgsBuilder
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.collections.List
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ### Privileged Access Manager Entitlement Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const tfentitlement = new gcp.privilegedaccessmanager.Entitlement("tfentitlement", {
 *     entitlementId: "example-entitlement",
 *     location: "global",
 *     maxRequestDuration: "43200s",
 *     parent: "projects/my-project-name",
 *     requesterJustificationConfig: {
 *         unstructured: {},
 *     },
 *     eligibleUsers: [{
 *         principals: ["group:test@google.com"],
 *     }],
 *     privilegedAccess: {
 *         gcpIamAccess: {
 *             roleBindings: [{
 *                 role: "roles/storage.admin",
 *                 conditionExpression: "request.time < timestamp(\"2024-04-23T18:30:00.000Z\")",
 *             }],
 *             resource: "//cloudresourcemanager.googleapis.com/projects/my-project-name",
 *             resourceType: "cloudresourcemanager.googleapis.com/Project",
 *         },
 *     },
 *     additionalNotificationTargets: {
 *         adminEmailRecipients: ["user@example.com"],
 *         requesterEmailRecipients: ["user@example.com"],
 *     },
 *     approvalWorkflow: {
 *         manualApprovals: {
 *             requireApproverJustification: true,
 *             steps: [{
 *                 approvalsNeeded: 1,
 *                 approverEmailRecipients: ["user@example.com"],
 *                 approvers: {
 *                     principals: ["group:test@google.com"],
 *                 },
 *             }],
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * tfentitlement = gcp.privilegedaccessmanager.Entitlement("tfentitlement",
 *     entitlement_id="example-entitlement",
 *     location="global",
 *     max_request_duration="43200s",
 *     parent="projects/my-project-name",
 *     requester_justification_config=gcp.privilegedaccessmanager.EntitlementRequesterJustificationConfigArgs(
 *         unstructured=gcp.privilegedaccessmanager.EntitlementRequesterJustificationConfigUnstructuredArgs(),
 *     ),
 *     eligible_users=[gcp.privilegedaccessmanager.EntitlementEligibleUserArgs(
 *         principals=["group:test@google.com"],
 *     )],
 *     privileged_access=gcp.privilegedaccessmanager.EntitlementPrivilegedAccessArgs(
 *         gcp_iam_access=gcp.privilegedaccessmanager.EntitlementPrivilegedAccessGcpIamAccessArgs(
 *             role_bindings=[gcp.privilegedaccessmanager.EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgs(
 *                 role="roles/storage.admin",
 *                 condition_expression="request.time < timestamp(\"2024-04-23T18:30:00.000Z\")",
 *             )],
 *             resource="//cloudresourcemanager.googleapis.com/projects/my-project-name",
 *             resource_type="cloudresourcemanager.googleapis.com/Project",
 *         ),
 *     ),
 *     additional_notification_targets=gcp.privilegedaccessmanager.EntitlementAdditionalNotificationTargetsArgs(
 *         admin_email_recipients=["user@example.com"],
 *         requester_email_recipients=["user@example.com"],
 *     ),
 *     approval_workflow=gcp.privilegedaccessmanager.EntitlementApprovalWorkflowArgs(
 *         manual_approvals=gcp.privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsArgs(
 *             require_approver_justification=True,
 *             steps=[gcp.privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsStepArgs(
 *                 approvals_needed=1,
 *                 approver_email_recipients=["user@example.com"],
 *                 approvers=gcp.privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsStepApproversArgs(
 *                     principals=["group:test@google.com"],
 *                 ),
 *             )],
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var tfentitlement = new Gcp.PrivilegedAccessManager.Entitlement("tfentitlement", new()
 *     {
 *         EntitlementId = "example-entitlement",
 *         Location = "global",
 *         MaxRequestDuration = "43200s",
 *         Parent = "projects/my-project-name",
 *         RequesterJustificationConfig = new Gcp.PrivilegedAccessManager.Inputs.EntitlementRequesterJustificationConfigArgs
 *         {
 *             Unstructured = null,
 *         },
 *         EligibleUsers = new[]
 *         {
 *             new Gcp.PrivilegedAccessManager.Inputs.EntitlementEligibleUserArgs
 *             {
 *                 Principals = new[]
 *                 {
 *                     "group:[email protected]",
 *                 },
 *             },
 *         },
 *         PrivilegedAccess = new Gcp.PrivilegedAccessManager.Inputs.EntitlementPrivilegedAccessArgs
 *         {
 *             GcpIamAccess = new Gcp.PrivilegedAccessManager.Inputs.EntitlementPrivilegedAccessGcpIamAccessArgs
 *             {
 *                 RoleBindings = new[]
 *                 {
 *                     new Gcp.PrivilegedAccessManager.Inputs.EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgs
 *                     {
 *                         Role = "roles/storage.admin",
 *                         ConditionExpression = "request.time < timestamp(\"2024-04-23T18:30:00.000Z\")",
 *                     },
 *                 },
 *                 Resource = "//cloudresourcemanager.googleapis.com/projects/my-project-name",
 *                 ResourceType = "cloudresourcemanager.googleapis.com/Project",
 *             },
 *         },
 *         AdditionalNotificationTargets = new Gcp.PrivilegedAccessManager.Inputs.EntitlementAdditionalNotificationTargetsArgs
 *         {
 *             AdminEmailRecipients = new[]
 *             {
 *                 "[email protected]",
 *             },
 *             RequesterEmailRecipients = new[]
 *             {
 *                 "[email protected]",
 *             },
 *         },
 *         ApprovalWorkflow = new Gcp.PrivilegedAccessManager.Inputs.EntitlementApprovalWorkflowArgs
 *         {
 *             ManualApprovals = new Gcp.PrivilegedAccessManager.Inputs.EntitlementApprovalWorkflowManualApprovalsArgs
 *             {
 *                 RequireApproverJustification = true,
 *                 Steps = new[]
 *                 {
 *                     new Gcp.PrivilegedAccessManager.Inputs.EntitlementApprovalWorkflowManualApprovalsStepArgs
 *                     {
 *                         ApprovalsNeeded = 1,
 *                         ApproverEmailRecipients = new[]
 *                         {
 *                             "[email protected]",
 *                         },
 *                         Approvers = new Gcp.PrivilegedAccessManager.Inputs.EntitlementApprovalWorkflowManualApprovalsStepApproversArgs
 *                         {
 *                             Principals = new[]
 *                             {
 *                                 "group:[email protected]",
 *                             },
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/privilegedaccessmanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := privilegedaccessmanager.Newentitlement(ctx, "tfentitlement", &privilegedaccessmanager.entitlementArgs{
 * 			EntitlementId:      pulumi.String("example-entitlement"),
 * 			Location:           pulumi.String("global"),
 * 			MaxRequestDuration: pulumi.String("43200s"),
 * 			Parent:             pulumi.String("projects/my-project-name"),
 * 			RequesterJustificationConfig: &privilegedaccessmanager.EntitlementRequesterJustificationConfigArgs{
 * 				Unstructured: nil,
 * 			},
 * 			EligibleUsers: privilegedaccessmanager.EntitlementEligibleUserArray{
 * 				&privilegedaccessmanager.EntitlementEligibleUserArgs{
 * 					Principals: pulumi.StringArray{
 * 						pulumi.String("group:[email protected]"),
 * 					},
 * 				},
 * 			},
 * 			PrivilegedAccess: &privilegedaccessmanager.EntitlementPrivilegedAccessArgs{
 * 				GcpIamAccess: &privilegedaccessmanager.EntitlementPrivilegedAccessGcpIamAccessArgs{
 * 					RoleBindings: privilegedaccessmanager.EntitlementPrivilegedAccessGcpIamAccessRoleBindingArray{
 * 						&privilegedaccessmanager.EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgs{
 * 							Role:                pulumi.String("roles/storage.admin"),
 * 							ConditionExpression: pulumi.String("request.time < timestamp(\"2024-04-23T18:30:00.000Z\")"),
 * 						},
 * 					},
 * 					Resource:     pulumi.String("//cloudresourcemanager.googleapis.com/projects/my-project-name"),
 * 					ResourceType: pulumi.String("cloudresourcemanager.googleapis.com/Project"),
 * 				},
 * 			},
 * 			AdditionalNotificationTargets: &privilegedaccessmanager.EntitlementAdditionalNotificationTargetsArgs{
 * 				AdminEmailRecipients: pulumi.StringArray{
 * 					pulumi.String("[email protected]"),
 * 				},
 * 				RequesterEmailRecipients: pulumi.StringArray{
 * 					pulumi.String("[email protected]"),
 * 				},
 * 			},
 * 			ApprovalWorkflow: &privilegedaccessmanager.EntitlementApprovalWorkflowArgs{
 * 				ManualApprovals: &privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsArgs{
 * 					RequireApproverJustification: pulumi.Bool(true),
 * 					Steps: privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsStepArray{
 * 						&privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsStepArgs{
 * 							ApprovalsNeeded: pulumi.Int(1),
 * 							ApproverEmailRecipients: pulumi.StringArray{
 * 								pulumi.String("[email protected]"),
 * 							},
 * 							Approvers: &privilegedaccessmanager.EntitlementApprovalWorkflowManualApprovalsStepApproversArgs{
 * 								Principals: pulumi.StringArray{
 * 									pulumi.String("group:[email protected]"),
 * 								},
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.gcp.privilegedaccessmanager.entitlement;
 * import com.pulumi.gcp.privilegedaccessmanager.EntitlementArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementRequesterJustificationConfigArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementRequesterJustificationConfigUnstructuredArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementEligibleUserArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementPrivilegedAccessArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementPrivilegedAccessGcpIamAccessArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementAdditionalNotificationTargetsArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementApprovalWorkflowArgs;
 * import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementApprovalWorkflowManualApprovalsArgs;
 * 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 tfentitlement = new Entitlement("tfentitlement", EntitlementArgs.builder()
 *             .entitlementId("example-entitlement")
 *             .location("global")
 *             .maxRequestDuration("43200s")
 *             .parent("projects/my-project-name")
 *             .requesterJustificationConfig(EntitlementRequesterJustificationConfigArgs.builder()
 *                 .unstructured()
 *                 .build())
 *             .eligibleUsers(EntitlementEligibleUserArgs.builder()
 *                 .principals("group:[email protected]")
 *                 .build())
 *             .privilegedAccess(EntitlementPrivilegedAccessArgs.builder()
 *                 .gcpIamAccess(EntitlementPrivilegedAccessGcpIamAccessArgs.builder()
 *                     .roleBindings(EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgs.builder()
 *                         .role("roles/storage.admin")
 *                         .conditionExpression("request.time < timestamp(\"2024-04-23T18:30:00.000Z\")")
 *                         .build())
 *                     .resource("//cloudresourcemanager.googleapis.com/projects/my-project-name")
 *                     .resourceType("cloudresourcemanager.googleapis.com/Project")
 *                     .build())
 *                 .build())
 *             .additionalNotificationTargets(EntitlementAdditionalNotificationTargetsArgs.builder()
 *                 .adminEmailRecipients("[email protected]")
 *                 .requesterEmailRecipients("[email protected]")
 *                 .build())
 *             .approvalWorkflow(EntitlementApprovalWorkflowArgs.builder()
 *                 .manualApprovals(EntitlementApprovalWorkflowManualApprovalsArgs.builder()
 *                     .requireApproverJustification(true)
 *                     .steps(EntitlementApprovalWorkflowManualApprovalsStepArgs.builder()
 *                         .approvalsNeeded(1)
 *                         .approverEmailRecipients("[email protected]")
 *                         .approvers(EntitlementApprovalWorkflowManualApprovalsStepApproversArgs.builder()
 *                             .principals("group:[email protected]")
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   tfentitlement:
 *     type: gcp:privilegedaccessmanager:entitlement
 *     properties:
 *       entitlementId: example-entitlement
 *       location: global
 *       maxRequestDuration: 43200s
 *       parent: projects/my-project-name
 *       requesterJustificationConfig:
 *         unstructured: {}
 *       eligibleUsers:
 *         - principals:
 *             - group:[email protected]
 *       privilegedAccess:
 *         gcpIamAccess:
 *           roleBindings:
 *             - role: roles/storage.admin
 *               conditionExpression: request.time < timestamp("2024-04-23T18:30:00.000Z")
 *           resource: //cloudresourcemanager.googleapis.com/projects/my-project-name
 *           resourceType: cloudresourcemanager.googleapis.com/Project
 *       additionalNotificationTargets:
 *         adminEmailRecipients:
 *           - [email protected]
 *         requesterEmailRecipients:
 *           - [email protected]
 *       approvalWorkflow:
 *         manualApprovals:
 *           requireApproverJustification: true
 *           steps:
 *             - approvalsNeeded: 1
 *               approverEmailRecipients:
 *                 - [email protected]
 *               approvers:
 *                 principals:
 *                   - group:[email protected]
 * ```
 * 
 * ## Import
 * Entitlement can be imported using any of these accepted formats:
 * * `{{parent}}/locations/{{location}}/entitlements/{{entitlement_id}}`
 * When using the `pulumi import` command, Entitlement can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:privilegedaccessmanager/entitlement:entitlement default {{parent}}/locations/{{location}}/entitlements/{{entitlement_id}}
 * ```
 * @property additionalNotificationTargets AdditionalNotificationTargets includes email addresses to be notified.
 * @property approvalWorkflow The approvals needed before access will be granted to a requester. No approvals will be needed if this field is null.
 * Different types of approval workflows that can be used to gate privileged access granting.
 * @property eligibleUsers Who can create Grants using Entitlement. This list should contain at most one entry
 * Structure is documented below.
 * @property entitlementId The ID to use for this Entitlement. This will become the last part of the resource name.
 * This value should be 4-63 characters, and valid characters are "[a-z]", "[0-9]", and "-". The first character should be from [a-z].
 * This value should be unique among all other Entitlements under the specified `parent`.
 * @property location The region of the Entitlement resource.
 * @property maxRequestDuration The maximum amount of time for which access would be granted for a request.
 * A requester can choose to ask for access for less than this duration but never more.
 * Format: calculate the time in seconds and concatenate it with 's' i.e. 2 hours = "7200s", 45 minutes = "2700s"
 * @property parent Format: project/{project_id} or organization/{organization_number} or folder/{folder_number}
 * @property privilegedAccess Privileged access that this service can be used to gate.
 * Structure is documented below.
 * @property requesterJustificationConfig Defines the ways in which a requester should provide the justification while requesting for access.
 * Structure is documented below.
 */
public data class EntitlementArgs(
    public val additionalNotificationTargets: Output? =
        null,
    public val approvalWorkflow: Output? = null,
    public val eligibleUsers: Output>? = null,
    public val entitlementId: Output? = null,
    public val location: Output? = null,
    public val maxRequestDuration: Output? = null,
    public val parent: Output? = null,
    public val privilegedAccess: Output? = null,
    public val requesterJustificationConfig: Output? =
        null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.privilegedaccessmanager.EntitlementArgs =
        com.pulumi.gcp.privilegedaccessmanager.EntitlementArgs.builder()
            .additionalNotificationTargets(
                additionalNotificationTargets?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .approvalWorkflow(approvalWorkflow?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .eligibleUsers(
                eligibleUsers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .entitlementId(entitlementId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .maxRequestDuration(maxRequestDuration?.applyValue({ args0 -> args0 }))
            .parent(parent?.applyValue({ args0 -> args0 }))
            .privilegedAccess(privilegedAccess?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .requesterJustificationConfig(
                requesterJustificationConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            ).build()
}

/**
 * Builder for [EntitlementArgs].
 */
@PulumiTagMarker
public class EntitlementArgsBuilder internal constructor() {
    private var additionalNotificationTargets: Output? =
        null

    private var approvalWorkflow: Output? = null

    private var eligibleUsers: Output>? = null

    private var entitlementId: Output? = null

    private var location: Output? = null

    private var maxRequestDuration: Output? = null

    private var parent: Output? = null

    private var privilegedAccess: Output? = null

    private var requesterJustificationConfig: Output? =
        null

    /**
     * @param value AdditionalNotificationTargets includes email addresses to be notified.
     */
    @JvmName("ollsjjgxgedjeois")
    public suspend fun additionalNotificationTargets(`value`: Output) {
        this.additionalNotificationTargets = value
    }

    /**
     * @param value The approvals needed before access will be granted to a requester. No approvals will be needed if this field is null.
     * Different types of approval workflows that can be used to gate privileged access granting.
     */
    @JvmName("qreclxvtxdthbrfa")
    public suspend fun approvalWorkflow(`value`: Output) {
        this.approvalWorkflow = value
    }

    /**
     * @param value Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("aocchvijbbyhifhs")
    public suspend fun eligibleUsers(`value`: Output>) {
        this.eligibleUsers = value
    }

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

    /**
     * @param values Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("enwlpyxrdaeffiqo")
    public suspend fun eligibleUsers(values: List>) {
        this.eligibleUsers = Output.all(values)
    }

    /**
     * @param value The ID to use for this Entitlement. This will become the last part of the resource name.
     * This value should be 4-63 characters, and valid characters are "[a-z]", "[0-9]", and "-". The first character should be from [a-z].
     * This value should be unique among all other Entitlements under the specified `parent`.
     */
    @JvmName("syteulxqvskxijrw")
    public suspend fun entitlementId(`value`: Output) {
        this.entitlementId = value
    }

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

    /**
     * @param value The maximum amount of time for which access would be granted for a request.
     * A requester can choose to ask for access for less than this duration but never more.
     * Format: calculate the time in seconds and concatenate it with 's' i.e. 2 hours = "7200s", 45 minutes = "2700s"
     */
    @JvmName("fjsnqisbqpwhmwlj")
    public suspend fun maxRequestDuration(`value`: Output) {
        this.maxRequestDuration = value
    }

    /**
     * @param value Format: project/{project_id} or organization/{organization_number} or folder/{folder_number}
     */
    @JvmName("mcoaytovcfpajxij")
    public suspend fun parent(`value`: Output) {
        this.parent = value
    }

    /**
     * @param value Privileged access that this service can be used to gate.
     * Structure is documented below.
     */
    @JvmName("tiiupljqcyjojwoy")
    public suspend fun privilegedAccess(`value`: Output) {
        this.privilegedAccess = value
    }

    /**
     * @param value Defines the ways in which a requester should provide the justification while requesting for access.
     * Structure is documented below.
     */
    @JvmName("ghbyxyvqiicylwdk")
    public suspend fun requesterJustificationConfig(`value`: Output) {
        this.requesterJustificationConfig = value
    }

    /**
     * @param value AdditionalNotificationTargets includes email addresses to be notified.
     */
    @JvmName("tgarhgcysgtaapoq")
    public suspend fun additionalNotificationTargets(`value`: EntitlementAdditionalNotificationTargetsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalNotificationTargets = mapped
    }

    /**
     * @param argument AdditionalNotificationTargets includes email addresses to be notified.
     */
    @JvmName("lhawsmbxfdxhctbi")
    public suspend fun additionalNotificationTargets(argument: suspend EntitlementAdditionalNotificationTargetsArgsBuilder.() -> Unit) {
        val toBeMapped = EntitlementAdditionalNotificationTargetsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.additionalNotificationTargets = mapped
    }

    /**
     * @param value The approvals needed before access will be granted to a requester. No approvals will be needed if this field is null.
     * Different types of approval workflows that can be used to gate privileged access granting.
     */
    @JvmName("tmsjjjdkccofbjkp")
    public suspend fun approvalWorkflow(`value`: EntitlementApprovalWorkflowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvalWorkflow = mapped
    }

    /**
     * @param argument The approvals needed before access will be granted to a requester. No approvals will be needed if this field is null.
     * Different types of approval workflows that can be used to gate privileged access granting.
     */
    @JvmName("hjmbielwxnugekxq")
    public suspend fun approvalWorkflow(argument: suspend EntitlementApprovalWorkflowArgsBuilder.() -> Unit) {
        val toBeMapped = EntitlementApprovalWorkflowArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.approvalWorkflow = mapped
    }

    /**
     * @param value Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("ahnilwayaohybmeq")
    public suspend fun eligibleUsers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eligibleUsers = mapped
    }

    /**
     * @param argument Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("jeommgjkxltyvkqy")
    public suspend fun eligibleUsers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EntitlementEligibleUserArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.eligibleUsers = mapped
    }

    /**
     * @param argument Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("bmuhrvhdgkbjnvcx")
    public suspend fun eligibleUsers(vararg argument: suspend EntitlementEligibleUserArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EntitlementEligibleUserArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.eligibleUsers = mapped
    }

    /**
     * @param argument Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("bppkasyetbxktucv")
    public suspend fun eligibleUsers(argument: suspend EntitlementEligibleUserArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EntitlementEligibleUserArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.eligibleUsers = mapped
    }

    /**
     * @param values Who can create Grants using Entitlement. This list should contain at most one entry
     * Structure is documented below.
     */
    @JvmName("lpaqsuwgpoapiien")
    public suspend fun eligibleUsers(vararg values: EntitlementEligibleUserArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eligibleUsers = mapped
    }

    /**
     * @param value The ID to use for this Entitlement. This will become the last part of the resource name.
     * This value should be 4-63 characters, and valid characters are "[a-z]", "[0-9]", and "-". The first character should be from [a-z].
     * This value should be unique among all other Entitlements under the specified `parent`.
     */
    @JvmName("jaojjcdfcexixgvf")
    public suspend fun entitlementId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.entitlementId = mapped
    }

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

    /**
     * @param value The maximum amount of time for which access would be granted for a request.
     * A requester can choose to ask for access for less than this duration but never more.
     * Format: calculate the time in seconds and concatenate it with 's' i.e. 2 hours = "7200s", 45 minutes = "2700s"
     */
    @JvmName("obnleuixbapvhrpf")
    public suspend fun maxRequestDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxRequestDuration = mapped
    }

    /**
     * @param value Format: project/{project_id} or organization/{organization_number} or folder/{folder_number}
     */
    @JvmName("magbdvqgfvcepiws")
    public suspend fun parent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parent = mapped
    }

    /**
     * @param value Privileged access that this service can be used to gate.
     * Structure is documented below.
     */
    @JvmName("hifswtoteyrndtrd")
    public suspend fun privilegedAccess(`value`: EntitlementPrivilegedAccessArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privilegedAccess = mapped
    }

    /**
     * @param argument Privileged access that this service can be used to gate.
     * Structure is documented below.
     */
    @JvmName("nphhtuovffbwthxj")
    public suspend fun privilegedAccess(argument: suspend EntitlementPrivilegedAccessArgsBuilder.() -> Unit) {
        val toBeMapped = EntitlementPrivilegedAccessArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.privilegedAccess = mapped
    }

    /**
     * @param value Defines the ways in which a requester should provide the justification while requesting for access.
     * Structure is documented below.
     */
    @JvmName("nemsrohtthmgsasy")
    public suspend fun requesterJustificationConfig(`value`: EntitlementRequesterJustificationConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requesterJustificationConfig = mapped
    }

    /**
     * @param argument Defines the ways in which a requester should provide the justification while requesting for access.
     * Structure is documented below.
     */
    @JvmName("qldxvowxqsqgxmms")
    public suspend fun requesterJustificationConfig(argument: suspend EntitlementRequesterJustificationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = EntitlementRequesterJustificationConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.requesterJustificationConfig = mapped
    }

    internal fun build(): EntitlementArgs = EntitlementArgs(
        additionalNotificationTargets = additionalNotificationTargets,
        approvalWorkflow = approvalWorkflow,
        eligibleUsers = eligibleUsers,
        entitlementId = entitlementId,
        location = location,
        maxRequestDuration = maxRequestDuration,
        parent = parent,
        privilegedAccess = privilegedAccess,
        requesterJustificationConfig = requesterJustificationConfig,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy