Keys

Import-APIKey

Synopsis

Import keys.

Syntax

Import-APIKey -CollectionID <Int32> -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Import-APIKey -CollectionID <Int32> -KeyValue <String> [-KeyDescription <String>] [-Label <String>] [-Tags <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Import-APIKey -CollectionID <Int32> [-InputFile <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Imports keys to a given collection. You can import keys from a PSCustomObject or JSON string, or you can specify -InputFile as either json, csv, or xml.

Parameters

‑AccountSwitchKey

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.

‑Body
Conditionally required

A request body, either as a PSCustomObject or a string. This parameter supports pipelining.

‑CollectionID
Required

Your collection's ID. Run Get-APIKeyCollection to retrieve collections available to you.

‑EdgeRCFile

Your EdgeGrid resource file to authenticate your command. Defaults to ~/.edgerc.

‑InputFile

A local file containing keys. Must use either the json, csv, or xml file extension.

‑KeyDescription

A human-readable description for the key you want to create.

‑KeyValue
Conditionally required

The value for the key you want to create.

‑Label

The label assigned to the key.

‑Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

‑Tags

A comma-separated string containing additional categories assigned to the key that you can use as filters.

Related Links