Role Assignment Args
The Role Assignment resource format. Uses Azure REST API version 2017-04-26. In version 2.x of the Azure Native provider, it used API version 2017-04-26.
Example Usage
RoleAssignments_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var roleAssignment = new AzureNative.CustomerInsights.RoleAssignment("roleAssignment", new()
{
AssignmentName = "assignmentName8976",
HubName = "sdkTestHub",
Principals = new[]
{
new AzureNative.CustomerInsights.Inputs.AssignmentPrincipalArgs
{
PrincipalId = "4c54c38ffa9b416ba5a6d6c8a20cbe7e",
PrincipalType = "User",
},
new AzureNative.CustomerInsights.Inputs.AssignmentPrincipalArgs
{
PrincipalId = "93061d15a5054f2b9948ae25724cf9d5",
PrincipalType = "User",
},
},
ResourceGroupName = "TestHubRG",
Role = AzureNative.CustomerInsights.RoleTypes.Admin,
});
});
package main
import (
customerinsights "github.com/pulumi/pulumi-azure-native-sdk/customerinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := customerinsights.NewRoleAssignment(ctx, "roleAssignment", &customerinsights.RoleAssignmentArgs{
AssignmentName: pulumi.String("assignmentName8976"),
HubName: pulumi.String("sdkTestHub"),
Principals: customerinsights.AssignmentPrincipalArray{
&customerinsights.AssignmentPrincipalArgs{
PrincipalId: pulumi.String("4c54c38ffa9b416ba5a6d6c8a20cbe7e"),
PrincipalType: pulumi.String("User"),
},
&customerinsights.AssignmentPrincipalArgs{
PrincipalId: pulumi.String("93061d15a5054f2b9948ae25724cf9d5"),
PrincipalType: pulumi.String("User"),
},
},
ResourceGroupName: pulumi.String("TestHubRG"),
Role: customerinsights.RoleTypesAdmin,
})
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.customerinsights.RoleAssignment;
import com.pulumi.azurenative.customerinsights.RoleAssignmentArgs;
import com.pulumi.azurenative.customerinsights.inputs.AssignmentPrincipalArgs;
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 roleAssignment = new RoleAssignment("roleAssignment", RoleAssignmentArgs.builder()
.assignmentName("assignmentName8976")
.hubName("sdkTestHub")
.principals(
AssignmentPrincipalArgs.builder()
.principalId("4c54c38ffa9b416ba5a6d6c8a20cbe7e")
.principalType("User")
.build(),
AssignmentPrincipalArgs.builder()
.principalId("93061d15a5054f2b9948ae25724cf9d5")
.principalType("User")
.build())
.resourceGroupName("TestHubRG")
.role("Admin")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:customerinsights:RoleAssignment azSdkTestHub/assignmentName8976 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roleAssignments/{assignmentName}
Constructors
Properties
The assignment name
Widget types set for the assignment.
Connectors set for the assignment.
Localized description for the metadata.
Localized display names for the metadata.
Interactions set for the assignment.
Kpis set for the assignment.
Links set for the assignment.
The principals being assigned to.
Profiles set for the assignment.
The Role assignments set for the relationship links.
The Role assignments set for the relationships.
The name of the resource group.
The Role assignments set for the assignment.
Sas Policies set for the assignment.
The Role assignments set for the assignment.
Views set for the assignment.
Widget types set for the assignment.