Azure WORM/ immutable retention lock on containers for legacy java SDK - azure

I wan to set up a immutable policy for blob storage using the Java "Legacy" SDK (version 8.3), but I can't seem to find any documentation showing how to do this, or if it's even possible from the legacy version. The website shows how to do this from the portal, CLI and PowerShell, but I've yet to find any reference to the Java SDK. Am I missing some documentation somewhere?

I believe the closest thing to docs you'd be able to find on this would be the SDK documentation here: https://learn.microsoft.com/en-us/java/api/com.azure.resourcemanager.storage.fluent.models.immutabilitypolicyinner?view=azure-java-stable and here for legal holds: https://learn.microsoft.com/en-us/java/api/com.azure.resourcemanager.storage.fluent.models.legalholdinner?view=azure-java-stable.
It doesn't seem like there is a lot of great documentation on how to use them, but at least these give you the class and method names.

Related

Azure.Security.KeyVault.Secrets vs Microsoft.Azure.KeyVault

These 2 libraries seem to serve a similar purpose: to securely store and control the access to tokens, passwords, API keys, and other secrets.
I have been using Microsoft.Azure.KeyVault with some success, not for configuration secrets, but for keys.
Not until recently did I discover Azure.Security.KeyVault.Secrets.
In release notes I found this:
Updated Microsoft.Azure.KeyVault with its successor Azure.Security.KeyVault.Secrets to resolve key vault references.
What are the distinguishing attributes of the 2 libraries, and how to determine the appropriate choice.
Should I interpret the release note to imply Microsoft.Azure.KeyVault is obsolete or will be deprecated?
What are the distinguishing attributes of the 2 libraries, and how to
determine the appropriate choice.
The package Azure.Security.KeyVault.Secrets is the most up-to-date version of the Key Vault client library, which is recommended to use for any new project. For main differences from the legacy one, see this
Major changes from Microsoft.Azure.KeyVault. For usage, please refer to this doc.
The other package Microsoft.Azure.KeyVault is now a legacy one, if you have some old projects which use it, you can keep using it. For usage, please refer to this doc.
You can refer to this article for more details why these new client libraries(including Azure.Security.KeyVault.Secrets) are published.
Should I interpret the release note to imply Microsoft.Azure.KeyVault
is obsolete or will be deprecated?
It is hard to say if the old one will be deprecated in the future. At least from the
Release History, it says the new one is not a direct replacement for Microsoft.Azure.KeyVault(like other azure services, for example, azure storage service published a new version package recently, but not officially pronounced the old one is deprecated). But we suggest you should use the new one in any new create project like it says in the doc, a screenshot of this:
Hope it helps.

How to list all azure container using nodejs or any otherway?

Is there is any way to list all containers from an Azure storage account?
If it is nodejs means very helpful to me, else please suggest me the way to list all container.
You can try blobService.listContainersSegmented under azure-storage-node SDK (sample code here).
For future googlers: The referenced azure-storage-node SDK mentioned at the accepted answer is now old (will be deprecated soon). The new sdk for JS (both for node and browser environments) is called azure-sdk-for-js can be found here.
To list all containers, you use the same listContainersSegmented function but now it is a part of the ServiceURL class, and a sample code on how to use it can be found here under the section "show containers names".
This documentaition also includes bunch of other basic and useful stuff to do with blobs, so have fun :)
You are probably looking for the List Containers operation within the Blob Service REST API

Is Azure Storage REST API version "2015-07-08" used by storage client v7 documented anywhere?

I went to update the Azure storage client nuget here, and before pulling it read the changelog. In the changelog they say "support for 2015-07-08 REST version. Please see our REST API documentation and blogs for information...". I have looked all over and can't find any documentation for that API version (2015-07-08) of what was changed. Does anyone know what was changed and/or where the changes are documented?
Version 7.x of the client library is based on version 2015-07-08 (the latest version). However, the change to the service with this version, as compared to version 2015-04-05, is very minor. The only change is the addition of the GetPageRangesDiff/GetPageRangesDiffAsync methods on CloudPageBlob. These methods support incremental snapshots (see https://azure.microsoft.com/documentation/articles/storage-incremental-snapshots/). There is no other change to the service.
Also see https://msdn.microsoft.com/en-us/library/azure/ee691973.aspx for the change to Get Page Ranges.
We will provide information in the versioning section for 2015-07-08 soon.
Didn't find what was exactly changed, but I think the documentation refers to https://github.com/Azure/azure-storage-net/tree/master/Documentation and blogs at http://blogs.msdn.com/b/windowsazurestorage/.

Lost method since upgrading to Azure Storage

I cant find a method since I upgraded the Azure storage dlls.
The static method I cant find is: CloudTableClient.CreateTablesFromModel
The old class:
http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storageclient.cloudtableclient_methods.aspx
This is the new class:
http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storage.table.cloudtableclient_methods.aspx
I did some searching but couldn't find a word about this being replaced or deleted.
Does anybody have an idea?
Storage client library 2.0 is quite different from the previous version and a number of methods have been removed in the newer version. This method is one of them. If you look under the remarks section on this page: http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storageclient.cloudtableclient.createtablesfrommodel.aspx, it is recommended that you not use this method.
Since these 2 versions are quite different, it is recommended that you read up the following blog posts from the storage team before upgrading your code to use the latest version:
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/10/29/introducing-windows-azure-storage-client-library-2-0-for-net-and-windows-runtime.aspx
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/10/29/windows-azure-storage-client-library-2-0-breaking-changes-amp-migration-guide.aspx
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/11/06/windows-azure-storage-client-library-2-0-tables-deep-dive.aspx
I also wrote a blog post about migrating code from storage client library 1.7 to 2.0 which you can read here: http://gauravmantri.com/2012/11/17/storage-client-library-2-0-migrating-table-storage-code/

Microsoft.WindowsAzure.Storage vs Microsoft.WindowsAzure.StorageClient

What's the difference between these two assemblies and when should I use each? I find that there are class name collisions between them so I imagine that I should only use one.
Example
Microsoft.WindowsAzure.Storage has Microsoft.WindowsAzure.Storage.Table.CloudTableClient
Microsoft.WindowsAzure.StorageClient has Microsoft.WindowsAzure.StorageClient.CloudTableClient
This seems very confusing. I can't imagine that Microsoft intends these to both be used in the same project.
Microsoft.WindowsAzure.Storage is version 2.0 of storage client library while Microsoft.WindowsAzure.StorageClient is the older version. There have been many changes in version 2.0 of the library (some of them are breaking). If you're starting new, I would actually recommend using 2.0 of the library as I found it more intuitive and easy to use than the older version. If you have an application which makes use of 1.7 version of the library, before you decide to upgrade, I would actually recommend reading the following blog posts by Windows Azure Storage Team:
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/10/29/introducing-windows-azure-storage-client-library-2-0-for-net-and-windows-runtime.aspx
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/10/29/windows-azure-storage-client-library-2-0-breaking-changes-amp-migration-guide.aspx
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/11/06/windows-azure-storage-client-library-2-0-tables-deep-dive.aspx
However please note that there're still some components that your application might be using which has a dependency on storage client library 1.7. Windows Azure Diagnostics is one of them. So for some time you will need to use both versions. Good thing is that you can use both versions simultaneously in your project.
Hope this helps.
EDIT:
I also wrote a few blog posts about migrating code from storage client library 1.7 to 2.0 where I covered some basic scenarios. You can read those posts here:
Migrating blob storage code: http://gauravmantri.com/2012/11/28/storage-client-library-2-0-migrating-blob-storage-code/
Migrating queue code: http://gauravmantri.com/2012/11/24/storage-client-library-2-0-migrating-queue-storage-code/
Migrating table storage code: http://gauravmantri.com/2012/11/17/storage-client-library-2-0-migrating-table-storage-code/

Resources