authorization

package
v3.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assignment

type Assignment struct {
	pulumi.CustomResourceState

	// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
	Condition pulumi.StringPtrOutput `pulumi:"condition"`
	// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
	ConditionVersion pulumi.StringPtrOutput `pulumi:"conditionVersion"`
	// The description for this Role Assignment. Changing this forces a new resource to be created.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
	PrincipalId pulumi.StringOutput `pulumi:"principalId"`
	// The type of the `principalId`, e.g. User, Group, Service Principal, Application, etc.
	PrincipalType pulumi.StringOutput `pulumi:"principalType"`
	// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
	RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"`
	// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
	RoleDefinitionName pulumi.StringOutput `pulumi:"roleDefinitionName"`
	// The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created.
	Scope pulumi.StringOutput `pulumi:"scope"`
	// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. If it is not a `Service Principal` identity it will cause the role assignment to fail. Defaults to `false`.
	SkipServicePrincipalAadCheck pulumi.BoolOutput `pulumi:"skipServicePrincipalAadCheck"`
}

Assigns a given Principal (User or Group) to a given Role.

## Example Usage ### Using A Built-In Role)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/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
		}
		_, err = authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
			Scope:              pulumi.String(primary.Id),
			RoleDefinitionName: pulumi.String("Reader"),
			PrincipalId:        pulumi.String(exampleClientConfig.ObjectId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Custom Role & Service Principal)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/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.NewRoleDefinition(ctx, "exampleRoleDefinition", &authorization.RoleDefinitionArgs{
			RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"),
			Scope:            pulumi.String(primary.Id),
			Permissions: authorization.RoleDefinitionPermissionArray{
				&authorization.RoleDefinitionPermissionArgs{
					Actions: pulumi.StringArray{
						pulumi.String("Microsoft.Resources/subscriptions/resourceGroups/read"),
					},
					NotActions: []interface{}{},
				},
			},
			AssignableScopes: pulumi.StringArray{
				pulumi.String(primary.Id),
			},
		})
		if err != nil {
			return err
		}
		_, err = authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
			Name:             pulumi.String("00000000-0000-0000-0000-000000000000"),
			Scope:            pulumi.String(primary.Id),
			RoleDefinitionId: exampleRoleDefinition.RoleDefinitionResourceId,
			PrincipalId:      pulumi.String(exampleClientConfig.ObjectId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Custom Role & User)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/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.NewRoleDefinition(ctx, "exampleRoleDefinition", &authorization.RoleDefinitionArgs{
			RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"),
			Scope:            pulumi.String(primary.Id),
			Permissions: authorization.RoleDefinitionPermissionArray{
				&authorization.RoleDefinitionPermissionArgs{
					Actions: pulumi.StringArray{
						pulumi.String("Microsoft.Resources/subscriptions/resourceGroups/read"),
					},
					NotActions: []interface{}{},
				},
			},
			AssignableScopes: pulumi.StringArray{
				pulumi.String(primary.Id),
			},
		})
		if err != nil {
			return err
		}
		_, err = authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
			Name:             pulumi.String("00000000-0000-0000-0000-000000000000"),
			Scope:            pulumi.String(primary.Id),
			RoleDefinitionId: exampleRoleDefinition.RoleDefinitionResourceId,
			PrincipalId:      pulumi.String(exampleClientConfig.ObjectId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Custom Role & Management Group)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi/sdk/v2/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
		}
		_, err = management.LookupGroup(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleRoleDefinition, err := authorization.NewRoleDefinition(ctx, "exampleRoleDefinition", &authorization.RoleDefinitionArgs{
			RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000000"),
			Scope:            pulumi.String(primary.Id),
			Permissions: authorization.RoleDefinitionPermissionArray{
				&authorization.RoleDefinitionPermissionArgs{
					Actions: pulumi.StringArray{
						pulumi.String("Microsoft.Resources/subscriptions/resourceGroups/read"),
					},
					NotActions: []interface{}{},
				},
			},
			AssignableScopes: pulumi.StringArray{
				pulumi.String(primary.Id),
			},
		})
		if err != nil {
			return err
		}
		_, err = authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
			Name:             pulumi.String("00000000-0000-0000-0000-000000000000"),
			Scope:            pulumi.Any(data.Azurerm_management_group.Primary.Id),
			RoleDefinitionId: exampleRoleDefinition.RoleDefinitionResourceId,
			PrincipalId:      pulumi.String(exampleClientConfig.ObjectId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh

$ pulumi import azure:authorization/assignment:Assignment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000

```

  • for scope `Subscription`, the id format is `/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000` - for scope `Resource Group`, the id format is `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000`

func GetAssignment

func GetAssignment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AssignmentState, opts ...pulumi.ResourceOption) (*Assignment, error)

GetAssignment gets an existing Assignment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAssignment

func NewAssignment(ctx *pulumi.Context,
	name string, args *AssignmentArgs, opts ...pulumi.ResourceOption) (*Assignment, error)

NewAssignment registers a new resource with the given unique name, arguments, and options.

func (*Assignment) ElementType added in v3.31.1

func (*Assignment) ElementType() reflect.Type

func (*Assignment) ToAssignmentOutput added in v3.31.1

func (i *Assignment) ToAssignmentOutput() AssignmentOutput

func (*Assignment) ToAssignmentOutputWithContext added in v3.31.1

func (i *Assignment) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput

func (*Assignment) ToAssignmentPtrOutput added in v3.47.1

func (i *Assignment) ToAssignmentPtrOutput() AssignmentPtrOutput

func (*Assignment) ToAssignmentPtrOutputWithContext added in v3.47.1

func (i *Assignment) ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput

type AssignmentArgs

type AssignmentArgs struct {
	// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
	Condition pulumi.StringPtrInput
	// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
	ConditionVersion pulumi.StringPtrInput
	// The description for this Role Assignment. Changing this forces a new resource to be created.
	Description pulumi.StringPtrInput
	// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
	PrincipalId pulumi.StringInput
	// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
	RoleDefinitionId pulumi.StringPtrInput
	// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
	RoleDefinitionName pulumi.StringPtrInput
	// The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created.
	Scope pulumi.StringInput
	// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. If it is not a `Service Principal` identity it will cause the role assignment to fail. Defaults to `false`.
	SkipServicePrincipalAadCheck pulumi.BoolPtrInput
}

The set of arguments for constructing a Assignment resource.

func (AssignmentArgs) ElementType

func (AssignmentArgs) ElementType() reflect.Type

type AssignmentArray added in v3.47.1

type AssignmentArray []AssignmentInput

func (AssignmentArray) ElementType added in v3.47.1

func (AssignmentArray) ElementType() reflect.Type

func (AssignmentArray) ToAssignmentArrayOutput added in v3.47.1

func (i AssignmentArray) ToAssignmentArrayOutput() AssignmentArrayOutput

func (AssignmentArray) ToAssignmentArrayOutputWithContext added in v3.47.1

func (i AssignmentArray) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput

type AssignmentArrayInput added in v3.47.1

type AssignmentArrayInput interface {
	pulumi.Input

	ToAssignmentArrayOutput() AssignmentArrayOutput
	ToAssignmentArrayOutputWithContext(context.Context) AssignmentArrayOutput
}

AssignmentArrayInput is an input type that accepts AssignmentArray and AssignmentArrayOutput values. You can construct a concrete instance of `AssignmentArrayInput` via:

AssignmentArray{ AssignmentArgs{...} }

type AssignmentArrayOutput added in v3.47.1

type AssignmentArrayOutput struct{ *pulumi.OutputState }

func (AssignmentArrayOutput) ElementType added in v3.47.1

func (AssignmentArrayOutput) ElementType() reflect.Type

func (AssignmentArrayOutput) Index added in v3.47.1

func (AssignmentArrayOutput) ToAssignmentArrayOutput added in v3.47.1

func (o AssignmentArrayOutput) ToAssignmentArrayOutput() AssignmentArrayOutput

func (AssignmentArrayOutput) ToAssignmentArrayOutputWithContext added in v3.47.1

func (o AssignmentArrayOutput) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput

type AssignmentInput added in v3.31.1

type AssignmentInput interface {
	pulumi.Input

	ToAssignmentOutput() AssignmentOutput
	ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput
}

type AssignmentMap added in v3.47.1

type AssignmentMap map[string]AssignmentInput

func (AssignmentMap) ElementType added in v3.47.1

func (AssignmentMap) ElementType() reflect.Type

func (AssignmentMap) ToAssignmentMapOutput added in v3.47.1

func (i AssignmentMap) ToAssignmentMapOutput() AssignmentMapOutput

func (AssignmentMap) ToAssignmentMapOutputWithContext added in v3.47.1

func (i AssignmentMap) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput

type AssignmentMapInput added in v3.47.1

type AssignmentMapInput interface {
	pulumi.Input

	ToAssignmentMapOutput() AssignmentMapOutput
	ToAssignmentMapOutputWithContext(context.Context) AssignmentMapOutput
}

AssignmentMapInput is an input type that accepts AssignmentMap and AssignmentMapOutput values. You can construct a concrete instance of `AssignmentMapInput` via:

AssignmentMap{ "key": AssignmentArgs{...} }

type AssignmentMapOutput added in v3.47.1

type AssignmentMapOutput struct{ *pulumi.OutputState }

func (AssignmentMapOutput) ElementType added in v3.47.1

func (AssignmentMapOutput) ElementType() reflect.Type

func (AssignmentMapOutput) MapIndex added in v3.47.1

func (AssignmentMapOutput) ToAssignmentMapOutput added in v3.47.1

func (o AssignmentMapOutput) ToAssignmentMapOutput() AssignmentMapOutput

func (AssignmentMapOutput) ToAssignmentMapOutputWithContext added in v3.47.1

func (o AssignmentMapOutput) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput

type AssignmentOutput added in v3.31.1

type AssignmentOutput struct {
	*pulumi.OutputState
}

func (AssignmentOutput) ElementType added in v3.31.1

func (AssignmentOutput) ElementType() reflect.Type

func (AssignmentOutput) ToAssignmentOutput added in v3.31.1

func (o AssignmentOutput) ToAssignmentOutput() AssignmentOutput

func (AssignmentOutput) ToAssignmentOutputWithContext added in v3.31.1

func (o AssignmentOutput) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput

func (AssignmentOutput) ToAssignmentPtrOutput added in v3.47.1

func (o AssignmentOutput) ToAssignmentPtrOutput() AssignmentPtrOutput

func (AssignmentOutput) ToAssignmentPtrOutputWithContext added in v3.47.1

func (o AssignmentOutput) ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput

type AssignmentPtrInput added in v3.47.1

type AssignmentPtrInput interface {
	pulumi.Input

	ToAssignmentPtrOutput() AssignmentPtrOutput
	ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput
}

type AssignmentPtrOutput added in v3.47.1

type AssignmentPtrOutput struct {
	*pulumi.OutputState
}

func (AssignmentPtrOutput) ElementType added in v3.47.1

func (AssignmentPtrOutput) ElementType() reflect.Type

func (AssignmentPtrOutput) ToAssignmentPtrOutput added in v3.47.1

func (o AssignmentPtrOutput) ToAssignmentPtrOutput() AssignmentPtrOutput

func (AssignmentPtrOutput) ToAssignmentPtrOutputWithContext added in v3.47.1

func (o AssignmentPtrOutput) ToAssignmentPtrOutputWithContext(ctx context.Context) AssignmentPtrOutput

type AssignmentState

type AssignmentState struct {
	// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
	Condition pulumi.StringPtrInput
	// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
	ConditionVersion pulumi.StringPtrInput
	// The description for this Role Assignment. Changing this forces a new resource to be created.
	Description pulumi.StringPtrInput
	// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
	PrincipalId pulumi.StringPtrInput
	// The type of the `principalId`, e.g. User, Group, Service Principal, Application, etc.
	PrincipalType pulumi.StringPtrInput
	// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
	RoleDefinitionId pulumi.StringPtrInput
	// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
	RoleDefinitionName pulumi.StringPtrInput
	// The scope at which the Role Assignment applies to, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`, or `/providers/Microsoft.Management/managementGroups/myMG`. Changing this forces a new resource to be created.
	Scope pulumi.StringPtrInput
	// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. If it is not a `Service Principal` identity it will cause the role assignment to fail. Defaults to `false`.
	SkipServicePrincipalAadCheck pulumi.BoolPtrInput
}

func (AssignmentState) ElementType

func (AssignmentState) ElementType() reflect.Type

type GetRoleDefinitionPermission

type GetRoleDefinitionPermission struct {
	// a list of actions supported by this role
	Actions     []string `pulumi:"actions"`
	DataActions []string `pulumi:"dataActions"`
	// a list of actions which are denied by this role
	NotActions     []string `pulumi:"notActions"`
	NotDataActions []string `pulumi:"notDataActions"`
}

type GetRoleDefinitionPermissionArgs

type GetRoleDefinitionPermissionArgs struct {
	// a list of actions supported by this role
	Actions     pulumi.StringArrayInput `pulumi:"actions"`
	DataActions pulumi.StringArrayInput `pulumi:"dataActions"`
	// a list of actions which are denied by this role
	NotActions     pulumi.StringArrayInput `pulumi:"notActions"`
	NotDataActions pulumi.StringArrayInput `pulumi:"notDataActions"`
}

func (GetRoleDefinitionPermissionArgs) ElementType

func (GetRoleDefinitionPermissionArgs) ToGetRoleDefinitionPermissionOutput

func (i GetRoleDefinitionPermissionArgs) ToGetRoleDefinitionPermissionOutput() GetRoleDefinitionPermissionOutput

func (GetRoleDefinitionPermissionArgs) ToGetRoleDefinitionPermissionOutputWithContext

func (i GetRoleDefinitionPermissionArgs) ToGetRoleDefinitionPermissionOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionOutput

type GetRoleDefinitionPermissionArray

type GetRoleDefinitionPermissionArray []GetRoleDefinitionPermissionInput

func (GetRoleDefinitionPermissionArray) ElementType

func (GetRoleDefinitionPermissionArray) ToGetRoleDefinitionPermissionArrayOutput

func (i GetRoleDefinitionPermissionArray) ToGetRoleDefinitionPermissionArrayOutput() GetRoleDefinitionPermissionArrayOutput

func (GetRoleDefinitionPermissionArray) ToGetRoleDefinitionPermissionArrayOutputWithContext

func (i GetRoleDefinitionPermissionArray) ToGetRoleDefinitionPermissionArrayOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionArrayOutput

type GetRoleDefinitionPermissionArrayInput

type GetRoleDefinitionPermissionArrayInput interface {
	pulumi.Input

	ToGetRoleDefinitionPermissionArrayOutput() GetRoleDefinitionPermissionArrayOutput
	ToGetRoleDefinitionPermissionArrayOutputWithContext(context.Context) GetRoleDefinitionPermissionArrayOutput
}

GetRoleDefinitionPermissionArrayInput is an input type that accepts GetRoleDefinitionPermissionArray and GetRoleDefinitionPermissionArrayOutput values. You can construct a concrete instance of `GetRoleDefinitionPermissionArrayInput` via:

GetRoleDefinitionPermissionArray{ GetRoleDefinitionPermissionArgs{...} }

type GetRoleDefinitionPermissionArrayOutput

type GetRoleDefinitionPermissionArrayOutput struct{ *pulumi.OutputState }

func (GetRoleDefinitionPermissionArrayOutput) ElementType

func (GetRoleDefinitionPermissionArrayOutput) Index

func (GetRoleDefinitionPermissionArrayOutput) ToGetRoleDefinitionPermissionArrayOutput

func (o GetRoleDefinitionPermissionArrayOutput) ToGetRoleDefinitionPermissionArrayOutput() GetRoleDefinitionPermissionArrayOutput

func (GetRoleDefinitionPermissionArrayOutput) ToGetRoleDefinitionPermissionArrayOutputWithContext

func (o GetRoleDefinitionPermissionArrayOutput) ToGetRoleDefinitionPermissionArrayOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionArrayOutput

type GetRoleDefinitionPermissionInput

type GetRoleDefinitionPermissionInput interface {
	pulumi.Input

	ToGetRoleDefinitionPermissionOutput() GetRoleDefinitionPermissionOutput
	ToGetRoleDefinitionPermissionOutputWithContext(context.Context) GetRoleDefinitionPermissionOutput
}

GetRoleDefinitionPermissionInput is an input type that accepts GetRoleDefinitionPermissionArgs and GetRoleDefinitionPermissionOutput values. You can construct a concrete instance of `GetRoleDefinitionPermissionInput` via:

GetRoleDefinitionPermissionArgs{...}

type GetRoleDefinitionPermissionOutput

type GetRoleDefinitionPermissionOutput struct{ *pulumi.OutputState }

func (GetRoleDefinitionPermissionOutput) Actions

a list of actions supported by this role

func (GetRoleDefinitionPermissionOutput) DataActions

func (GetRoleDefinitionPermissionOutput) ElementType

func (GetRoleDefinitionPermissionOutput) NotActions

a list of actions which are denied by this role

func (GetRoleDefinitionPermissionOutput) NotDataActions

func (GetRoleDefinitionPermissionOutput) ToGetRoleDefinitionPermissionOutput

func (o GetRoleDefinitionPermissionOutput) ToGetRoleDefinitionPermissionOutput() GetRoleDefinitionPermissionOutput

func (GetRoleDefinitionPermissionOutput) ToGetRoleDefinitionPermissionOutputWithContext

func (o GetRoleDefinitionPermissionOutput) ToGetRoleDefinitionPermissionOutputWithContext(ctx context.Context) GetRoleDefinitionPermissionOutput

type LookupRoleDefinitionArgs

type LookupRoleDefinitionArgs struct {
	// Specifies the Name of either a built-in or custom Role Definition.
	Name *string `pulumi:"name"`
	// Specifies the ID of the Role Definition as a UUID/GUID.
	RoleDefinitionId *string `pulumi:"roleDefinitionId"`
	// Specifies the Scope at which the Custom Role Definition exists.
	Scope *string `pulumi:"scope"`
}

A collection of arguments for invoking getRoleDefinition.

type LookupRoleDefinitionResult

type LookupRoleDefinitionResult struct {
	// One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`.
	AssignableScopes []string `pulumi:"assignableScopes"`
	// the Description of the built-in Role.
	Description string `pulumi:"description"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
	// a `permissions` block as documented below.
	Permissions      []GetRoleDefinitionPermission `pulumi:"permissions"`
	RoleDefinitionId string                        `pulumi:"roleDefinitionId"`
	Scope            *string                       `pulumi:"scope"`
	// the Type of the Role.
	Type string `pulumi:"type"`
}

A collection of values returned by getRoleDefinition.

func LookupRoleDefinition

func LookupRoleDefinition(ctx *pulumi.Context, args *LookupRoleDefinitionArgs, opts ...pulumi.InvokeOption) (*LookupRoleDefinitionResult, error)

Use this data source to access information about an existing Role Definition.

type LookupUserAssignedIdentityArgs

type LookupUserAssignedIdentityArgs struct {
	// The name of the User Assigned Identity.
	Name string `pulumi:"name"`
	// The name of the Resource Group in which the User Assigned Identity exists.
	ResourceGroupName string `pulumi:"resourceGroupName"`
}

A collection of arguments for invoking getUserAssignedIdentity.

type LookupUserAssignedIdentityResult

type LookupUserAssignedIdentityResult struct {
	// The Client ID of the User Assigned Identity.
	ClientId string `pulumi:"clientId"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The Azure location where the User Assigned Identity exists.
	Location string `pulumi:"location"`
	Name     string `pulumi:"name"`
	// The Service Principal ID of the User Assigned Identity.
	PrincipalId       string `pulumi:"principalId"`
	ResourceGroupName string `pulumi:"resourceGroupName"`
	// A mapping of tags assigned to the User Assigned Identity.
	Tags map[string]string `pulumi:"tags"`
	// The Tenant ID of the User Assigned Identity.
	TenantId string `pulumi:"tenantId"`
}

A collection of values returned by getUserAssignedIdentity.

func LookupUserAssignedIdentity

func LookupUserAssignedIdentity(ctx *pulumi.Context, args *LookupUserAssignedIdentityArgs, opts ...pulumi.InvokeOption) (*LookupUserAssignedIdentityResult, error)

Use this data source to access information about an existing User Assigned Identity.

## Example Usage ### Reference An Existing)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := authorization.LookupUserAssignedIdentity(ctx, &authorization.LookupUserAssignedIdentityArgs{
			Name:              "name_of_user_assigned_identity",
			ResourceGroupName: "name_of_resource_group",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("uaiClientId", example.ClientId)
		ctx.Export("uaiPrincipalId", example.PrincipalId)
		ctx.Export("uaiTenantId", example.TenantId)
		return nil
	})
}

```

type RoleDefinition

type RoleDefinition struct {
	pulumi.CustomResourceState

	// One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`.
	AssignableScopes pulumi.StringArrayOutput `pulumi:"assignableScopes"`
	// A description of the Role Definition.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The name of the Role Definition. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// A `permissions` block as defined below.
	Permissions RoleDefinitionPermissionArrayOutput `pulumi:"permissions"`
	// A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created.
	RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"`
	// The Azure Resource Manager ID for the resource.
	RoleDefinitionResourceId pulumi.StringOutput `pulumi:"roleDefinitionResourceId"`
	// The scope at which the Role Definition applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created.
	Scope pulumi.StringOutput `pulumi:"scope"`
}

Manages a custom Role Definition, used to assign Roles to Users/Principals. See ['Understand role definitions'](https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions) in the Azure documentation for more details.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		primary, err := core.LookupSubscription(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = authorization.NewRoleDefinition(ctx, "example", &authorization.RoleDefinitionArgs{
			Scope:       pulumi.String(primary.Id),
			Description: pulumi.String("This is a custom role created"),
			Permissions: authorization.RoleDefinitionPermissionArray{
				&authorization.RoleDefinitionPermissionArgs{
					Actions: pulumi.StringArray{
						pulumi.String("*"),
					},
					NotActions: []interface{}{},
				},
			},
			AssignableScopes: pulumi.StringArray{
				pulumi.String(primary.Id),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Role Definitions can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:authorization/roleDefinition:RoleDefinition example "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000|/subscriptions/00000000-0000-0000-0000-000000000000"

```

func GetRoleDefinition

func GetRoleDefinition(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RoleDefinitionState, opts ...pulumi.ResourceOption) (*RoleDefinition, error)

GetRoleDefinition gets an existing RoleDefinition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRoleDefinition

func NewRoleDefinition(ctx *pulumi.Context,
	name string, args *RoleDefinitionArgs, opts ...pulumi.ResourceOption) (*RoleDefinition, error)

NewRoleDefinition registers a new resource with the given unique name, arguments, and options.

func (*RoleDefinition) ElementType added in v3.31.1

func (*RoleDefinition) ElementType() reflect.Type

func (*RoleDefinition) ToRoleDefinitionOutput added in v3.31.1

func (i *RoleDefinition) ToRoleDefinitionOutput() RoleDefinitionOutput

func (*RoleDefinition) ToRoleDefinitionOutputWithContext added in v3.31.1

func (i *RoleDefinition) ToRoleDefinitionOutputWithContext(ctx context.Context) RoleDefinitionOutput

func (*RoleDefinition) ToRoleDefinitionPtrOutput added in v3.47.1

func (i *RoleDefinition) ToRoleDefinitionPtrOutput() RoleDefinitionPtrOutput

func (*RoleDefinition) ToRoleDefinitionPtrOutputWithContext added in v3.47.1

func (i *RoleDefinition) ToRoleDefinitionPtrOutputWithContext(ctx context.Context) RoleDefinitionPtrOutput

type RoleDefinitionArgs

type RoleDefinitionArgs struct {
	// One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`.
	AssignableScopes pulumi.StringArrayInput
	// A description of the Role Definition.
	Description pulumi.StringPtrInput
	// The name of the Role Definition. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// A `permissions` block as defined below.
	Permissions RoleDefinitionPermissionArrayInput
	// A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created.
	RoleDefinitionId pulumi.StringPtrInput
	// The scope at which the Role Definition applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created.
	Scope pulumi.StringInput
}

The set of arguments for constructing a RoleDefinition resource.

func (RoleDefinitionArgs) ElementType

func (RoleDefinitionArgs) ElementType() reflect.Type

type RoleDefinitionArray added in v3.47.1

type RoleDefinitionArray []RoleDefinitionInput

func (RoleDefinitionArray) ElementType added in v3.47.1

func (RoleDefinitionArray) ElementType() reflect.Type

func (RoleDefinitionArray) ToRoleDefinitionArrayOutput added in v3.47.1

func (i RoleDefinitionArray) ToRoleDefinitionArrayOutput() RoleDefinitionArrayOutput

func (RoleDefinitionArray) ToRoleDefinitionArrayOutputWithContext added in v3.47.1

func (i RoleDefinitionArray) ToRoleDefinitionArrayOutputWithContext(ctx context.Context) RoleDefinitionArrayOutput

type RoleDefinitionArrayInput added in v3.47.1

type RoleDefinitionArrayInput interface {
	pulumi.Input

	ToRoleDefinitionArrayOutput() RoleDefinitionArrayOutput
	ToRoleDefinitionArrayOutputWithContext(context.Context) RoleDefinitionArrayOutput
}

RoleDefinitionArrayInput is an input type that accepts RoleDefinitionArray and RoleDefinitionArrayOutput values. You can construct a concrete instance of `RoleDefinitionArrayInput` via:

RoleDefinitionArray{ RoleDefinitionArgs{...} }

type RoleDefinitionArrayOutput added in v3.47.1

type RoleDefinitionArrayOutput struct{ *pulumi.OutputState }

func (RoleDefinitionArrayOutput) ElementType added in v3.47.1

func (RoleDefinitionArrayOutput) ElementType() reflect.Type

func (RoleDefinitionArrayOutput) Index added in v3.47.1

func (RoleDefinitionArrayOutput) ToRoleDefinitionArrayOutput added in v3.47.1

func (o RoleDefinitionArrayOutput) ToRoleDefinitionArrayOutput() RoleDefinitionArrayOutput

func (RoleDefinitionArrayOutput) ToRoleDefinitionArrayOutputWithContext added in v3.47.1

func (o RoleDefinitionArrayOutput) ToRoleDefinitionArrayOutputWithContext(ctx context.Context) RoleDefinitionArrayOutput

type RoleDefinitionInput added in v3.31.1

type RoleDefinitionInput interface {
	pulumi.Input

	ToRoleDefinitionOutput() RoleDefinitionOutput
	ToRoleDefinitionOutputWithContext(ctx context.Context) RoleDefinitionOutput
}

type RoleDefinitionMap added in v3.47.1

type RoleDefinitionMap map[string]RoleDefinitionInput

func (RoleDefinitionMap) ElementType added in v3.47.1

func (RoleDefinitionMap) ElementType() reflect.Type

func (RoleDefinitionMap) ToRoleDefinitionMapOutput added in v3.47.1

func (i RoleDefinitionMap) ToRoleDefinitionMapOutput() RoleDefinitionMapOutput

func (RoleDefinitionMap) ToRoleDefinitionMapOutputWithContext added in v3.47.1

func (i RoleDefinitionMap) ToRoleDefinitionMapOutputWithContext(ctx context.Context) RoleDefinitionMapOutput

type RoleDefinitionMapInput added in v3.47.1

type RoleDefinitionMapInput interface {
	pulumi.Input

	ToRoleDefinitionMapOutput() RoleDefinitionMapOutput
	ToRoleDefinitionMapOutputWithContext(context.Context) RoleDefinitionMapOutput
}

RoleDefinitionMapInput is an input type that accepts RoleDefinitionMap and RoleDefinitionMapOutput values. You can construct a concrete instance of `RoleDefinitionMapInput` via:

RoleDefinitionMap{ "key": RoleDefinitionArgs{...} }

type RoleDefinitionMapOutput added in v3.47.1

type RoleDefinitionMapOutput struct{ *pulumi.OutputState }

func (RoleDefinitionMapOutput) ElementType added in v3.47.1

func (RoleDefinitionMapOutput) ElementType() reflect.Type

func (RoleDefinitionMapOutput) MapIndex added in v3.47.1

func (RoleDefinitionMapOutput) ToRoleDefinitionMapOutput added in v3.47.1

func (o RoleDefinitionMapOutput) ToRoleDefinitionMapOutput() RoleDefinitionMapOutput

func (RoleDefinitionMapOutput) ToRoleDefinitionMapOutputWithContext added in v3.47.1

func (o RoleDefinitionMapOutput) ToRoleDefinitionMapOutputWithContext(ctx context.Context) RoleDefinitionMapOutput

type RoleDefinitionOutput added in v3.31.1

type RoleDefinitionOutput struct {
	*pulumi.OutputState
}

func (RoleDefinitionOutput) ElementType added in v3.31.1

func (RoleDefinitionOutput) ElementType() reflect.Type

func (RoleDefinitionOutput) ToRoleDefinitionOutput added in v3.31.1

func (o RoleDefinitionOutput) ToRoleDefinitionOutput() RoleDefinitionOutput

func (RoleDefinitionOutput) ToRoleDefinitionOutputWithContext added in v3.31.1

func (o RoleDefinitionOutput) ToRoleDefinitionOutputWithContext(ctx context.Context) RoleDefinitionOutput

func (RoleDefinitionOutput) ToRoleDefinitionPtrOutput added in v3.47.1

func (o RoleDefinitionOutput) ToRoleDefinitionPtrOutput() RoleDefinitionPtrOutput

func (RoleDefinitionOutput) ToRoleDefinitionPtrOutputWithContext added in v3.47.1

func (o RoleDefinitionOutput) ToRoleDefinitionPtrOutputWithContext(ctx context.Context) RoleDefinitionPtrOutput

type RoleDefinitionPermission

type RoleDefinitionPermission struct {
	// One or more Allowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	Actions []string `pulumi:"actions"`
	// One or more Allowed Data Actions, such as `*`, `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	DataActions []string `pulumi:"dataActions"`
	// One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	NotActions []string `pulumi:"notActions"`
	// One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	NotDataActions []string `pulumi:"notDataActions"`
}

type RoleDefinitionPermissionArgs

type RoleDefinitionPermissionArgs struct {
	// One or more Allowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	Actions pulumi.StringArrayInput `pulumi:"actions"`
	// One or more Allowed Data Actions, such as `*`, `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	DataActions pulumi.StringArrayInput `pulumi:"dataActions"`
	// One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	NotActions pulumi.StringArrayInput `pulumi:"notActions"`
	// One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.
	NotDataActions pulumi.StringArrayInput `pulumi:"notDataActions"`
}

func (RoleDefinitionPermissionArgs) ElementType

func (RoleDefinitionPermissionArgs) ToRoleDefinitionPermissionOutput

func (i RoleDefinitionPermissionArgs) ToRoleDefinitionPermissionOutput() RoleDefinitionPermissionOutput

func (RoleDefinitionPermissionArgs) ToRoleDefinitionPermissionOutputWithContext

func (i RoleDefinitionPermissionArgs) ToRoleDefinitionPermissionOutputWithContext(ctx context.Context) RoleDefinitionPermissionOutput

type RoleDefinitionPermissionArray

type RoleDefinitionPermissionArray []RoleDefinitionPermissionInput

func (RoleDefinitionPermissionArray) ElementType

func (RoleDefinitionPermissionArray) ToRoleDefinitionPermissionArrayOutput

func (i RoleDefinitionPermissionArray) ToRoleDefinitionPermissionArrayOutput() RoleDefinitionPermissionArrayOutput

func (RoleDefinitionPermissionArray) ToRoleDefinitionPermissionArrayOutputWithContext

func (i RoleDefinitionPermissionArray) ToRoleDefinitionPermissionArrayOutputWithContext(ctx context.Context) RoleDefinitionPermissionArrayOutput

type RoleDefinitionPermissionArrayInput

type RoleDefinitionPermissionArrayInput interface {
	pulumi.Input

	ToRoleDefinitionPermissionArrayOutput() RoleDefinitionPermissionArrayOutput
	ToRoleDefinitionPermissionArrayOutputWithContext(context.Context) RoleDefinitionPermissionArrayOutput
}

RoleDefinitionPermissionArrayInput is an input type that accepts RoleDefinitionPermissionArray and RoleDefinitionPermissionArrayOutput values. You can construct a concrete instance of `RoleDefinitionPermissionArrayInput` via:

RoleDefinitionPermissionArray{ RoleDefinitionPermissionArgs{...} }

type RoleDefinitionPermissionArrayOutput

type RoleDefinitionPermissionArrayOutput struct{ *pulumi.OutputState }

func (RoleDefinitionPermissionArrayOutput) ElementType

func (RoleDefinitionPermissionArrayOutput) Index

func (RoleDefinitionPermissionArrayOutput) ToRoleDefinitionPermissionArrayOutput

func (o RoleDefinitionPermissionArrayOutput) ToRoleDefinitionPermissionArrayOutput() RoleDefinitionPermissionArrayOutput

func (RoleDefinitionPermissionArrayOutput) ToRoleDefinitionPermissionArrayOutputWithContext

func (o RoleDefinitionPermissionArrayOutput) ToRoleDefinitionPermissionArrayOutputWithContext(ctx context.Context) RoleDefinitionPermissionArrayOutput

type RoleDefinitionPermissionInput

type RoleDefinitionPermissionInput interface {
	pulumi.Input

	ToRoleDefinitionPermissionOutput() RoleDefinitionPermissionOutput
	ToRoleDefinitionPermissionOutputWithContext(context.Context) RoleDefinitionPermissionOutput
}

RoleDefinitionPermissionInput is an input type that accepts RoleDefinitionPermissionArgs and RoleDefinitionPermissionOutput values. You can construct a concrete instance of `RoleDefinitionPermissionInput` via:

RoleDefinitionPermissionArgs{...}

type RoleDefinitionPermissionOutput

type RoleDefinitionPermissionOutput struct{ *pulumi.OutputState }

func (RoleDefinitionPermissionOutput) Actions

One or more Allowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.

func (RoleDefinitionPermissionOutput) DataActions

One or more Allowed Data Actions, such as `*`, `Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.

func (RoleDefinitionPermissionOutput) ElementType

func (RoleDefinitionPermissionOutput) NotActions

One or more Disallowed Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.

func (RoleDefinitionPermissionOutput) NotDataActions

One or more Disallowed Data Actions, such as `*`, `Microsoft.Resources/subscriptions/resourceGroups/read`. See ['Azure Resource Manager resource provider operations'](https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations) for details.

func (RoleDefinitionPermissionOutput) ToRoleDefinitionPermissionOutput

func (o RoleDefinitionPermissionOutput) ToRoleDefinitionPermissionOutput() RoleDefinitionPermissionOutput

func (RoleDefinitionPermissionOutput) ToRoleDefinitionPermissionOutputWithContext

func (o RoleDefinitionPermissionOutput) ToRoleDefinitionPermissionOutputWithContext(ctx context.Context) RoleDefinitionPermissionOutput

type RoleDefinitionPtrInput added in v3.47.1

type RoleDefinitionPtrInput interface {
	pulumi.Input

	ToRoleDefinitionPtrOutput() RoleDefinitionPtrOutput
	ToRoleDefinitionPtrOutputWithContext(ctx context.Context) RoleDefinitionPtrOutput
}

type RoleDefinitionPtrOutput added in v3.47.1

type RoleDefinitionPtrOutput struct {
	*pulumi.OutputState
}

func (RoleDefinitionPtrOutput) ElementType added in v3.47.1

func (RoleDefinitionPtrOutput) ElementType() reflect.Type

func (RoleDefinitionPtrOutput) ToRoleDefinitionPtrOutput added in v3.47.1

func (o RoleDefinitionPtrOutput) ToRoleDefinitionPtrOutput() RoleDefinitionPtrOutput

func (RoleDefinitionPtrOutput) ToRoleDefinitionPtrOutputWithContext added in v3.47.1

func (o RoleDefinitionPtrOutput) ToRoleDefinitionPtrOutputWithContext(ctx context.Context) RoleDefinitionPtrOutput

type RoleDefinitionState

type RoleDefinitionState struct {
	// One or more assignable scopes for this Role Definition, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`.
	AssignableScopes pulumi.StringArrayInput
	// A description of the Role Definition.
	Description pulumi.StringPtrInput
	// The name of the Role Definition. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// A `permissions` block as defined below.
	Permissions RoleDefinitionPermissionArrayInput
	// A unique UUID/GUID which identifies this role - one will be generated if not specified. Changing this forces a new resource to be created.
	RoleDefinitionId pulumi.StringPtrInput
	// The Azure Resource Manager ID for the resource.
	RoleDefinitionResourceId pulumi.StringPtrInput
	// The scope at which the Role Definition applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. It is recommended to use the first entry of the `assignableScopes`. Changing this forces a new resource to be created.
	Scope pulumi.StringPtrInput
}

func (RoleDefinitionState) ElementType

func (RoleDefinitionState) ElementType() reflect.Type

type UserAssignedIdentity

type UserAssignedIdentity struct {
	pulumi.CustomResourceState

	// Client ID associated with the user assigned identity.
	ClientId pulumi.StringOutput `pulumi:"clientId"`
	// The location/region where the user assigned identity is
	// created.
	Location pulumi.StringOutput `pulumi:"location"`
	// The name of the user assigned identity. Changing this forces a
	// new identity to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// Service Principal ID associated with the user assigned identity.
	PrincipalId pulumi.StringOutput `pulumi:"principalId"`
	// The name of the resource group in which to
	// create the user assigned identity.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// Tenant ID associated with the user assigned identity.
	TenantId pulumi.StringOutput `pulumi:"tenantId"`
}

Manages a user assigned identity.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = authorization.NewUserAssignedIdentity(ctx, "exampleUserAssignedIdentity", &authorization.UserAssignedIdentityArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

User Assigned Identities can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:authorization/userAssignedIdentity:UserAssignedIdentity exampleIdentity /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/acceptanceTestResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity

```

func GetUserAssignedIdentity

func GetUserAssignedIdentity(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *UserAssignedIdentityState, opts ...pulumi.ResourceOption) (*UserAssignedIdentity, error)

GetUserAssignedIdentity gets an existing UserAssignedIdentity resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewUserAssignedIdentity

func NewUserAssignedIdentity(ctx *pulumi.Context,
	name string, args *UserAssignedIdentityArgs, opts ...pulumi.ResourceOption) (*UserAssignedIdentity, error)

NewUserAssignedIdentity registers a new resource with the given unique name, arguments, and options.

func (*UserAssignedIdentity) ElementType added in v3.31.1

func (*UserAssignedIdentity) ElementType() reflect.Type

func (*UserAssignedIdentity) ToUserAssignedIdentityOutput added in v3.31.1

func (i *UserAssignedIdentity) ToUserAssignedIdentityOutput() UserAssignedIdentityOutput

func (*UserAssignedIdentity) ToUserAssignedIdentityOutputWithContext added in v3.31.1

func (i *UserAssignedIdentity) ToUserAssignedIdentityOutputWithContext(ctx context.Context) UserAssignedIdentityOutput

func (*UserAssignedIdentity) ToUserAssignedIdentityPtrOutput added in v3.47.1

func (i *UserAssignedIdentity) ToUserAssignedIdentityPtrOutput() UserAssignedIdentityPtrOutput

func (*UserAssignedIdentity) ToUserAssignedIdentityPtrOutputWithContext added in v3.47.1

func (i *UserAssignedIdentity) ToUserAssignedIdentityPtrOutputWithContext(ctx context.Context) UserAssignedIdentityPtrOutput

type UserAssignedIdentityArgs

type UserAssignedIdentityArgs struct {
	// The location/region where the user assigned identity is
	// created.
	Location pulumi.StringPtrInput
	// The name of the user assigned identity. Changing this forces a
	// new identity to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group in which to
	// create the user assigned identity.
	ResourceGroupName pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a UserAssignedIdentity resource.

func (UserAssignedIdentityArgs) ElementType

func (UserAssignedIdentityArgs) ElementType() reflect.Type

type UserAssignedIdentityArray added in v3.47.1

type UserAssignedIdentityArray []UserAssignedIdentityInput

func (UserAssignedIdentityArray) ElementType added in v3.47.1

func (UserAssignedIdentityArray) ElementType() reflect.Type

func (UserAssignedIdentityArray) ToUserAssignedIdentityArrayOutput added in v3.47.1

func (i UserAssignedIdentityArray) ToUserAssignedIdentityArrayOutput() UserAssignedIdentityArrayOutput

func (UserAssignedIdentityArray) ToUserAssignedIdentityArrayOutputWithContext added in v3.47.1

func (i UserAssignedIdentityArray) ToUserAssignedIdentityArrayOutputWithContext(ctx context.Context) UserAssignedIdentityArrayOutput

type UserAssignedIdentityArrayInput added in v3.47.1

type UserAssignedIdentityArrayInput interface {
	pulumi.Input

	ToUserAssignedIdentityArrayOutput() UserAssignedIdentityArrayOutput
	ToUserAssignedIdentityArrayOutputWithContext(context.Context) UserAssignedIdentityArrayOutput
}

UserAssignedIdentityArrayInput is an input type that accepts UserAssignedIdentityArray and UserAssignedIdentityArrayOutput values. You can construct a concrete instance of `UserAssignedIdentityArrayInput` via:

UserAssignedIdentityArray{ UserAssignedIdentityArgs{...} }

type UserAssignedIdentityArrayOutput added in v3.47.1

type UserAssignedIdentityArrayOutput struct{ *pulumi.OutputState }

func (UserAssignedIdentityArrayOutput) ElementType added in v3.47.1

func (UserAssignedIdentityArrayOutput) Index added in v3.47.1

func (UserAssignedIdentityArrayOutput) ToUserAssignedIdentityArrayOutput added in v3.47.1

func (o UserAssignedIdentityArrayOutput) ToUserAssignedIdentityArrayOutput() UserAssignedIdentityArrayOutput

func (UserAssignedIdentityArrayOutput) ToUserAssignedIdentityArrayOutputWithContext added in v3.47.1

func (o UserAssignedIdentityArrayOutput) ToUserAssignedIdentityArrayOutputWithContext(ctx context.Context) UserAssignedIdentityArrayOutput

type UserAssignedIdentityInput added in v3.31.1

type UserAssignedIdentityInput interface {
	pulumi.Input

	ToUserAssignedIdentityOutput() UserAssignedIdentityOutput
	ToUserAssignedIdentityOutputWithContext(ctx context.Context) UserAssignedIdentityOutput
}

type UserAssignedIdentityMap added in v3.47.1

type UserAssignedIdentityMap map[string]UserAssignedIdentityInput

func (UserAssignedIdentityMap) ElementType added in v3.47.1

func (UserAssignedIdentityMap) ElementType() reflect.Type

func (UserAssignedIdentityMap) ToUserAssignedIdentityMapOutput added in v3.47.1

func (i UserAssignedIdentityMap) ToUserAssignedIdentityMapOutput() UserAssignedIdentityMapOutput

func (UserAssignedIdentityMap) ToUserAssignedIdentityMapOutputWithContext added in v3.47.1

func (i UserAssignedIdentityMap) ToUserAssignedIdentityMapOutputWithContext(ctx context.Context) UserAssignedIdentityMapOutput

type UserAssignedIdentityMapInput added in v3.47.1

type UserAssignedIdentityMapInput interface {
	pulumi.Input

	ToUserAssignedIdentityMapOutput() UserAssignedIdentityMapOutput
	ToUserAssignedIdentityMapOutputWithContext(context.Context) UserAssignedIdentityMapOutput
}

UserAssignedIdentityMapInput is an input type that accepts UserAssignedIdentityMap and UserAssignedIdentityMapOutput values. You can construct a concrete instance of `UserAssignedIdentityMapInput` via:

UserAssignedIdentityMap{ "key": UserAssignedIdentityArgs{...} }

type UserAssignedIdentityMapOutput added in v3.47.1

type UserAssignedIdentityMapOutput struct{ *pulumi.OutputState }

func (UserAssignedIdentityMapOutput) ElementType added in v3.47.1

func (UserAssignedIdentityMapOutput) MapIndex added in v3.47.1

func (UserAssignedIdentityMapOutput) ToUserAssignedIdentityMapOutput added in v3.47.1

func (o UserAssignedIdentityMapOutput) ToUserAssignedIdentityMapOutput() UserAssignedIdentityMapOutput

func (UserAssignedIdentityMapOutput) ToUserAssignedIdentityMapOutputWithContext added in v3.47.1

func (o UserAssignedIdentityMapOutput) ToUserAssignedIdentityMapOutputWithContext(ctx context.Context) UserAssignedIdentityMapOutput

type UserAssignedIdentityOutput added in v3.31.1

type UserAssignedIdentityOutput struct {
	*pulumi.OutputState
}

func (UserAssignedIdentityOutput) ElementType added in v3.31.1

func (UserAssignedIdentityOutput) ElementType() reflect.Type

func (UserAssignedIdentityOutput) ToUserAssignedIdentityOutput added in v3.31.1

func (o UserAssignedIdentityOutput) ToUserAssignedIdentityOutput() UserAssignedIdentityOutput

func (UserAssignedIdentityOutput) ToUserAssignedIdentityOutputWithContext added in v3.31.1

func (o UserAssignedIdentityOutput) ToUserAssignedIdentityOutputWithContext(ctx context.Context) UserAssignedIdentityOutput

func (UserAssignedIdentityOutput) ToUserAssignedIdentityPtrOutput added in v3.47.1

func (o UserAssignedIdentityOutput) ToUserAssignedIdentityPtrOutput() UserAssignedIdentityPtrOutput

func (UserAssignedIdentityOutput) ToUserAssignedIdentityPtrOutputWithContext added in v3.47.1

func (o UserAssignedIdentityOutput) ToUserAssignedIdentityPtrOutputWithContext(ctx context.Context) UserAssignedIdentityPtrOutput

type UserAssignedIdentityPtrInput added in v3.47.1

type UserAssignedIdentityPtrInput interface {
	pulumi.Input

	ToUserAssignedIdentityPtrOutput() UserAssignedIdentityPtrOutput
	ToUserAssignedIdentityPtrOutputWithContext(ctx context.Context) UserAssignedIdentityPtrOutput
}

type UserAssignedIdentityPtrOutput added in v3.47.1

type UserAssignedIdentityPtrOutput struct {
	*pulumi.OutputState
}

func (UserAssignedIdentityPtrOutput) ElementType added in v3.47.1

func (UserAssignedIdentityPtrOutput) ToUserAssignedIdentityPtrOutput added in v3.47.1

func (o UserAssignedIdentityPtrOutput) ToUserAssignedIdentityPtrOutput() UserAssignedIdentityPtrOutput

func (UserAssignedIdentityPtrOutput) ToUserAssignedIdentityPtrOutputWithContext added in v3.47.1

func (o UserAssignedIdentityPtrOutput) ToUserAssignedIdentityPtrOutputWithContext(ctx context.Context) UserAssignedIdentityPtrOutput

type UserAssignedIdentityState

type UserAssignedIdentityState struct {
	// Client ID associated with the user assigned identity.
	ClientId pulumi.StringPtrInput
	// The location/region where the user assigned identity is
	// created.
	Location pulumi.StringPtrInput
	// The name of the user assigned identity. Changing this forces a
	// new identity to be created.
	Name pulumi.StringPtrInput
	// Service Principal ID associated with the user assigned identity.
	PrincipalId pulumi.StringPtrInput
	// The name of the resource group in which to
	// create the user assigned identity.
	ResourceGroupName pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// Tenant ID associated with the user assigned identity.
	TenantId pulumi.StringPtrInput
}

func (UserAssignedIdentityState) ElementType

func (UserAssignedIdentityState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL