This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def set_headers(credentials): | |
| headers = credentials.signed_session().headers | |
| headers['Content-type'] = 'application/json' | |
| return(headers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-AccessToken { | |
| $context = Get-AzContext | |
| $profile = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile | |
| $profileClient = New-Object -TypeName Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient -ArgumentList ($profile) | |
| $token = $profileClient.AcquireAccessToken($context.Subscription.TenantId) | |
| return $token.AccessToken | |
| } | |
| function Get-AzSubscriptionPartner { | |
| param( | |
| [Parameter(Mandatory = $true)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: localhost | |
| connection: local | |
| vars: | |
| exabgp_conf: | |
| - section: neighbor | |
| name: 127.0.0.15 | |
| config: |- | |
| local-as 64512; | |
| local-address 127.0.0.1; | |
| description "Example neighbor"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import argparse | |
| from azure.keyvault import KeyVaultClient | |
| from azure.common.credentials import get_azure_cli_credentials | |
| from msrestazure.azure_active_directory import MSIAuthentication | |
| parser = argparse.ArgumentParser( | |
| description= | |
| 'Script to retrieve azure keyvault secret using Microsoft MSI or Azure.Cli authentication' | |
| ) |
NewerOlder