EdgeGrid credentials
Synopsis
Load EdgeGrid credentials to environment variables.
Syntax
Import-EdgegridCredentials [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-EnvironmentPrefix <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Import-EdgegridCredentials -HostName <String> -ClientToken <String> -AccessToken <String> -ClientSecret <String> [-AccountSwitchKey <String>] [-EnvironmentPrefix <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
This function takes in either a set of EdgeGrid credentials or a .edgerc file and section and sets the appropriate environment variables for subsequent requests. This allows you to set the credentials your requests will use for a given sessionin your shell, and avoid having to provide these for every command. To clear your credentials use Clear-EdgeGridCredentials.
Alongside your credentials you can also specify an EnvironmentPrefix. This will be added as a prefix to your environment variables, e.g. -EnvironmentPrefix MyCreds will result in AKAMAI_MYCREDS_HOST, and so on. These credentials will be loaded by any command which specifies -Section of MyCreds.
Parameters
‑AccessTokenAlias: ‑access_tokenConditionally required | Access token. |
‑AccountSwitchKeyAlias: ‑AccountKey, account_key | An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use Get-AccountSwitchKey. |
‑ClientSecretAlias: ‑client_secretConditionally required | The API credential's client secret. |
‑ClientTokenAlias: ‑client_tokenConditionally required | The API credential's client token. |
‑EdgeRCFile | Your EdgeGrid resource file to authenticate your command. Defaults to |
‑EnvironmentPrefix | String to prepend environment variables, e.g. with a value of MyCreds the function will create environment variables AKAMAIMYCREDSHOST and so on. |
‑HostNameAlias: ‑hostConditionally required | The API credential's hostname. |
‑Section | The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to |
Related Links
Updated 11 days ago
