paulomarquesc / AzureRmStorageTable

MIT License
40 stars 28 forks source link

Added support for az storagaccount and loading of external modules #46

Closed WithHolm closed 3 years ago

WithHolm commented 5 years ago

Added support for az storagaccount, both as a parameter and as a piped element. TableName still has to be defined.

Also added Requiremodules to psd1, with reference to the correct version as specified by you and with the correct module GUID

paulomarquesc commented 4 years ago

Hi WithHolm,

For item 1 in your description, what would be the use-case for directly supporting it? I provided a code sample in the isuse (https://github.com/paulomarquesc/AzureRmStorageTable/issues/44) you opened.

For item 2, that sounds good.

Regards

Paulo

WithHolm commented 4 years ago

1# This also means that you dont need requires in the psm1

2# You are probably right, and it might feel like a feature creep, but then again, if you already have the storageaccount context for usage to other SA services, why would one need to make another call to Azure to get the same context, and have to define storageaccount and resourcegroup again (Adding ~1,3 sec instead of ~300 MS)?

$SA = get-azStorageAccount  -ResourceGroupName 'SomeRG' -StorageAccountName 'StorAacc'
$Blob = $sa|Get-AzStorageContainer -Name "SomeContainer"
$Queue = $sa|Get-AzStorageQueue -Name "Somequeue"
#Current with storagetable az function
$CTable1 = ($sa|Get-AzStorageTable -Name 'Sometable').cloudtable
#Suggested 
$CTable2 = $sa|Get-AzTableTable -Name 'SomeOtherTable'

In Addition, i might also send a new pull request for using connection string aswell, for usage with Az Functions Like this,

WithHolm commented 4 years ago

Hi, I dont know if this works (reply all in mail). please let me know if you received this, kaia.

take a look at the readme https://github.com/paulomarquesc/AzureRmStorageTable/blob/master/docs/README.md#installationsource-code for instructions of how to install the module :)

--Philip

On Wed, Jun 3, 2020 at 11:29 AM kaiaschulz notifications@github.com wrote:

Downloaded the repository as .zip-file and tried to import it as module in Azure.

Got the following failure: Error importing the module AzureRmStorageTable-master. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: Cannot import the module of name AzureRmStorageTable-master, as the module structure was invalid.

Any hints for successfully adding this module to Azure?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paulomarquesc/AzureRmStorageTable/pull/46#issuecomment-638078963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ3VRUYDAS3SCIDVAKKOJDRUYJVVANCNFSM4JJ74YKA .

paulomarquesc commented 4 years ago

@PaulCheng , can you please follow up on this?