azure-samples / azure-samples-net-management Goto Github PK
View Code? Open in Web Editor NEWAzure .NET Management Libraries Code Sample
License: MIT License
Azure .NET Management Libraries Code Sample
License: MIT License
I cloned my repo and updated the Azure.Identity
and Azure.ResourceManager.Resources
packages to the latest versions. This caused issues, so I reverted the changes. I tried just updating Azure.ResourceManager.Resources
from 1.0.0-preview.1 to version 1.0.0 and suddenly some classes were no longer in the namespace.
The classes/objects I spotted with issues were in the resources/deploy-using-arm-template
project:
We should update samples in this repo to our track 2 SDK, but first let's finish all our generated samples
When creating a resource through the Azure portal the deployment history can be viewed for the resource group and it also provides a preview of the ARM template and parameters of the deployment. For example of what I mean, please see this article: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-history?tabs=azure-portal#resource-group-deployments.
However, when I create resources programmatically with the .NET SDK (not using ARM), my new resources do not show in the deployment history for the resource group.
Is there something additional I need to do in the SDK for the deployments to show in the deployment history?
Hi!
I'm migrating from the old management SDK and struggling with creating container instances with a lot of options. Example would be appreciated.
How do I set exposed UDP ports, and command line options? With the old Fluent SDK it was done like this:
.DefineContainerInstance(containerId + "-1")
.WithExternalUdpPort(51234)
.WithStartingCommandLine(_containerConfig.ImageExecutable, arguments)
.Attach()
Is there a way to get the Azure Resource ID of a given Public IP if we know the IP address?
Input:- 40.81.207.37
Output:- /subscription/xxxx/resourceGroups/xxxx/providers/Microsoft.Network/publicIPAddresses/
Azure.ResourceManager.Network.PublicIPAddressCollection doesn't seem to have the necessary method..
Hello,
I'm having trouble finding the resourcegroup property of a vm instance.
var computeClient = new ComputeManagementClient(subscriptionId, new DefaultAzureCredential());
var virtualMachines = computeClient.VirtualMachines;
foreach (var virtualMachine in virtualMachines.ListAll())
{
foreach (KeyValuePair<string, string> tag in virtualMachine.Tags)
{
if(tag.Key.Equals("sla") && (tag.Value.Equals("businessday")))
{
log.LogInformation("found vms with tag: " + virtualMachine.Name);
//await virtualMachines.StartDeallocateAsync(, virtualMachine.Name);
}
}
}
As stated on https://docs.microsoft.com/en-us/dotnet/api/azure.resourcemanager.compute.virtualmachinesoperations.startdeallocateasync?view=azure-dotnet-preview
virtualMachines.StartDeallocateAsync requires resourcegroupname parameter.
Thanks in advance
E.g.
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'KeyVaultManagementClient' could not be found (are you missing a using directive or an assembly reference?) ManageKeyVault ..\samples\keyvault\manage-key-vault\Program.cs 36 Active
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.