-
Notifications
You must be signed in to change notification settings - Fork 4k
Updated support for synapse role assignment and Added support for role scope #14172
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
Merged
BethanyZhou
merged 36 commits into
Azure:release-2021-04-13
from
zesluo:zeshi/accesscontrolnewsdk
Apr 8, 2021
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
062146a
fixing compliationerror
zesluo1 97f37c4
getroleassignment
zesluo1 d2fa903
refine parametersetname
zesluo1 b1cd8b5
Merge branch 'master' into zeshi/accesscontrolnewsdk
zesluo1 7197b83
add scope to newroleassignment
zesluo1 5487fc7
add list scope command
zesluo1 0d10f47
refine new-azuresynapseroleassignment
zesluo1 f412876
add Itemtype and Item
zesluo1 e787196
refine newAzureSynapseRoleAssignment
zesluo1 df14f92
remove unnecessary feeds
zesluo1 2a509b7
refine deleteroleassignmentid
zesluo1 84236ef
refine resourceid name
zesluo1 6a3ca26
improve remove and getroleassignments
zesluo1 585d3f7
itemtype and item improvement
zesluo1 7284040
Fix a few issues
2583a84
Correct exception types
91e1e29
add principle type
zesluo1 c8555d3
add principaltype
zesluo1 ee1ba9a
Merge branch 'master' of https://github.com/Azure/azure-powershell in…
zesluo1 ab1f2e7
caseinsent
zesluo1 12ea62c
update changelog
zesluo1 850226c
add doc for get-azsyanpserolescope
zesluo1 c8184ca
remove powershlles
zesluo1 24232cb
update help doc
zesluo1 351318e
add objectid back
zesluo1 eba1c34
update Az.Synapse.md
zesluo1 4f35647
update auto generated mdfiles
zesluo1 43c8e1d
update changelog
zesluo1 d6f8a4c
update changelog2
zesluo1 bc5873e
update changelog3
zesluo1 99336aa
update changelog4
zesluo1 11576cd
update changelog5
zesluo1 ce1fb1f
update changelog6
zesluo1 05c3fc1
update changelog7
zesluo1 4e6c2fa
Update src/Synapse/Synapse/ChangeLog.md
zesluo1 474ae0d
Merge branch 'release-2021-04-13' into zeshi/accesscontrolnewsdk
BethanyZhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/Synapse/Synapse/Commands/DataPlaneCommands/AccessControl/GetAzureSynapseRoleScope.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using Microsoft.Azure.Commands.Common.Exceptions; | ||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; | ||
using Microsoft.Azure.Commands.Synapse.Common; | ||
using Microsoft.Azure.Commands.Synapse.Models; | ||
using Microsoft.Azure.Commands.Synapse.Properties; | ||
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; | ||
using Microsoft.WindowsAzure.Commands.Utilities.Common; | ||
using System; | ||
using System.Linq; | ||
using System.Management.Automation; | ||
|
||
namespace Microsoft.Azure.Commands.Synapse | ||
{ | ||
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.RoleScope, | ||
DefaultParameterSetName = GetByWorkspaceNameParameterSet)] | ||
[OutputType(typeof(PSSynapseRole))] | ||
public class GetAzureSynapseRoleScope : SynapseRoleCmdletBase | ||
{ | ||
private const string GetByWorkspaceNameParameterSet = "GetByWorkspaceNameParameterSet"; | ||
private const string GetByWorkspaceObjectParameterSet = "GetByWorkspaceObjectParameterSet"; | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByWorkspaceNameParameterSet, | ||
Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] | ||
[ResourceNameCompleter(ResourceTypes.Workspace, "ResourceGroupName")] | ||
[ValidateNotNullOrEmpty] | ||
public override string WorkspaceName { get; set; } | ||
|
||
[Parameter(ValueFromPipeline = true, ParameterSetName = GetByWorkspaceObjectParameterSet, | ||
Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] | ||
[ValidateNotNull] | ||
public PSSynapseWorkspace WorkspaceObject { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByWorkspaceNameParameterSet, | ||
Mandatory = false, HelpMessage = HelpMessages.WorkspaceResourceId)] | ||
[Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByWorkspaceObjectParameterSet, | ||
Mandatory = false, HelpMessage = HelpMessages.WorkspaceResourceId)] | ||
[ValidateNotNullOrEmpty] | ||
public string ResourceId { get; set; } | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
if (this.IsParameterBound(c => c.ResourceId)) | ||
{ | ||
var resourceIdentifier = new ResourceIdentifier(this.ResourceId); | ||
this.WorkspaceName = resourceIdentifier.ResourceName; | ||
} | ||
|
||
if (this.IsParameterBound(c => c.WorkspaceObject)) | ||
{ | ||
this.WorkspaceName = this.WorkspaceObject.Name; | ||
} | ||
|
||
var roleScopes = SynapseAnalyticsClient.ListRoleScopes(); | ||
WriteObject(roleScopes, true); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.