1. Packages
  2. Azure Classic
  3. API Docs
  4. pim
  5. ActiveRoleAssignment

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.pim.ActiveRoleAssignment

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Manages a Pim Active Role Assignment.

    Example Usage

    Subscription)

    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 exampleClientConfig = Azure.Core.GetClientConfig.Invoke();
    
        var exampleRoleDefinition = Azure.Authorization.GetRoleDefinition.Invoke(new()
        {
            Name = "Reader",
        });
    
        var exampleStatic = new Time.Static("exampleStatic");
    
        var exampleActiveRoleAssignment = new Azure.Pim.ActiveRoleAssignment("exampleActiveRoleAssignment", new()
        {
            Scope = primary.Apply(getSubscriptionResult => getSubscriptionResult.Id),
            RoleDefinitionId = Output.Tuple(primary, exampleRoleDefinition).Apply(values =>
            {
                var primary = values.Item1;
                var exampleRoleDefinition = values.Item2;
                return $"{primary.Apply(getSubscriptionResult => getSubscriptionResult.Id)}{exampleRoleDefinition.Apply(getRoleDefinitionResult => getRoleDefinitionResult.Id)}";
            }),
            PrincipalId = exampleClientConfig.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",
            },
        });
    
    });
    
    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-time/sdk/go/time"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := core.LookupSubscription(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleClientConfig, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
    			Name: pulumi.StringRef("Reader"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleStatic, err := time.NewStatic(ctx, "exampleStatic", nil)
    		if err != nil {
    			return err
    		}
    		_, err = pim.NewActiveRoleAssignment(ctx, "exampleActiveRoleAssignment", &pim.ActiveRoleAssignmentArgs{
    			Scope:            *pulumi.String(primary.Id),
    			RoleDefinitionId: pulumi.String(fmt.Sprintf("%v%v", primary.Id, exampleRoleDefinition.Id)),
    			PrincipalId:      *pulumi.String(exampleClientConfig.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
    	})
    }
    
    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 exampleClientConfig = CoreFunctions.getClientConfig();
    
            final var exampleRoleDefinition = 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()),exampleRoleDefinition.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.id())))
                .principalId(exampleClientConfig.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());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    import pulumiverse_time as time
    
    primary = azure.core.get_subscription()
    example_client_config = azure.core.get_client_config()
    example_role_definition = azure.authorization.get_role_definition(name="Reader")
    example_static = time.Static("exampleStatic")
    example_active_role_assignment = azure.pim.ActiveRoleAssignment("exampleActiveRoleAssignment",
        scope=primary.id,
        role_definition_id=f"{primary.id}{example_role_definition.id}",
        principal_id=example_client_config.object_id,
        schedule=azure.pim.ActiveRoleAssignmentScheduleArgs(
            start_date_time=example_static.rfc3339,
            expiration=azure.pim.ActiveRoleAssignmentScheduleExpirationArgs(
                duration_hours=8,
            ),
        ),
        justification="Expiration Duration Set",
        ticket=azure.pim.ActiveRoleAssignmentTicketArgs(
            number="1",
            system="example ticket system",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as time from "@pulumiverse/time";
    
    const primary = azure.core.getSubscription({});
    const exampleClientConfig = azure.core.getClientConfig({});
    const exampleRoleDefinition = azure.authorization.getRoleDefinition({
        name: "Reader",
    });
    const exampleStatic = new time.Static("exampleStatic", {});
    const exampleActiveRoleAssignment = new azure.pim.ActiveRoleAssignment("exampleActiveRoleAssignment", {
        scope: primary.then(primary => primary.id),
        roleDefinitionId: Promise.all([primary, exampleRoleDefinition]).then(([primary, exampleRoleDefinition]) => `${primary.id}${exampleRoleDefinition.id}`),
        principalId: exampleClientConfig.then(exampleClientConfig => exampleClientConfig.objectId),
        schedule: {
            startDateTime: exampleStatic.rfc3339,
            expiration: {
                durationHours: 8,
            },
        },
        justification: "Expiration Duration Set",
        ticket: {
            number: "1",
            system: "example ticket system",
        },
    });
    
    resources:
      exampleStatic:
        type: time:Static
      exampleActiveRoleAssignment:
        type: azure:pim:ActiveRoleAssignment
        properties:
          scope: ${primary.id}
          roleDefinitionId: ${primary.id}${exampleRoleDefinition.id}
          principalId: ${exampleClientConfig.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: {}
      exampleClientConfig:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
      exampleRoleDefinition:
        fn::invoke:
          Function: azure:authorization:getRoleDefinition
          Arguments:
            name: Reader
    

    Management Group)

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Time = Pulumiverse.Time;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleClientConfig = Azure.Core.GetClientConfig.Invoke();
    
        var exampleRoleDefinition = Azure.Authorization.GetRoleDefinition.Invoke(new()
        {
            Name = "Reader",
        });
    
        var exampleGroup = new Azure.Management.Group("exampleGroup");
    
        var exampleStatic = new Time.Static("exampleStatic");
    
        var exampleActiveRoleAssignment = new Azure.Pim.ActiveRoleAssignment("exampleActiveRoleAssignment", new()
        {
            Scope = exampleGroup.Id,
            RoleDefinitionId = exampleRoleDefinition.Apply(getRoleDefinitionResult => getRoleDefinitionResult.Id),
            PrincipalId = exampleClientConfig.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",
            },
        });
    
    });
    
    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-time/sdk/go/time"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleClientConfig, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
    			Name: pulumi.StringRef("Reader"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGroup, err := management.NewGroup(ctx, "exampleGroup", nil)
    		if err != nil {
    			return err
    		}
    		exampleStatic, err := time.NewStatic(ctx, "exampleStatic", nil)
    		if err != nil {
    			return err
    		}
    		_, err = pim.NewActiveRoleAssignment(ctx, "exampleActiveRoleAssignment", &pim.ActiveRoleAssignmentArgs{
    			Scope:            exampleGroup.ID(),
    			RoleDefinitionId: *pulumi.String(exampleRoleDefinition.Id),
    			PrincipalId:      *pulumi.String(exampleClientConfig.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
    	})
    }
    
    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.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 exampleClientConfig = CoreFunctions.getClientConfig();
    
            final var exampleRoleDefinition = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
                .name("Reader")
                .build());
    
            var exampleGroup = new Group("exampleGroup");
    
            var exampleStatic = new Static("exampleStatic");
    
            var exampleActiveRoleAssignment = new ActiveRoleAssignment("exampleActiveRoleAssignment", ActiveRoleAssignmentArgs.builder()        
                .scope(exampleGroup.id())
                .roleDefinitionId(exampleRoleDefinition.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.id()))
                .principalId(exampleClientConfig.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());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    import pulumiverse_time as time
    
    example_client_config = azure.core.get_client_config()
    example_role_definition = azure.authorization.get_role_definition(name="Reader")
    example_group = azure.management.Group("exampleGroup")
    example_static = time.Static("exampleStatic")
    example_active_role_assignment = azure.pim.ActiveRoleAssignment("exampleActiveRoleAssignment",
        scope=example_group.id,
        role_definition_id=example_role_definition.id,
        principal_id=example_client_config.object_id,
        schedule=azure.pim.ActiveRoleAssignmentScheduleArgs(
            start_date_time=example_static.rfc3339,
            expiration=azure.pim.ActiveRoleAssignmentScheduleExpirationArgs(
                duration_hours=8,
            ),
        ),
        justification="Expiration Duration Set",
        ticket=azure.pim.ActiveRoleAssignmentTicketArgs(
            number="1",
            system="example ticket system",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as time from "@pulumiverse/time";
    
    const exampleClientConfig = azure.core.getClientConfig({});
    const exampleRoleDefinition = azure.authorization.getRoleDefinition({
        name: "Reader",
    });
    const exampleGroup = new azure.management.Group("exampleGroup", {});
    const exampleStatic = new time.Static("exampleStatic", {});
    const exampleActiveRoleAssignment = new azure.pim.ActiveRoleAssignment("exampleActiveRoleAssignment", {
        scope: exampleGroup.id,
        roleDefinitionId: exampleRoleDefinition.then(exampleRoleDefinition => exampleRoleDefinition.id),
        principalId: exampleClientConfig.then(exampleClientConfig => exampleClientConfig.objectId),
        schedule: {
            startDateTime: exampleStatic.rfc3339,
            expiration: {
                durationHours: 8,
            },
        },
        justification: "Expiration Duration Set",
        ticket: {
            number: "1",
            system: "example ticket system",
        },
    });
    
    resources:
      exampleGroup:
        type: azure:management:Group
      exampleStatic:
        type: time:Static
      exampleActiveRoleAssignment:
        type: azure:pim:ActiveRoleAssignment
        properties:
          scope: ${exampleGroup.id}
          roleDefinitionId: ${exampleRoleDefinition.id}
          principalId: ${exampleClientConfig.objectId}
          schedule:
            startDateTime: ${exampleStatic.rfc3339}
            expiration:
              durationHours: 8
          justification: Expiration Duration Set
          ticket:
            number: '1'
            system: example ticket system
    variables:
      exampleClientConfig:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
      exampleRoleDefinition:
        fn::invoke:
          Function: azure:authorization:getRoleDefinition
          Arguments:
            name: Reader
    

    Create ActiveRoleAssignment Resource

    new ActiveRoleAssignment(name: string, args: ActiveRoleAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def ActiveRoleAssignment(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             justification: Optional[str] = None,
                             principal_id: Optional[str] = None,
                             role_definition_id: Optional[str] = None,
                             schedule: Optional[ActiveRoleAssignmentScheduleArgs] = None,
                             scope: Optional[str] = None,
                             ticket: Optional[ActiveRoleAssignmentTicketArgs] = None)
    @overload
    def ActiveRoleAssignment(resource_name: str,
                             args: ActiveRoleAssignmentArgs,
                             opts: Optional[ResourceOptions] = None)
    func NewActiveRoleAssignment(ctx *Context, name string, args ActiveRoleAssignmentArgs, opts ...ResourceOption) (*ActiveRoleAssignment, error)
    public ActiveRoleAssignment(string name, ActiveRoleAssignmentArgs args, CustomResourceOptions? opts = null)
    public ActiveRoleAssignment(String name, ActiveRoleAssignmentArgs args)
    public ActiveRoleAssignment(String name, ActiveRoleAssignmentArgs args, CustomResourceOptions options)
    
    type: azure:pim:ActiveRoleAssignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ActiveRoleAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ActiveRoleAssignmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ActiveRoleAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ActiveRoleAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ActiveRoleAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ActiveRoleAssignment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ActiveRoleAssignment resource accepts the following input properties:

    PrincipalId string

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    RoleDefinitionId string

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    Scope string

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    Justification string

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    Schedule ActiveRoleAssignmentSchedule

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Ticket ActiveRoleAssignmentTicket

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    PrincipalId string

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    RoleDefinitionId string

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    Scope string

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    Justification string

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    Schedule ActiveRoleAssignmentScheduleArgs

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Ticket ActiveRoleAssignmentTicketArgs

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    principalId String

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    roleDefinitionId String

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    scope String

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    justification String

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    schedule ActiveRoleAssignmentSchedule

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    ticket ActiveRoleAssignmentTicket

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    principalId string

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    roleDefinitionId string

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    scope string

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    justification string

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    schedule ActiveRoleAssignmentSchedule

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    ticket ActiveRoleAssignmentTicket

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    principal_id str

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    role_definition_id str

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    scope str

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    justification str

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    schedule ActiveRoleAssignmentScheduleArgs

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    ticket ActiveRoleAssignmentTicketArgs

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    principalId String

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    roleDefinitionId String

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    scope String

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    justification String

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    schedule Property Map

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    ticket Property Map

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ActiveRoleAssignment resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    PrincipalType string

    The type of principal.

    Id string

    The provider-assigned unique ID for this managed resource.

    PrincipalType string

    The type of principal.

    id String

    The provider-assigned unique ID for this managed resource.

    principalType String

    The type of principal.

    id string

    The provider-assigned unique ID for this managed resource.

    principalType string

    The type of principal.

    id str

    The provider-assigned unique ID for this managed resource.

    principal_type str

    The type of principal.

    id String

    The provider-assigned unique ID for this managed resource.

    principalType String

    The type of principal.

    Look up Existing ActiveRoleAssignment Resource

    Get an existing ActiveRoleAssignment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ActiveRoleAssignmentState, opts?: CustomResourceOptions): ActiveRoleAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            justification: Optional[str] = None,
            principal_id: Optional[str] = None,
            principal_type: Optional[str] = None,
            role_definition_id: Optional[str] = None,
            schedule: Optional[ActiveRoleAssignmentScheduleArgs] = None,
            scope: Optional[str] = None,
            ticket: Optional[ActiveRoleAssignmentTicketArgs] = None) -> ActiveRoleAssignment
    func GetActiveRoleAssignment(ctx *Context, name string, id IDInput, state *ActiveRoleAssignmentState, opts ...ResourceOption) (*ActiveRoleAssignment, error)
    public static ActiveRoleAssignment Get(string name, Input<string> id, ActiveRoleAssignmentState? state, CustomResourceOptions? opts = null)
    public static ActiveRoleAssignment get(String name, Output<String> id, ActiveRoleAssignmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Justification string

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    PrincipalId string

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    PrincipalType string

    The type of principal.

    RoleDefinitionId string

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    Schedule ActiveRoleAssignmentSchedule

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Scope string

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    Ticket ActiveRoleAssignmentTicket

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Justification string

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    PrincipalId string

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    PrincipalType string

    The type of principal.

    RoleDefinitionId string

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    Schedule ActiveRoleAssignmentScheduleArgs

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Scope string

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    Ticket ActiveRoleAssignmentTicketArgs

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    justification String

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    principalId String

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    principalType String

    The type of principal.

    roleDefinitionId String

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    schedule ActiveRoleAssignmentSchedule

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    scope String

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    ticket ActiveRoleAssignmentTicket

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    justification string

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    principalId string

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    principalType string

    The type of principal.

    roleDefinitionId string

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    schedule ActiveRoleAssignmentSchedule

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    scope string

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    ticket ActiveRoleAssignmentTicket

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    justification str

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    principal_id str

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    principal_type str

    The type of principal.

    role_definition_id str

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    schedule ActiveRoleAssignmentScheduleArgs

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    scope str

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    ticket ActiveRoleAssignmentTicketArgs

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    justification String

    The justification of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    principalId String

    The principal id. Changing this forces a new Pim Active Role Assignment to be created.

    principalType String

    The type of principal.

    roleDefinitionId String

    The role definition id. Changing this forces a new Pim Active Role Assignment to be created.

    schedule Property Map

    A schedule block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    scope String

    The scope. Changing this forces a new Pim Active Role Assignment to be created.

    ticket Property Map

    A ticket block as defined below. Changing this forces a new Pim Active Role Assignment to be created.

    Supporting Types

    ActiveRoleAssignmentSchedule, ActiveRoleAssignmentScheduleArgs

    Expiration ActiveRoleAssignmentScheduleExpiration

    A expiration block as defined above.

    StartDateTime string

    The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    Expiration ActiveRoleAssignmentScheduleExpiration

    A expiration block as defined above.

    StartDateTime string

    The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    expiration ActiveRoleAssignmentScheduleExpiration

    A expiration block as defined above.

    startDateTime String

    The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    expiration ActiveRoleAssignmentScheduleExpiration

    A expiration block as defined above.

    startDateTime string

    The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    expiration ActiveRoleAssignmentScheduleExpiration

    A expiration block as defined above.

    start_date_time str

    The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    expiration Property Map

    A expiration block as defined above.

    startDateTime String

    The start date time of the role assignment. Changing this forces a new Pim Active Role Assignment to be created.

    ActiveRoleAssignmentScheduleExpiration, ActiveRoleAssignmentScheduleExpirationArgs

    DurationDays int

    The duration of the role assignment in days. Conflicts with schedule.0.expiration.0.duration_hours,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    DurationHours int

    The duration of the role assignment in hours. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    EndDateTime string

    The end date time of the role assignment. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.duration_hours Changing this forces a new Pim Active Role Assignment to be created.

    DurationDays int

    The duration of the role assignment in days. Conflicts with schedule.0.expiration.0.duration_hours,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    DurationHours int

    The duration of the role assignment in hours. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    EndDateTime string

    The end date time of the role assignment. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.duration_hours Changing this forces a new Pim Active Role Assignment to be created.

    durationDays Integer

    The duration of the role assignment in days. Conflicts with schedule.0.expiration.0.duration_hours,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    durationHours Integer

    The duration of the role assignment in hours. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    endDateTime String

    The end date time of the role assignment. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.duration_hours Changing this forces a new Pim Active Role Assignment to be created.

    durationDays number

    The duration of the role assignment in days. Conflicts with schedule.0.expiration.0.duration_hours,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    durationHours number

    The duration of the role assignment in hours. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    endDateTime string

    The end date time of the role assignment. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.duration_hours Changing this forces a new Pim Active Role Assignment to be created.

    duration_days int

    The duration of the role assignment in days. Conflicts with schedule.0.expiration.0.duration_hours,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    duration_hours int

    The duration of the role assignment in hours. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    end_date_time str

    The end date time of the role assignment. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.duration_hours Changing this forces a new Pim Active Role Assignment to be created.

    durationDays Number

    The duration of the role assignment in days. Conflicts with schedule.0.expiration.0.duration_hours,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    durationHours Number

    The duration of the role assignment in hours. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.end_date_time Changing this forces a new Pim Active Role Assignment to be created.

    endDateTime String

    The end date time of the role assignment. Conflicts with schedule.0.expiration.0.duration_days,schedule.0.expiration.0.duration_hours Changing this forces a new Pim Active Role Assignment to be created.

    ActiveRoleAssignmentTicket, ActiveRoleAssignmentTicketArgs

    Number string

    The ticket number.

    System string

    The ticket system.

    Number string

    The ticket number.

    System string

    The ticket system.

    number String

    The ticket number.

    system String

    The ticket system.

    number string

    The ticket number.

    system string

    The ticket system.

    number str

    The ticket number.

    system str

    The ticket system.

    number String

    The ticket number.

    system String

    The ticket system.

    Import

    Pim Active Role Assignments can be imported using the resource id, e.g.

     $ 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
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi