RoleAssignmentArgs

data class RoleAssignmentArgs(val principalId: Output<String>? = null, val principalType: Output<String>? = null, val roleName: Output<String>? = null, val synapseSparkPoolId: Output<String>? = null, val synapseWorkspaceId: Output<String>? = null) : ConvertibleToJava<RoleAssignmentArgs>

Manages a Synapse Role Assignment.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.DataLakeGen2Filesystem;
import com.pulumi.azure.storage.DataLakeGen2FilesystemArgs;
import com.pulumi.azure.synapse.Workspace;
import com.pulumi.azure.synapse.WorkspaceArgs;
import com.pulumi.azure.synapse.inputs.WorkspaceIdentityArgs;
import com.pulumi.azure.synapse.FirewallRule;
import com.pulumi.azure.synapse.FirewallRuleArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.synapse.RoleAssignment;
import com.pulumi.azure.synapse.RoleAssignmentArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplestorageacc")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.accountKind("StorageV2")
.isHnsEnabled("true")
.build());
var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", DataLakeGen2FilesystemArgs.builder()
.name("example")
.storageAccountId(exampleAccount.id())
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.name("example")
.resourceGroupName(example.name())
.location(example.location())
.storageDataLakeGen2FilesystemId(exampleDataLakeGen2Filesystem.id())
.sqlAdministratorLogin("sqladminuser")
.sqlAdministratorLoginPassword("H@Sh1CoR3!")
.identity(WorkspaceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleFirewallRule = new FirewallRule("exampleFirewallRule", FirewallRuleArgs.builder()
.name("AllowAll")
.synapseWorkspaceId(exampleWorkspace.id())
.startIpAddress("0.0.0.0")
.endIpAddress("255.255.255.255")
.build());
final var current = CoreFunctions.getClientConfig();
var exampleRoleAssignment = new RoleAssignment("exampleRoleAssignment", RoleAssignmentArgs.builder()
.synapseWorkspaceId(exampleWorkspace.id())
.roleName("Synapse SQL Administrator")
.principalId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.build());
}
}

Import

Synapse Role Assignment can be imported using the resource id, e.g.

$ pulumi import azure:synapse/roleAssignment:RoleAssignment example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1|000000000000"

Constructors

Link copied to clipboard
fun RoleAssignmentArgs(principalId: Output<String>? = null, principalType: Output<String>? = null, roleName: Output<String>? = null, synapseSparkPoolId: Output<String>? = null, synapseWorkspaceId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): RoleAssignmentArgs

Properties

Link copied to clipboard
val principalId: Output<String>? = null

The ID of the Principal (User, Group or Service Principal) to assign the Synapse Role Definition to. Changing this forces a new resource to be created.

Link copied to clipboard
val principalType: Output<String>? = null

The Type of the Principal. One of User, Group or ServicePrincipal. Changing this forces a new resource to be created.

Link copied to clipboard
val roleName: Output<String>? = null

The Role Name of the Synapse Built-In Role. Possible values are Apache Spark Administrator, Synapse Administrator, Synapse Artifact Publisher, Synapse Artifact User, Synapse Compute Operator, Synapse Contributor, Synapse Credential User, Synapse Linked Data Manager, Synapse Monitoring Operator, Synapse SQL Administrator and Synapse User. Changing this forces a new resource to be created.

Link copied to clipboard
val synapseSparkPoolId: Output<String>? = null

The Synapse Spark Pool which the Synapse Role Assignment applies to. Changing this forces a new resource to be created.

Link copied to clipboard
val synapseWorkspaceId: Output<String>? = null

The Synapse Workspace which the Synapse Role Assignment applies to. Changing this forces a new resource to be created.