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

com.pulumi.azure.pim.kotlin.ActiveRoleAssignmentArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.pim.kotlin

import com.pulumi.azure.pim.ActiveRoleAssignmentArgs.builder
import com.pulumi.azure.pim.kotlin.inputs.ActiveRoleAssignmentScheduleArgs
import com.pulumi.azure.pim.kotlin.inputs.ActiveRoleAssignmentScheduleArgsBuilder
import com.pulumi.azure.pim.kotlin.inputs.ActiveRoleAssignmentTicketArgs
import com.pulumi.azure.pim.kotlin.inputs.ActiveRoleAssignmentTicketArgsBuilder
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

/**
 * Manages a PIM Active Role Assignment.
 * ## Example Usage
 * ### Subscription)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as time from "@pulumiverse/time";
 * const primary = azure.core.getSubscription({});
 * const example = azure.core.getClientConfig({});
 * const exampleGetRoleDefinition = azure.authorization.getRoleDefinition({
 *     name: "Reader",
 * });
 * const exampleStatic = new time.Static("example", {});
 * const exampleActiveRoleAssignment = new azure.pim.ActiveRoleAssignment("example", {
 *     scope: primary.then(primary => primary.id),
 *     roleDefinitionId: Promise.all([primary, exampleGetRoleDefinition]).then(([primary, exampleGetRoleDefinition]) => `${primary.id}${exampleGetRoleDefinition.id}`),
 *     principalId: example.then(example => example.objectId),
 *     schedule: {
 *         startDateTime: exampleStatic.rfc3339,
 *         expiration: {
 *             durationHours: 8,
 *         },
 *     },
 *     justification: "Expiration Duration Set",
 *     ticket: {
 *         number: "1",
 *         system: "example ticket system",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumiverse_time as time
 * primary = azure.core.get_subscription()
 * example = azure.core.get_client_config()
 * example_get_role_definition = azure.authorization.get_role_definition(name="Reader")
 * example_static = time.Static("example")
 * example_active_role_assignment = azure.pim.ActiveRoleAssignment("example",
 *     scope=primary.id,
 *     role_definition_id=f"{primary.id}{example_get_role_definition.id}",
 *     principal_id=example.object_id,
 *     schedule={
 *         "start_date_time": example_static.rfc3339,
 *         "expiration": {
 *             "duration_hours": 8,
 *         },
 *     },
 *     justification="Expiration Duration Set",
 *     ticket={
 *         "number": "1",
 *         "system": "example ticket system",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * using Time = Pulumiverse.Time;
 * return await Deployment.RunAsync(() =>
 * {
 *     var primary = Azure.Core.GetSubscription.Invoke();
 *     var example = Azure.Core.GetClientConfig.Invoke();
 *     var exampleGetRoleDefinition = Azure.Authorization.GetRoleDefinition.Invoke(new()
 *     {
 *         Name = "Reader",
 *     });
 *     var exampleStatic = new Time.Static("example");
 *     var exampleActiveRoleAssignment = new Azure.Pim.ActiveRoleAssignment("example", new()
 *     {
 *         Scope = primary.Apply(getSubscriptionResult => getSubscriptionResult.Id),
 *         RoleDefinitionId = Output.Tuple(primary, exampleGetRoleDefinition).Apply(values =>
 *         {
 *             var primary = values.Item1;
 *             var exampleGetRoleDefinition = values.Item2;
 *             return $"{primary.Apply(getSubscriptionResult => getSubscriptionResult.Id)}{exampleGetRoleDefinition.Apply(getRoleDefinitionResult => getRoleDefinitionResult.Id)}";
 *         }),
 *         PrincipalId = example.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
 *         Schedule = new Azure.Pim.Inputs.ActiveRoleAssignmentScheduleArgs
 *         {
 *             StartDateTime = exampleStatic.Rfc3339,
 *             Expiration = new Azure.Pim.Inputs.ActiveRoleAssignmentScheduleExpirationArgs
 *             {
 *                 DurationHours = 8,
 *             },
 *         },
 *         Justification = "Expiration Duration Set",
 *         Ticket = new Azure.Pim.Inputs.ActiveRoleAssignmentTicketArgs
 *         {
 *             Number = "1",
 *             System = "example ticket system",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/pim"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * 	"github.com/pulumiverse/pulumi-time/sdk/go/time"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		primary, err := core.LookupSubscription(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		example, err := core.GetClientConfig(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
 * 			Name: pulumi.StringRef("Reader"),
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleStatic, err := time.NewStatic(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = pim.NewActiveRoleAssignment(ctx, "example", &pim.ActiveRoleAssignmentArgs{
 * 			Scope:            pulumi.String(primary.Id),
 * 			RoleDefinitionId: pulumi.Sprintf("%v%v", primary.Id, exampleGetRoleDefinition.Id),
 * 			PrincipalId:      pulumi.String(example.ObjectId),
 * 			Schedule: &pim.ActiveRoleAssignmentScheduleArgs{
 * 				StartDateTime: exampleStatic.Rfc3339,
 * 				Expiration: &pim.ActiveRoleAssignmentScheduleExpirationArgs{
 * 					DurationHours: pulumi.Int(8),
 * 				},
 * 			},
 * 			Justification: pulumi.String("Expiration Duration Set"),
 * 			Ticket: &pim.ActiveRoleAssignmentTicketArgs{
 * 				Number: pulumi.String("1"),
 * 				System: pulumi.String("example ticket system"),
 * 			},
 * 		})
 * 		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.CoreFunctions;
 * import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
 * import com.pulumi.azure.authorization.AuthorizationFunctions;
 * import com.pulumi.azure.authorization.inputs.GetRoleDefinitionArgs;
 * import com.pulumi.time.Static;
 * import com.pulumi.azure.pim.ActiveRoleAssignment;
 * import com.pulumi.azure.pim.ActiveRoleAssignmentArgs;
 * import com.pulumi.azure.pim.inputs.ActiveRoleAssignmentScheduleArgs;
 * import com.pulumi.azure.pim.inputs.ActiveRoleAssignmentScheduleExpirationArgs;
 * import com.pulumi.azure.pim.inputs.ActiveRoleAssignmentTicketArgs;
 * 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) {
 *         final var primary = CoreFunctions.getSubscription();
 *         final var example = CoreFunctions.getClientConfig();
 *         final var exampleGetRoleDefinition = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
 *             .name("Reader")
 *             .build());
 *         var exampleStatic = new Static("exampleStatic");
 *         var exampleActiveRoleAssignment = new ActiveRoleAssignment("exampleActiveRoleAssignment", ActiveRoleAssignmentArgs.builder()
 *             .scope(primary.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
 *             .roleDefinitionId(String.format("%s%s", primary.applyValue(getSubscriptionResult -> getSubscriptionResult.id()),exampleGetRoleDefinition.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.id())))
 *             .principalId(example.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
 *             .schedule(ActiveRoleAssignmentScheduleArgs.builder()
 *                 .startDateTime(exampleStatic.rfc3339())
 *                 .expiration(ActiveRoleAssignmentScheduleExpirationArgs.builder()
 *                     .durationHours(8)
 *                     .build())
 *                 .build())
 *             .justification("Expiration Duration Set")
 *             .ticket(ActiveRoleAssignmentTicketArgs.builder()
 *                 .number("1")
 *                 .system("example ticket system")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleStatic:
 *     type: time:Static
 *     name: example
 *   exampleActiveRoleAssignment:
 *     type: azure:pim:ActiveRoleAssignment
 *     name: example
 *     properties:
 *       scope: ${primary.id}
 *       roleDefinitionId: ${primary.id}${exampleGetRoleDefinition.id}
 *       principalId: ${example.objectId}
 *       schedule:
 *         startDateTime: ${exampleStatic.rfc3339}
 *         expiration:
 *           durationHours: 8
 *       justification: Expiration Duration Set
 *       ticket:
 *         number: '1'
 *         system: example ticket system
 * variables:
 *   primary:
 *     fn::invoke:
 *       Function: azure:core:getSubscription
 *       Arguments: {}
 *   example:
 *     fn::invoke:
 *       Function: azure:core:getClientConfig
 *       Arguments: {}
 *   exampleGetRoleDefinition:
 *     fn::invoke:
 *       Function: azure:authorization:getRoleDefinition
 *       Arguments:
 *         name: Reader
 * ```
 * 
 * ### Management Group)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as time from "@pulumiverse/time";
 * const example = azure.core.getClientConfig({});
 * const exampleGetRoleDefinition = azure.authorization.getRoleDefinition({
 *     name: "Reader",
 * });
 * const exampleGroup = new azure.management.Group("example", {name: "Example-Management-Group"});
 * const exampleStatic = new time.Static("example", {});
 * const exampleActiveRoleAssignment = new azure.pim.ActiveRoleAssignment("example", {
 *     scope: exampleGroup.id,
 *     roleDefinitionId: exampleGetRoleDefinition.then(exampleGetRoleDefinition => exampleGetRoleDefinition.id),
 *     principalId: example.then(example => example.objectId),
 *     schedule: {
 *         startDateTime: exampleStatic.rfc3339,
 *         expiration: {
 *             durationHours: 8,
 *         },
 *     },
 *     justification: "Expiration Duration Set",
 *     ticket: {
 *         number: "1",
 *         system: "example ticket system",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumiverse_time as time
 * example = azure.core.get_client_config()
 * example_get_role_definition = azure.authorization.get_role_definition(name="Reader")
 * example_group = azure.management.Group("example", name="Example-Management-Group")
 * example_static = time.Static("example")
 * example_active_role_assignment = azure.pim.ActiveRoleAssignment("example",
 *     scope=example_group.id,
 *     role_definition_id=example_get_role_definition.id,
 *     principal_id=example.object_id,
 *     schedule={
 *         "start_date_time": example_static.rfc3339,
 *         "expiration": {
 *             "duration_hours": 8,
 *         },
 *     },
 *     justification="Expiration Duration Set",
 *     ticket={
 *         "number": "1",
 *         "system": "example ticket system",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * using Time = Pulumiverse.Time;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = Azure.Core.GetClientConfig.Invoke();
 *     var exampleGetRoleDefinition = Azure.Authorization.GetRoleDefinition.Invoke(new()
 *     {
 *         Name = "Reader",
 *     });
 *     var exampleGroup = new Azure.Management.Group("example", new()
 *     {
 *         Name = "Example-Management-Group",
 *     });
 *     var exampleStatic = new Time.Static("example");
 *     var exampleActiveRoleAssignment = new Azure.Pim.ActiveRoleAssignment("example", new()
 *     {
 *         Scope = exampleGroup.Id,
 *         RoleDefinitionId = exampleGetRoleDefinition.Apply(getRoleDefinitionResult => getRoleDefinitionResult.Id),
 *         PrincipalId = example.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
 *         Schedule = new Azure.Pim.Inputs.ActiveRoleAssignmentScheduleArgs
 *         {
 *             StartDateTime = exampleStatic.Rfc3339,
 *             Expiration = new Azure.Pim.Inputs.ActiveRoleAssignmentScheduleExpirationArgs
 *             {
 *                 DurationHours = 8,
 *             },
 *         },
 *         Justification = "Expiration Duration Set",
 *         Ticket = new Azure.Pim.Inputs.ActiveRoleAssignmentTicketArgs
 *         {
 *             Number = "1",
 *             System = "example ticket system",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/pim"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * 	"github.com/pulumiverse/pulumi-time/sdk/go/time"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.GetClientConfig(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
 * 			Name: pulumi.StringRef("Reader"),
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleGroup, err := management.NewGroup(ctx, "example", &management.GroupArgs{
 * 			Name: pulumi.String("Example-Management-Group"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleStatic, err := time.NewStatic(ctx, "example", nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = pim.NewActiveRoleAssignment(ctx, "example", &pim.ActiveRoleAssignmentArgs{
 * 			Scope:            exampleGroup.ID(),
 * 			RoleDefinitionId: pulumi.String(exampleGetRoleDefinition.Id),
 * 			PrincipalId:      pulumi.String(example.ObjectId),
 * 			Schedule: &pim.ActiveRoleAssignmentScheduleArgs{
 * 				StartDateTime: exampleStatic.Rfc3339,
 * 				Expiration: &pim.ActiveRoleAssignmentScheduleExpirationArgs{
 * 					DurationHours: pulumi.Int(8),
 * 				},
 * 			},
 * 			Justification: pulumi.String("Expiration Duration Set"),
 * 			Ticket: &pim.ActiveRoleAssignmentTicketArgs{
 * 				Number: pulumi.String("1"),
 * 				System: pulumi.String("example ticket system"),
 * 			},
 * 		})
 * 		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.CoreFunctions;
 * import com.pulumi.azure.authorization.AuthorizationFunctions;
 * import com.pulumi.azure.authorization.inputs.GetRoleDefinitionArgs;
 * import com.pulumi.azure.management.Group;
 * import com.pulumi.azure.management.GroupArgs;
 * import com.pulumi.time.Static;
 * import com.pulumi.azure.pim.ActiveRoleAssignment;
 * import com.pulumi.azure.pim.ActiveRoleAssignmentArgs;
 * import com.pulumi.azure.pim.inputs.ActiveRoleAssignmentScheduleArgs;
 * import com.pulumi.azure.pim.inputs.ActiveRoleAssignmentScheduleExpirationArgs;
 * import com.pulumi.azure.pim.inputs.ActiveRoleAssignmentTicketArgs;
 * 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) {
 *         final var example = CoreFunctions.getClientConfig();
 *         final var exampleGetRoleDefinition = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
 *             .name("Reader")
 *             .build());
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .name("Example-Management-Group")
 *             .build());
 *         var exampleStatic = new Static("exampleStatic");
 *         var exampleActiveRoleAssignment = new ActiveRoleAssignment("exampleActiveRoleAssignment", ActiveRoleAssignmentArgs.builder()
 *             .scope(exampleGroup.id())
 *             .roleDefinitionId(exampleGetRoleDefinition.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.id()))
 *             .principalId(example.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
 *             .schedule(ActiveRoleAssignmentScheduleArgs.builder()
 *                 .startDateTime(exampleStatic.rfc3339())
 *                 .expiration(ActiveRoleAssignmentScheduleExpirationArgs.builder()
 *                     .durationHours(8)
 *                     .build())
 *                 .build())
 *             .justification("Expiration Duration Set")
 *             .ticket(ActiveRoleAssignmentTicketArgs.builder()
 *                 .number("1")
 *                 .system("example ticket system")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleGroup:
 *     type: azure:management:Group
 *     name: example
 *     properties:
 *       name: Example-Management-Group
 *   exampleStatic:
 *     type: time:Static
 *     name: example
 *   exampleActiveRoleAssignment:
 *     type: azure:pim:ActiveRoleAssignment
 *     name: example
 *     properties:
 *       scope: ${exampleGroup.id}
 *       roleDefinitionId: ${exampleGetRoleDefinition.id}
 *       principalId: ${example.objectId}
 *       schedule:
 *         startDateTime: ${exampleStatic.rfc3339}
 *         expiration:
 *           durationHours: 8
 *       justification: Expiration Duration Set
 *       ticket:
 *         number: '1'
 *         system: example ticket system
 * variables:
 *   example:
 *     fn::invoke:
 *       Function: azure:core:getClientConfig
 *       Arguments: {}
 *   exampleGetRoleDefinition:
 *     fn::invoke:
 *       Function: azure:authorization:getRoleDefinition
 *       Arguments:
 *         name: Reader
 * ```
 * 
 * ## Import
 * PIM Active Role Assignments can be imported using the following composite resource ID, e.g.
 * ```sh
 * $ pulumi import azure:pim/activeRoleAssignment:ActiveRoleAssignment example /subscriptions/00000000-0000-0000-0000-000000000000|/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000
 * ```
 * @property justification The justification for the role assignment. Changing this forces a new resource to be created.
 * @property principalId Object ID of the principal for this role assignment. Changing this forces a new resource to be created.
 * @property roleDefinitionId The role definition ID for this role assignment. Changing this forces a new resource to be created.
 * @property schedule A `schedule` block as defined below. Changing this forces a new resource to be created.
 * @property scope The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created.
 * @property ticket A `ticket` block as defined below. Changing this forces a new resource to be created.
 */
public data class ActiveRoleAssignmentArgs(
    public val justification: Output? = null,
    public val principalId: Output? = null,
    public val roleDefinitionId: Output? = null,
    public val schedule: Output? = null,
    public val scope: Output? = null,
    public val ticket: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.pim.ActiveRoleAssignmentArgs =
        com.pulumi.azure.pim.ActiveRoleAssignmentArgs.builder()
            .justification(justification?.applyValue({ args0 -> args0 }))
            .principalId(principalId?.applyValue({ args0 -> args0 }))
            .roleDefinitionId(roleDefinitionId?.applyValue({ args0 -> args0 }))
            .schedule(schedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .scope(scope?.applyValue({ args0 -> args0 }))
            .ticket(ticket?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ActiveRoleAssignmentArgs].
 */
@PulumiTagMarker
public class ActiveRoleAssignmentArgsBuilder internal constructor() {
    private var justification: Output? = null

    private var principalId: Output? = null

    private var roleDefinitionId: Output? = null

    private var schedule: Output? = null

    private var scope: Output? = null

    private var ticket: Output? = null

    /**
     * @param value The justification for the role assignment. Changing this forces a new resource to be created.
     */
    @JvmName("qtunkxopekgtrukp")
    public suspend fun justification(`value`: Output) {
        this.justification = value
    }

    /**
     * @param value Object ID of the principal for this role assignment. Changing this forces a new resource to be created.
     */
    @JvmName("cgwtcfjegwtgxrwg")
    public suspend fun principalId(`value`: Output) {
        this.principalId = value
    }

    /**
     * @param value The role definition ID for this role assignment. Changing this forces a new resource to be created.
     */
    @JvmName("grwgqxewonrlylnl")
    public suspend fun roleDefinitionId(`value`: Output) {
        this.roleDefinitionId = value
    }

    /**
     * @param value A `schedule` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ldqddrwpxpsqagib")
    public suspend fun schedule(`value`: Output) {
        this.schedule = value
    }

    /**
     * @param value The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created.
     */
    @JvmName("dubafppqcjdoafgc")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value A `ticket` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("uduevdgdqchbynjg")
    public suspend fun ticket(`value`: Output) {
        this.ticket = value
    }

    /**
     * @param value The justification for the role assignment. Changing this forces a new resource to be created.
     */
    @JvmName("qpgynhadjxlnbhbi")
    public suspend fun justification(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.justification = mapped
    }

    /**
     * @param value Object ID of the principal for this role assignment. Changing this forces a new resource to be created.
     */
    @JvmName("oemjotaavfrunrsx")
    public suspend fun principalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.principalId = mapped
    }

    /**
     * @param value The role definition ID for this role assignment. Changing this forces a new resource to be created.
     */
    @JvmName("ykkcjfbflkxtmpqk")
    public suspend fun roleDefinitionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleDefinitionId = mapped
    }

    /**
     * @param value A `schedule` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("taibacnkdghcwuua")
    public suspend fun schedule(`value`: ActiveRoleAssignmentScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedule = mapped
    }

    /**
     * @param argument A `schedule` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("orydpcpkafqhhmyv")
    public suspend fun schedule(argument: suspend ActiveRoleAssignmentScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = ActiveRoleAssignmentScheduleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.schedule = mapped
    }

    /**
     * @param value The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created.
     */
    @JvmName("ueuybvbcyunbuctt")
    public suspend fun scope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value A `ticket` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ykhhbeeofsdgtkhq")
    public suspend fun ticket(`value`: ActiveRoleAssignmentTicketArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ticket = mapped
    }

    /**
     * @param argument A `ticket` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("liwdpurubyftafpq")
    public suspend fun ticket(argument: suspend ActiveRoleAssignmentTicketArgsBuilder.() -> Unit) {
        val toBeMapped = ActiveRoleAssignmentTicketArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ticket = mapped
    }

    internal fun build(): ActiveRoleAssignmentArgs = ActiveRoleAssignmentArgs(
        justification = justification,
        principalId = principalId,
        roleDefinitionId = roleDefinitionId,
        schedule = schedule,
        scope = scope,
        ticket = ticket,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy