Access token

New-EdgeKVAccessToken

Synopsis

Create an access token.

Syntax

New-EdgeKVAccessToken -Name <String> [-AllowOnProduction] [-AllowOnStaging] -Expiry <String> -Namespace <String> -Permissions <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
New-EdgeKVAccessToken -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Generates an access token that allows an EdgeWorkers code bundle to access the specified namespace. Each token name needs to be unique and has a defined expiration of no longer than six months. You can't renew a token once it expires.

Note: You can specify the token attributes as individual parameters or pipe a complete object to this function.

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.

‑AllowOnProduction

Gives a specific token access to the Akamai production network.

‑AllowOnStaging

Gives a specific token access to the Akamai staging network.

‑Body
Conditionally required

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

‑EdgeRCFile

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

‑Expiry
Conditionally required

An expiration date of a given token in ISO 8601 format, YYYY-MM-DD, such as 2022-01-31. Expiry can be up to six months from creation.

‑Name
Conditionally required

Your token's name. Used when retrieving tokens by name.

‑Namespace
Conditionally required

The name of the namespace you want to grant permissions to.

‑Permissions
Conditionally required

Permissions to assign, as a combination of r for read, w for write, or d for delete, for example, rwd.

‑Section

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

Related Links