RoleDefinition

class RoleDefinition : KotlinCustomResource

Role definition. Uses Azure REST API version 2022-05-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-05-01-preview. Other available API versions: 2022-04-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native authorization [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create role definition

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var roleDefinition = new AzureNative.Authorization.RoleDefinition("roleDefinition", new()
{
RoleDefinitionId = "roleDefinitionId",
Scope = "scope",
});
});
package main
import (
authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := authorization.NewRoleDefinition(ctx, "roleDefinition", &authorization.RoleDefinitionArgs{
RoleDefinitionId: pulumi.String("roleDefinitionId"),
Scope: pulumi.String("scope"),
})
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.azurenative.authorization.RoleDefinition;
import com.pulumi.azurenative.authorization.RoleDefinitionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var roleDefinition = new RoleDefinition("roleDefinition", RoleDefinitionArgs.builder()
.roleDefinitionId("roleDefinitionId")
.scope("scope")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:authorization:RoleDefinition roleDefinitionId /{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}

Properties

Link copied to clipboard

Role definition assignable scopes.

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val createdBy: Output<String>

Id of the user who created the assignment

Link copied to clipboard
val createdOn: Output<String>

Time it was created

Link copied to clipboard
val description: Output<String>?

The role definition description.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The role definition name.

Link copied to clipboard

Role definition permissions.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleName: Output<String>?

The role name.

Link copied to clipboard
val roleType: Output<String>?

The role type.

Link copied to clipboard
val type: Output<String>

The role definition type.

Link copied to clipboard
val updatedBy: Output<String>

Id of the user who updated the assignment

Link copied to clipboard
val updatedOn: Output<String>

Time it was updated

Link copied to clipboard
val urn: Output<String>