h3. Reusing a single HttpClient instance
h4. Can I use a single HttpClient instance to make multiple calls?
h3. Cookie Links (for later digestion)
$subName = 'my azure subscription name here' | |
$rgName = 'nesql-june24-demo2' | |
$region = "East US" | |
$serverName = 'billwilder911' | |
$myIp = "107.92.120.203" #### CHANGES A LOT! | |
Add-AzureRmAccount # then log in interactively, including with 2FA | |
Select-AzureRmSubscription -SubscriptionName $subName | |
# How many regions am I allowed to deploy SQL to? |
password="SomeTopSecretPassword" | |
email="bill.wilder@example.com" | |
# openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=DevPartners/emailAddress=$email" | |
# generate .pem (full public/private certificate) | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/emailAddress=$email" | |
# generate .pfx (full public/private certificate) from .pem | |
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:$password | |
# generate .cer (public key) from .pem | |
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer |
h3. Reusing a single HttpClient instance
h4. Can I use a single HttpClient instance to make multiple calls?
h3. Cookie Links (for later digestion)
(Get-AzureRmSubscription -SubscriptionId (Get-AzureRmContext).Subscription).SubscriptionName |
I hereby claim:
To claim this, I am signing this object:
Function Format-AzureStorageKey { | |
[CmdletBinding()] | |
Param ( | |
[parameter(Mandatory=$True,ValueFromPipelineByPropertyName=$True)] | |
[string[]] $Primary, | |
[parameter(Mandatory=$True,ValueFromPipelineByPropertyName=$True)] | |
[string[]] $Secondary, | |
[parameter(Mandatory=$True,ValueFromPipelineByPropertyName=$True)] | |
[string[]] $StorageAccountName, |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
# http://stackoverflow.com/questions/192109/is-there-a-function-in-python-to-print-all-the-current-properties-and-values-of | |
dir(somevariable) -- shows the properties available | |
from azure.servicemanagement import * | |
import platform | |
import os | |
### | |
print("CHANGE THE VALUE of 'subscription_id' and create the correct certificate or this will NOT WORK") | |
### | |
plat = platform.system() | |
print("Platform == " + plat) |