Skip to content

Iot Hub Commandlets #3250

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
merged 24 commits into from
Dec 12, 2016
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
1 change: 1 addition & 0 deletions AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<XUnitTests Include=".\src\ResourceManager\Dns\Commands.Dns.Test\bin\Debug\Microsoft.Azure.Commands.Dns.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\HDInsight\Commands.HDInsight.Test\bin\Debug\Commands.HDInsight.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Insights\Commands.Insights.Test\bin\Debug\Microsoft.Azure.Commands.Insights.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\IotHub\Commands.IotHub.Test\bin\Debug\Microsoft.Azure.Commands.IotHub.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\LogicApp\Commands.LogicApp.Test\bin\Debug\Microsoft.Azure.Commands.LogicApp.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Network\Commands.Network.Test\bin\Debug\Microsoft.Azure.Commands.Network.Test.dll"/>
Expand Down
84 changes: 82 additions & 2 deletions setup/azurecmdfiles.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<DirectoryRef Id="PowerShellFolder">
<Directory Id="dirB60B5B1F56FA5598EFFC960CA393FDCE" Name="ResourceManager">
<Directory Id="dir9E409EB63EF03736275B51044C819FD8" Name="AzureResourceManager">
<Directory Id="dir887149D384FA060718922AB0DA37F700" Name="AzureRM.AnalysisServices">
<Directory Id="dir887149D384FA060718922AB0DA37F700" Name="AzureRM.AnalysisServices">
<Component Id="cmpE1934F4197E90691F3F4FD7D0D17559F" Guid="*">
<File Id="filDF0DDEF57A08314CBF3061F3513F605F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.AnalysisServices\AzureRM.AnalysisServices.psd1" />
</Component>
Expand Down Expand Up @@ -1347,7 +1347,9 @@
<File Id="fil0BC58752DC9792178625EA842D496953" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
</Component>
<Component Id="cmpE389288C5CA88334DBFAA1A298DFDC57" Guid="*">
<File Id="fil3D9EA2F20E6C186138C8614E1378739F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Rest.ClientRuntime.Azure.dll" />

<File Id="fil3D9EA2F20E6C186138C8614E1378739F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Rest.ClientRuntime.Azure.dll" />

</Component>
<Component Id="cmpE0A4360ECC0B00A74E3D29F280B2FD2E" Guid="*">
<File Id="fil1FB9B7667782F24EAC7BB0B862A44410" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\Microsoft.Rest.ClientRuntime.dll" />
Expand All @@ -1368,6 +1370,65 @@
<File Id="filF161B346D39B2AA99CBA7434BC7AD7C6" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Insights\System.Spatial.dll" />
</Component>
</Directory>
<Directory Id="dirF584E982D38358ACFBC86D63B65C660D" Name="AzureRM.IotHub">
<Component Id="cmp15C1FCDD65CEFB52792FB6ED02513E11" Guid="*">
<File Id="fil460159C989FDF3CB2AF8CD1E8424DA14" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\AzureRM.IotHub.psd1" />
</Component>
<Component Id="cmpA2E684A10B5D1FE61816950EA488B619" Guid="*">
<File Id="filED0A74764367CDCB2F139E0F579A43A9" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Hyak.Common.dll" />
</Component>
<Component Id="cmp66C6BE87523BE39FE5A322FE66E678E7" Guid="*">
<File Id="filBE6DD300B7F72099FD56C5BD95F6BB7A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.ApplicationInsights.dll" />
</Component>
<Component Id="cmp86081ADAC830B3D07556FEAFE131C749" Guid="*">
<File Id="fil5F6C619C11649230601A4EDB0A27B1B1" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.Common.Authentication.dll" />
</Component>
<Component Id="cmpE29D513714759F365A7C0A2A7F2B5DC6" Guid="*">
<File Id="fil1DC7AA19B6A146E17F6C7BF32B2DC1DC" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.IotHub.dll" />
</Component>
<Component Id="cmpC67F14F377421F1BCD74EC5A579D43CB" Guid="*">
<File Id="filE9553CEC1D67AB3D4B77759239D60B18" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.IotHub.dll-Help.xml" />
</Component>
<Component Id="cmpD844DA64698210481D550B5CD8799D26" Guid="*">
<File Id="filA23D9B350E9B87D17B90B2181AE71E4B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Commands.IotHub.format.ps1xml" />
</Component>
<Component Id="cmpB0A6B8E083FEAEC29D41F54189DC6605" Guid="*">
<File Id="fil0CEDF2B42D00B6AA1ED0146F283B5678" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Common.dll" />
</Component>
<Component Id="cmpB2620706D83DB49D3434BB39A5495055" Guid="*">
<File Id="fil25CE08F7EB56AE8EC1194FA03EBC6672" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Common.NetFramework.dll" />
</Component>
<Component Id="cmpF5573D31421ADB24A2D619C190A97C1F" Guid="*">
<File Id="fil4027DB096F59C3C354B02A083B2C8154" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Management.IotHub.dll" />
</Component>
<Component Id="cmp387EE183994C262A555F695B8BFFE393" Guid="*">
<File Id="fil5C4561EFB7C252FCFA3783C6CB7C8F9E" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Azure.Test.HttpRecorder.dll" />
</Component>
<Component Id="cmp6A1E4D27103974825902C21E8E1FD2E2" Guid="*">
<File Id="fil49E21EDF304CA9D7462C8423A65E3A7D" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
</Component>
<Component Id="cmp039E84251C0B3C024FA68A2AC05A698A" Guid="*">
<File Id="fil143C5B5F0BC4A6C0D42A1C64A606D01F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll" />
</Component>
<Component Id="cmp03ACB56F799100284032737A10AD9135" Guid="*">
<File Id="fil4D7C8919366F59A238D118AB8FEA5134" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
</Component>
<Component Id="cmpBE50235D76A86D1FCDD23FB9F4F11656" Guid="*">
<File Id="fil3C4B3CF7411853653290931AD6AC008D" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Rest.ClientRuntime.Azure.dll" />
</Component>
<Component Id="cmp34F1F991C47614267C6CCECB4F2F10BB" Guid="*">
<File Id="fil3E4080973B3233082A3B718B70A08143" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Rest.ClientRuntime.dll" />
</Component>
<Component Id="cmp23612602759A96AFDD9DD8C6C6E932E9" Guid="*">
<File Id="filE005DDDCC0DE7E9DD8A7E3DB2FDB4071" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.Threading.Tasks.dll" />
</Component>
<Component Id="cmpE8882F4395006099566B21CF86176666" Guid="*">
<File Id="filCCA9DDA286BAE690774FAA2B86D1065C" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Microsoft.WindowsAzure.Commands.Common.dll" />
</Component>
<Component Id="cmpB1CD14B4C7D4BD71D820606900089681" Guid="*">
<File Id="fil41CD3B4B683419526E6C17ECD9CCA694" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.IotHub\Newtonsoft.Json.dll" />
</Component>
</Directory>
<Directory Id="dirA5BF4C5FC88CC5FD4E43A0FA840806C7" Name="AzureRM.KeyVault">
<Component Id="cmpAB04FC1EEE889CA90013762F64086BFF" Guid="*">
<File Id="fil83ACE69C51FD4368547AE421E6E1E09A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.KeyVault\AzureRM.KeyVault.psd1" />
Expand Down Expand Up @@ -5966,6 +6027,25 @@
<ComponentRef Id="cmpD0CBA309930AE994CD67A5EB7C9B5B10" />
<ComponentRef Id="cmp7781002FCC3D1B3F0519A286C3E916E9" />
<ComponentRef Id="cmp09C89A8B21C5D2C4595F1D35C982F73B" />
<ComponentRef Id="cmp15C1FCDD65CEFB52792FB6ED02513E11" />
<ComponentRef Id="cmpA2E684A10B5D1FE61816950EA488B619" />
<ComponentRef Id="cmp66C6BE87523BE39FE5A322FE66E678E7" />
<ComponentRef Id="cmp86081ADAC830B3D07556FEAFE131C749" />
<ComponentRef Id="cmpE29D513714759F365A7C0A2A7F2B5DC6" />
<ComponentRef Id="cmpC67F14F377421F1BCD74EC5A579D43CB" />
<ComponentRef Id="cmpD844DA64698210481D550B5CD8799D26" />
<ComponentRef Id="cmpB0A6B8E083FEAEC29D41F54189DC6605" />
<ComponentRef Id="cmpB2620706D83DB49D3434BB39A5495055" />
<ComponentRef Id="cmpF5573D31421ADB24A2D619C190A97C1F" />
<ComponentRef Id="cmp387EE183994C262A555F695B8BFFE393" />
<ComponentRef Id="cmp6A1E4D27103974825902C21E8E1FD2E2" />
<ComponentRef Id="cmp039E84251C0B3C024FA68A2AC05A698A" />
<ComponentRef Id="cmp03ACB56F799100284032737A10AD9135" />
<ComponentRef Id="cmpBE50235D76A86D1FCDD23FB9F4F11656" />
<ComponentRef Id="cmp34F1F991C47614267C6CCECB4F2F10BB" />
<ComponentRef Id="cmp23612602759A96AFDD9DD8C6C6E932E9" />
<ComponentRef Id="cmpE8882F4395006099566B21CF86176666" />
<ComponentRef Id="cmpB1CD14B4C7D4BD71D820606900089681" />
<ComponentRef Id="cmpAB04FC1EEE889CA90013762F64086BFF" />
<ComponentRef Id="cmp4714276292444ADF7D34F509F31C8102" />
<ComponentRef Id="cmp007494D6DDD084F46271414EDBAE4A28" />
Expand Down
111 changes: 111 additions & 0 deletions src/ResourceManager/IotHub/AzureRM.IotHub.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will also need to copy over the documentation folder for the new cmdlets. This will allow you to document release notes and breaning changes

# Module manifest for module 'Microsoft.Azure.Commands.IotHub'
#
# Generated by: Microsoft Corporation
#
# Generated on: 10/7/2016
#

@{

# Version number of this module.
ModuleVersion = '1.0.0'

# ID used to uniquely identify this module
GUID = '51A3A993-FE39-4F8F-A437-2CB751584AF5'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - IotHub service cmdlets for Azure Resource Manager'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'

# Name of the Windows PowerShell host required by this module
PowerShellHostName = ''

# Minimum version of the Windows PowerShell host required by this module
PowerShellHostVersion = ''

# Minimum version of the .NET Framework required by this module
DotNetFrameworkVersion = '4.0'

# Minimum version of the common language runtime (CLR) required by this module
CLRVersion='4.0'

# Processor architecture (None, X86, Amd64, IA64) required by this module
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '2.3.0'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module
ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @(
'.\Microsoft.Azure.Commands.IotHub.format.ps1xml'
)

# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = @(
'.\Microsoft.Azure.Commands.IotHub.dll'
)

# Functions to export from this module
FunctionsToExport = '*'

# Cmdlets to export from this module
CmdletsToExport = '*'

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module
AliasesToExport = @()

# List of all modules packaged with this module
ModuleList = @()

# List of all files packaged with this module
FileList = @()

# Private data to pass to the module specified in ModuleToProcess
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','IoT','IoT Hub'

# A URL to the license for this module.
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/Azure/azure-powershell'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/Azure/azure-powershell/blob/dev/ChangeLog.md'

} # End of PSData hashtable

} # End of PrivateData hashtable

}
73 changes: 73 additions & 0 deletions src/ResourceManager/IotHub/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!--
Please leave this section at the top of the change log.

Changes for the current release should go under the section titled "Current Release", and should adhere to the following format:

## Current Release
* Overview of change #1
- Additional information about change #1
* Overview of change #2
- Additional information about change #2
- Additional information about change #2
* Overview of change #3
* Overview of change #4
- Additional information about change #4

## YYYY.MM.DD - Version X.Y.Z (Previous Release)
* Overview of change #1
- Additional information about change #1
-->
## Current Release

## Version 1.0.0
* Adds commandlets for the Azure IoT Hub
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please listy the capabilities of these cmdlets, and the resources they allow you to manage.

- Add-AzureRmIotHubEventHubConsumerGroup
- Adds an Event Hub consumer group for an existing Azure IoT hub.

- Add-AzureRmIotHubKey
- Adds a new key to an existing Azure IoT hub.

- Get-AzureRmIotHub
- Gets the properties of an exisiting Azure IoT hub.

- Get-AzureRmIotHubConnectionString
- Gets the connection strings of an existing Azure IoT hub.

- Get-AzureRmIotHubEventHubConsumerGroup
- Gets the list of event hub consumer groups for the specified eventhub endpoint.

- Get-AzureRmIotHubJob
- Gets the properties of a set of Azure IoT hubs in a subscription or resource group.

- Get-AzureRmIotHubKey
- Gets the information related to a list of keys of an Azure IoT hub.

- Get-AzureRmIotHubQuotaMetric
- Gets the quota metrics for an Azure IoT hub.

- Get-AzureRmIotHubRegistryStatistic
- Gets the registry statistics for an Azure IoT hub.

- Get-AzureRmIotHubValidSku
- Gets the list of valid Skus to which an existing Azure IoT hub can transition to.

- New-AzureRmIotHub
- Creates a new Azure IoT hub.

- New-AzureRmIotHubExportDevices
- Starts a new job for exporting the devices of an Azure IoT hub.

- New-AzureRmIotHubImportDevices
- Starts a new job for importing the devices of an Azure IoT hub.

- Remove-AzureRmIotHub
- Removes an Azure IoT hub.

- Remove-AzureRmIotHubEventHubConsumerGroup
- Removes a consumer group for the specified event hub endpoint of a give Azure IoT hub.

- Remove-AzureRmIotHubKey
- Removes a key from an Azure IoT hub.

- Set-AzureRmIotHub
- Updates the properties of an Azure IoT hub.
Loading