RoleAssignment

class RoleAssignment : KotlinCustomResource

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"

Properties

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

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>?

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleName: Output<String>

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

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

Link copied to clipboard

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

Link copied to clipboard
val urn: Output<String>