Skip to content

Commit d4c47e3

Browse files
authored
Merge pull request Azure#312 from vivsriaus/AddApplication
Add managed application cmdlets
2 parents b2658e7 + 0af7d8e commit d4c47e3

File tree

43 files changed

+5520
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5520
-9
lines changed

ChangeLog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@
106106
* Add -PolicySetDefinition, -Sku and -NotScope parameters to New-AzureRmPolicyAssignment and Set-AzureRmPolicyAssignment cmdlets
107107
* Add support to pass in policy url to New-AzureRmPolicyDefinition and Set-AzureRmPolicyDefinition cmdlets
108108
* Add -Mode parameter to New-AzureRmPolicyDefinition cmdlet
109+
* Add ManagedApplication cmdlets
110+
- New-AzureRmManagedApplication cmdlet to create a managed application
111+
- Get-AzureRmManagedApplication cmdlet to list all managed applications under a subscription or to get a specific managed application
112+
- Remove-AzureRmManagedApplication cmdlet to delete a managed application
113+
- Set-AzureRmManagedApplication cmdlet to update an existing managed application
114+
* Add ManagedApplicationDefinition cmdlets
115+
- New-AzureRmManagedApplicationDefinition cmdlet to create a managed application definition using a zip file uri or using mainTemplate and createUiDefinition json files
116+
- Get-AzureRmManagedApplicationDefinition cmdlet to list all managed application definitions under a resource group or to get a specific managed application definition
117+
- Remove-AzureRmManagedApplicationDefinition cmdlet to delete a managed application definition
118+
- Set-AzureRmManagedApplicationDefinition cmdlet to update an existing managed application definition
109119
* Sql
110120
* Adding support for Virtual Network Rules
111121
- Adding Get-AzureRmSqlServerVirtualNetworkRule cmdlet which gets the virtual network rules by a specific rule name or a list of virtual network rules in an Azure Sql server.

src/ResourceManager/Resources/AzureRM.Resources.psd1

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# Module manifest for module 'PSGet_AzureRM.Resources'
33
#
44
# Generated by: Microsoft Corporation
@@ -107,12 +107,16 @@ CmdletsToExport = 'Get-AzureRmProviderOperation', 'Remove-AzureRmRoleAssignment'
107107
'Get-AzureRmPolicyDefinition', 'Get-AzureRmPolicySetDefinition',
108108
'New-AzureRmPolicyAssignment', 'New-AzureRmPolicyDefinition',
109109
'New-AzureRmPolicySetDefinition', 'Remove-AzureRmPolicyAssignment',
110-
'Remove-AzureRmPolicyDefinition',
111-
'Remove-AzureRmPolicySetDefinition', 'Set-AzureRmPolicyAssignment',
112-
'Set-AzureRmPolicyDefinition', 'Set-AzureRmPolicySetDefinition',
113-
'Remove-AzureRmResource', 'Remove-AzureRmResourceLock',
114-
'Set-AzureRmResource', 'New-AzureRmResource',
115-
'Set-AzureRmResourceLock', 'Get-AzureRmResource'
110+
'Remove-AzureRmPolicyDefinition', 'Remove-AzureRmPolicySetDefinition',
111+
'Set-AzureRmPolicyAssignment', 'Set-AzureRmPolicyDefinition',
112+
'Set-AzureRmPolicySetDefinition', 'Remove-AzureRmResource',
113+
'Remove-AzureRmResourceLock', 'Set-AzureRmResource',
114+
'New-AzureRmResource', 'Set-AzureRmResourceLock',
115+
'Get-AzureRmResource', 'Get-AzureRmManagedApplicationDefinition',
116+
'New-AzureRmManagedApplicationDefinition', 'Set-AzureRmManagedApplicationDefinition',
117+
'Remove-AzureRmManagedApplicationDefinition', 'Get-AzureRmManagedApplication',
118+
'New-AzureRmManagedApplication', 'Set-AzureRmManagedApplication',
119+
'Remove-AzureRmManagedApplication'
116120

117121
# Variables to export from this module
118122
# VariablesToExport = @()
@@ -155,6 +159,8 @@ PrivateData = @{
155159
* Add -PolicySetDefinition, -Sku and -NotScope parameters to New-AzureRmPolicyAssignment and Set-AzureRmPolicyAssignment cmdlets
156160
* Add support to pass in policy url to New-AzureRmPolicyDefinition and Set-AzureRmPolicyDefinition cmdlets
157161
* Add -Mode parameter to New-AzureRmPolicyDefinition cmdlet
162+
* Add ManagedApplicationDefinition cmdlets
163+
* Add ManagedApplication cmdlets
158164
'
159165

160166
# External dependent modules of this module

src/ResourceManager/Resources/ChangeLog.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
22-
## Version 4.4.0
21+
* Add ManagedApplication cmdlets
22+
- New-AzureRmManagedApplication cmdlet to create a managed application
23+
- Get-AzureRmManagedApplication cmdlet to list all managed applications under a subscription or to get a specific managed application
24+
- Remove-AzureRmManagedApplication cmdlet to delete a managed application
25+
- Set-AzureRmManagedApplication cmdlet to update an existing managed application
26+
* Add ManagedApplicationDefinition cmdlets
27+
- New-AzureRmManagedApplicationDefinition cmdlet to create a managed application definition using a zip file uri or using mainTemplate and createUiDefinition json files
28+
- Get-AzureRmManagedApplicationDefinition cmdlet to list all managed application definitions under a resource group or to get a specific managed application definition
29+
- Remove-AzureRmManagedApplicationDefinition cmdlet to delete a managed application definition
30+
- Set-AzureRmManagedApplicationDefinition cmdlet to update an existing managed application definition
2331
* Add PolicySetDefinition cmdlets
2432
- New-AzureRmPolicySetDefinition cmdlet to create a policy set definition
2533
- Get-AzureRmPolicySetDefinition cmdlet to list all policy set definitions or to get a specific policy set definition

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Commands.Resources.Rest.csproj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@
6565
<Compile Include="Components\ResourceIdUtility.cs" />
6666
<Compile Include="Components\ResourceManagerClientHelper.cs" />
6767
<Compile Include="Components\TagsHelper.cs" />
68+
<Compile Include="Entities\Applications\ApplicationArtifact.cs" />
69+
<Compile Include="Entities\Applications\ApplicationArtifactType.cs" />
70+
<Compile Include="Entities\Applications\ApplicationArtifactName.cs" />
71+
<Compile Include="Entities\Applications\ApplicationKind.cs" />
72+
<Compile Include="Entities\Applications\ApplicationPackageSupportUrls.cs" />
73+
<Compile Include="Entities\Applications\ApplicationPackageCustomerSupport.cs" />
74+
<Compile Include="Entities\Applications\ApplicationProviderAuthorization.cs" />
75+
<Compile Include="Entities\Applications\ApplicationDefinition.cs" />
76+
<Compile Include="Entities\Applications\Application.cs" />
77+
<Compile Include="Entities\Applications\ApplicationDefinitionProperties.cs" />
78+
<Compile Include="Entities\Applications\ApplicationProperties.cs" />
79+
<Compile Include="Entities\Applications\ApplicationLockLevel.cs" />
6880
<Compile Include="Entities\Authorization\Permission.cs" />
6981
<Compile Include="Entities\ErrorResponses\ErrorResponseMessage.cs" />
7082
<Compile Include="Entities\ErrorResponses\ErrorResponseMessageException.cs" />
@@ -108,6 +120,15 @@
108120
<Compile Include="Implementation\Features\GetAzureProviderFeatureCmdlet.cs" />
109121
<Compile Include="Implementation\Features\RegisterAzureProviderFeatureCmdlet.cs" />
110122
<Compile Include="Implementation\Locations\GetAzureLocationCmdlet.cs" />
123+
<Compile Include="Implementation\ManagedApplications\GetAzureManagedApplication.cs" />
124+
<Compile Include="Implementation\ManagedApplications\GetAzureManagedApplicationDefinition.cs" />
125+
<Compile Include="Implementation\ManagedApplications\RemoveAzureManagedApplication.cs" />
126+
<Compile Include="Implementation\ManagedApplications\RemoveAzureManagedApplicationDefinition.cs" />
127+
<Compile Include="Implementation\ManagedApplications\SetAzureManagedApplicationDefinition.cs" />
128+
<Compile Include="Implementation\ManagedApplications\SetAzureManagedApplication.cs" />
129+
<Compile Include="Implementation\ManagedApplications\NewAzureManagedApplicationDefinition.cs" />
130+
<Compile Include="Implementation\ManagedApplications\NewAzureManagedApplication.cs" />
131+
<Compile Include="Implementation\ManagedApplications\ManagedApplicationCmdletBase.cs" />
111132
<Compile Include="Implementation\Policy\GetAzurePolicySetDefinition.cs" />
112133
<Compile Include="Implementation\Policy\NewAzurePolicySetDefinition.cs" />
113134
<Compile Include="Implementation\Policy\PolicyCmdletBase.cs" />

src/ResourceManager/Resources/Commands.ResourceManager/Cmdlets/Components/Constants.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ public static class Constants
2929
/// </summary>
3030
public static readonly string MicrosoftAuthorizationNamespace = "Microsoft.Authorization";
3131

32+
/// <summary>
33+
/// The <c>Microsoft.Solutions</c> namespace.
34+
/// </summary>
35+
public static readonly string MicrosoftSolutionNamespace = "Microsoft.Solutions";
36+
3237
/// <summary>
3338
/// The string literal <c>ResourceGroups</c>
3439
/// </summary>
@@ -54,6 +59,10 @@ public static class Constants
5459
/// </summary>
5560
public static readonly string DefaultApiVersion = "2015-01-01";
5661

62+
/// <summary>
63+
/// The default appliction API version.
64+
/// </summary>
65+
public static readonly string ApplicationApiVersion = "2017-09-01";
5766

5867
/// <summary>
5968
/// The default resources API version.
@@ -130,6 +139,16 @@ public static class Constants
130139
/// </summary>
131140
public static readonly string MicrosoftAuthorizationPolicyAssignmentType = Constants.MicrosoftAuthorizationNamespace + "/policyassignments";
132141

142+
/// <summary>
143+
/// The application definition resource type.
144+
/// </summary>
145+
public static readonly string MicrosoftApplicationDefinitionType = Constants.MicrosoftSolutionNamespace + "/applicationdefinitions";
146+
147+
/// <summary>
148+
/// The application resource type.
149+
/// </summary>
150+
public static readonly string MicrosoftApplicationType = Constants.MicrosoftSolutionNamespace + "/applications";
151+
133152
/// <summary>
134153
/// The type name of the generic resource.
135154
/// </summary>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Application
16+
{
17+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections;
18+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
19+
using Newtonsoft.Json;
20+
21+
/// <summary>
22+
/// The application object.
23+
/// </summary>
24+
public class Application
25+
{
26+
/// <summary>
27+
/// The application name.
28+
/// </summary>
29+
[JsonProperty(Required = Required.Default)]
30+
public string Name { get; set; }
31+
32+
/// <summary>
33+
/// Gets or sets the application location.
34+
/// </summary>
35+
[JsonProperty(Required = Required.Default)]
36+
public string Location { get; set; }
37+
38+
/// <summary>
39+
/// The application properties.
40+
/// </summary>
41+
[JsonProperty(Required = Required.Default)]
42+
public ApplicationProperties Properties { get; set; }
43+
44+
/// <summary>
45+
/// The marketplace plan information.
46+
/// </summary>
47+
[JsonProperty(Required = Required.Default)]
48+
public ResourcePlan Plan { get; set; }
49+
50+
/// <summary>
51+
/// The application kind.
52+
/// </summary>
53+
[JsonProperty(Required = Required.Default)]
54+
public ApplicationKind Kind { get; set; }
55+
56+
/// <summary>
57+
/// Gets or sets the tags.
58+
/// </summary>
59+
[JsonProperty(Required = Required.Default)]
60+
public InsensitiveDictionary<string> Tags { get; set; }
61+
}
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Application
16+
{
17+
using Newtonsoft.Json;
18+
19+
/// <summary>
20+
/// The application artifact.
21+
/// </summary>
22+
public class ApplicationArtifact
23+
{
24+
/// <summary>
25+
/// The application artifact name.
26+
/// </summary>
27+
[JsonProperty(Required = Required.Always)]
28+
public ApplicationArtifactName Name { get; set; }
29+
30+
/// <summary>
31+
/// The application artifact type.
32+
/// </summary>
33+
[JsonProperty(Required = Required.Always)]
34+
public ApplicationArtifactType Type { get; set; }
35+
36+
/// <summary>
37+
/// The application artifact blob uri.
38+
/// </summary>
39+
[JsonProperty(Required = Required.Always)]
40+
public string Uri { get; set; }
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Application
16+
{
17+
/// <summary>
18+
/// The artifact name.
19+
/// </summary>
20+
public enum ApplicationArtifactName
21+
{
22+
/// <summary>
23+
/// Appliance Resource Template.
24+
/// </summary>
25+
ApplianceResourceTemplate,
26+
27+
/// <summary>
28+
/// Create UI Definition.
29+
/// </summary>
30+
CreateUiDefinition
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Application
16+
{
17+
/// <summary>
18+
/// The artifact type.
19+
/// </summary>
20+
public enum ApplicationArtifactType
21+
{
22+
/// <summary>
23+
/// Template artifact type.
24+
/// </summary>
25+
Template,
26+
27+
/// <summary>
28+
/// Custom artifact type.
29+
/// </summary>
30+
Custom
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Application
16+
{
17+
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Collections;
18+
using Newtonsoft.Json;
19+
20+
/// <summary>
21+
/// The application definition object.
22+
/// </summary>
23+
public class ApplicationDefinition
24+
{
25+
/// <summary>
26+
/// The application defintion name.
27+
/// </summary>
28+
[JsonProperty(Required = Required.Default)]
29+
public string Name { get; set; }
30+
31+
/// <summary>
32+
/// Gets or sets the application definition location.
33+
/// </summary>
34+
[JsonProperty(Required = Required.Default)]
35+
public string Location { get; set; }
36+
37+
/// <summary>
38+
/// The application definition properties.
39+
/// </summary>
40+
[JsonProperty(Required = Required.Default)]
41+
public ApplicationDefinitionProperties Properties { get; set; }
42+
43+
/// <summary>
44+
/// Gets or sets the tags.
45+
/// </summary>
46+
[JsonProperty(Required = Required.Default)]
47+
public InsensitiveDictionary<string> Tags { get; set; }
48+
}
49+
}

0 commit comments

Comments
 (0)