-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Network]Add Microsoft.Network/privateLinkServices configuration to support the private endpoint connection #18000
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
Changes from 10 commits
c5f8873
9e40299
f1adfcd
12de965
2f832fc
0637d53
99c59f2
c56d6e7
b7db4df
09f1d17
822ca1e
f2ef74e
7bd8a93
6e4633b
be3623f
3874144
2b7b517
0053cea
08dce7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
|
|
||
| using Microsoft.Azure.Commands.Common.Exceptions; | ||
| using Microsoft.Azure.Commands.Network.Models; | ||
| using Microsoft.Azure.Commands.Network.PrivateLinkService.PrivateLinkServiceProvider; | ||
| using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; | ||
|
|
@@ -63,9 +64,10 @@ public class GetAzurePrivateLinkResourceCommand : NetworkBaseCmdlet, IDynamicPar | |
|
|
||
| public new object GetDynamicParameters() | ||
| { | ||
| InvocationInfo invocationInfo = MyInvocation; | ||
| var parameters = new RuntimeDefinedParameterDictionary(); | ||
| RuntimeDefinedParameter namedParameter; | ||
| if (ProviderConfiguration.TryGetProvideServiceParameter(privateEndpointTypeName, NamedContextParameterSet, out namedParameter)) | ||
| if (ProviderConfiguration.TryGetLinkResourceServiceParameter(privateEndpointTypeName, NamedContextParameterSet, out namedParameter)) | ||
| { | ||
| parameters.Add(privateEndpointTypeName, namedParameter); | ||
| } | ||
|
|
@@ -89,6 +91,12 @@ public override void Execute() | |
| this.Subscription = DefaultProfile.DefaultContext.Subscription.Id; | ||
| this.PrivateLinkResourceType = DynamicParameters[privateEndpointTypeName].Value as string; | ||
| } | ||
|
|
||
| if (!GenericProvider.SupportsPrivateLinkResourceType(this.PrivateLinkResourceType)) | ||
| { | ||
| throw new ArgumentException(string.Format(Properties.Resources.UnsupportPrivateLinkResourceType, this.PrivateLinkResourceType)); | ||
|
||
| } | ||
|
|
||
| IPrivateLinkProvider provider = PrivateLinkProviderFactory.CreatePrivateLinkProvder(this, Subscription, PrivateLinkResourceType); | ||
| if (provider == null) | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please help to rename method to SupportsPrivateLinkFeature because it includes resource type and connection endpoint both.