Netstorage credentials
Synopsis
Load Netstorage usage API credentials to environment variables.
Syntax
Import-NetstorageCredentials [-NSRCFile <String>] [-Section <String>] [-EnvironmentPrefix <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Import-NetstorageCredentials -Key <String> -ID <String> -Group <String> -Hostname <String> -CPCode <String> [-EnvironmentPrefix <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
This function takes in either a set of Netstorage credentials or a .nsrc file and section and sets the appropriate environment variables for subsequent request. This allows you to set the credentials your requests will use for a given session in your shell, and avoid having to provide these for every command. To clear your credentials use Clear-NetstorageCredentials.
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 NETSTORAGE_MYCREDS_CPCODE, and so on. These credentials will be loaded by any command which specifies -Section of MyCreds.
Parameters
‑CPCodeConditionally required | Content provider code from your Netstorage group. |
‑EnvironmentPrefix | String to prepend environment variables, e.g. with a value of MyCreds the function will create environment variables AKAMAIMYCREDSHOST and so on. |
‑GroupConditionally required | Domain prefix of your Netstorage group. |
‑HostnameAlias: ‑hostConditionally required | The API credential's hostname. |
‑IDConditionally required | The |
‑KeyConditionally required | HTTP API key of your Netstorage upload account. |
‑NSRCFile | NSRC file to update/create. |
‑Section | The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to |
Related Links
Updated 11 days ago
