15
15
using System . Management . Automation ;
16
16
using Microsoft . Azure . Commands . Models ;
17
17
using Microsoft . Azure . Commands . Common . Authentication . Models ;
18
- using Microsoft . Azure . Commands . Profile . Models ;
19
18
using Microsoft . Azure . Commands . ResourceManager . Common ;
20
- using Microsoft . Azure . Commands . Common ;
21
19
22
20
namespace Microsoft . Azure . Commands . Profile
23
21
{
@@ -29,28 +27,19 @@ namespace Microsoft.Azure.Commands.Profile
29
27
public class AddAzureRMEnvironmentCommand : AzureRMCmdlet
30
28
{
31
29
[ Parameter ( Position = 0 , Mandatory = true , ValueFromPipelineByPropertyName = true ) ]
30
+ [ Alias ( "n" ) ]
32
31
public string Name { get ; set ; }
33
32
34
- [ Parameter ( Position = 1 , Mandatory = false , ValueFromPipelineByPropertyName = true ) ]
35
- public string PublishSettingsFileUrl { get ; set ; }
36
-
37
- [ Parameter ( Position = 2 , Mandatory = false , ValueFromPipelineByPropertyName = true ) ]
38
- [ Alias ( "ServiceManagement" , "ServiceManagementUrl" ) ]
39
- public string ServiceEndpoint { get ; set ; }
40
-
41
- [ Parameter ( Position = 3 , Mandatory = false , ValueFromPipelineByPropertyName = true ) ]
42
- public string ManagementPortalUrl { get ; set ; }
43
-
44
33
[ Parameter ( Position = 4 , Mandatory = false , HelpMessage = "The storage endpoint" ) ]
45
- [ Alias ( "StorageEndpointSuffix" ) ]
34
+ [ Alias ( "StorageEndpointSuffix" , "storage" ) ]
46
35
public string StorageEndpoint { get ; set ; }
47
36
48
37
[ Parameter ( Position = 5 , Mandatory = false , ValueFromPipelineByPropertyName = true , HelpMessage = "The URI for the Active Directory service for this environment" ) ]
49
- [ Alias ( "AdEndpointUrl" , "ActiveDirectory" , "ActiveDirectoryAuthority" ) ]
38
+ [ Alias ( "AdEndpointUrl" , "ActiveDirectory" , "ActiveDirectoryAuthority" , "ad" ) ]
50
39
public string ActiveDirectoryEndpoint { get ; set ; }
51
40
52
41
[ Parameter ( Position = 6 , Mandatory = false , ValueFromPipelineByPropertyName = true , HelpMessage = "The cloud service endpoint" ) ]
53
- [ Alias ( "ResourceManager" , "ResourceManagerUrl" ) ]
42
+ [ Alias ( "ResourceManager" , "ResourceManagerUrl" , "arm" ) ]
54
43
public string ResourceManagerEndpoint { get ; set ; }
55
44
56
45
[ Parameter ( Position = 7 , Mandatory = false , ValueFromPipelineByPropertyName = true , HelpMessage = "The public gallery endpoint" ) ]
@@ -59,40 +48,17 @@ public class AddAzureRMEnvironmentCommand : AzureRMCmdlet
59
48
60
49
[ Parameter ( Position = 8 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
61
50
HelpMessage = "Identifier of the target resource that is the recipient of the requested token." ) ]
51
+ [ Alias ( "audience" , "aud" ) ]
62
52
public string ActiveDirectoryServiceEndpointResourceId { get ; set ; }
63
53
64
54
[ Parameter ( Position = 9 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
65
55
HelpMessage = "The AD Graph Endpoint." ) ]
66
56
[ Alias ( "Graph" , "GraphUrl" ) ]
67
57
public string GraphEndpoint { get ; set ; }
68
58
69
- [ Parameter ( Position = 10 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
70
- HelpMessage = "Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net" ) ]
71
- public string AzureKeyVaultDnsSuffix { get ; set ; }
72
-
73
- [ Parameter ( Position = 11 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
74
- HelpMessage = "Resource identifier of Azure Key Vault data service that is the recipient of the requested token." ) ]
75
- public string AzureKeyVaultServiceEndpointResourceId { get ; set ; }
76
-
77
- [ Parameter ( Position = 12 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
78
- HelpMessage = "Dns suffix of Traffic Manager service." ) ]
79
- public string TrafficManagerDnsSuffix { get ; set ; }
80
-
81
- [ Parameter ( Position = 13 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
82
- HelpMessage = "Dns suffix of Sql databases created in this environment." ) ]
83
- public string SqlDatabaseDnsSuffix { get ; set ; }
84
-
85
- [ Parameter ( Position = 14 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
86
- HelpMessage = "Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net" ) ]
87
- public string AzureDataLakeStoreFileSystemEndpointSuffix { get ; set ; }
88
-
89
- [ Parameter ( Position = 15 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
90
- HelpMessage = "Dns Suffix of Azure Data Lake Analytics job and catalog services" ) ]
91
- public string AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix { get ; set ; }
92
-
93
59
[ Parameter ( Position = 16 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
94
60
HelpMessage = "Enable ADFS authentication by disabling the authority validation" ) ]
95
- [ Alias ( "OnPremise" ) ]
61
+ [ Alias ( "OnPremise" , "adfs" ) ]
96
62
public SwitchParameter EnableAdfsAuthentication { get ; set ; }
97
63
98
64
[ Parameter ( Position = 17 , Mandatory = false , ValueFromPipelineByPropertyName = true ,
@@ -114,21 +80,12 @@ protected override void ProcessRecord()
114
80
OnPremise = EnableAdfsAuthentication
115
81
} ;
116
82
117
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . PublishSettingsFileUrl ] = PublishSettingsFileUrl ;
118
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . ServiceManagement ] = ServiceEndpoint ;
119
83
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . ResourceManager ] = ResourceManagerEndpoint ;
120
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . ManagementPortalUrl ] = ManagementPortalUrl ;
121
84
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . StorageEndpointSuffix ] = StorageEndpoint ;
122
85
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . ActiveDirectory ] = ActiveDirectoryEndpoint ;
123
86
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . ActiveDirectoryServiceEndpointResourceId ] = ActiveDirectoryServiceEndpointResourceId ;
124
87
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . Gallery ] = GalleryEndpoint ;
125
88
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . Graph ] = GraphEndpoint ;
126
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . AzureKeyVaultDnsSuffix ] = AzureKeyVaultDnsSuffix ;
127
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . AzureKeyVaultServiceEndpointResourceId ] = AzureKeyVaultServiceEndpointResourceId ;
128
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . TrafficManagerDnsSuffix ] = TrafficManagerDnsSuffix ;
129
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . SqlDatabaseDnsSuffix ] = SqlDatabaseDnsSuffix ;
130
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix ] = AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix ;
131
- newEnvironment . Endpoints [ AzureEnvironment . Endpoint . AzureDataLakeStoreFileSystemEndpointSuffix ] = AzureDataLakeStoreFileSystemEndpointSuffix ;
132
89
newEnvironment . Endpoints [ AzureEnvironment . Endpoint . AdTenant ] = AdTenant ;
133
90
WriteObject ( ( PSAzureEnvironment ) profileClient . AddOrSetEnvironment ( newEnvironment ) ) ;
134
91
}
0 commit comments