Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[synapse] Fix AccessControl LIVE sample test #18606

Merged
merged 1 commit into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/synapse/Azure.Analytics.Synapse.AccessControl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ First, you need to the determine the ID of the role you wish to assign, along wi

```C# Snippet:PrepCreateRoleAssignment
Response<IReadOnlyList<SynapseRoleDefinition>> roles = definitionsClient.ListRoleDefinitions();
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Workspace Admin");
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Synapse Administrator");
Guid roleId = role.Id.Value;

string assignedScope = "workspaces/<my-workspace-name>";

// Replace the string below with the ID you'd like to assign the role.
Guid principalId = Guid.Parse("<my-principal-id>");
Guid principalId = /*<my-principal-id>"*/ Guid.NewGuid();

// Replace the string below with the ID of the assignment you'd like to use.
string assignmentId = "<my-assignment-id>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ First, you need to the determine the ID of the role you wish to assign, along wi

```C# Snippet:PrepCreateRoleAssignment
Response<IReadOnlyList<SynapseRoleDefinition>> roles = definitionsClient.ListRoleDefinitions();
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Workspace Admin");
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Synapse Administrator");
Guid roleId = role.Id.Value;

string assignedScope = "workspaces/<my-workspace-name>";

// Replace the string below with the ID you'd like to assign the role.
Guid principalId = Guid.Parse("<my-principal-id>");
Guid principalId = /*<my-principal-id>"*/ Guid.NewGuid();

// Replace the string below with the ID of the assignment you'd like to use.
string assignmentId = "<my-assignment-id>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ public void AddAndRemoveRoleAssignmentSync()

#region Snippet:PrepCreateRoleAssignment
Response<IReadOnlyList<SynapseRoleDefinition>> roles = definitionsClient.ListRoleDefinitions();
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Workspace Admin");
SynapseRoleDefinition role = roles.Value.Single(role => role.Name == "Synapse Administrator");
Guid roleId = role.Id.Value;

string assignedScope = "workspaces/<my-workspace-name>";
/*@@*/assignedScope = "workspaces/workspacechhamosynapse";

// Replace the string below with the ID you'd like to assign the role.
Guid principalId = Guid.Parse("<my-principal-id>");
/*@@*/principalId = Guid.NewGuid();
Guid principalId = /*<my-principal-id>"*/ Guid.NewGuid();

// Replace the string below with the ID of the assignment you'd like to use.
string assignmentId = "<my-assignment-id>";
Expand Down