CP code

New-CPCode

Synopsis

Create a new CP code.

Syntax

New-CPCode -CPCodeName <String> -ProductID <String> -ContractId <String> -GroupId <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
New-CPCode -Body <Object> -ContractId <String> -GroupId <String> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Creates a new CP code.

Note: CP codes need to be associated with one or more products. Make sure you provide the product IDs in the format returned by the Get-Product operation.

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.

‑CPCodeName
Conditionally required

A human-readable name for the CP code. The name can't include commas, underscores, quotes, or any of these special characters: ^ # %.

‑ContractId
Required

Your contract's ID. The parameter is optional if a property belongs to only one contract; otherwise, you need to specify it along with the -GroupID. This parameter is optional except for the create requests.

‑EdgeRCFile

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

‑GroupId
Required

Your group's ID. The parameter is optional if a property belongs to only one group, otherwise you need to specify it along with the -ContractID. This parameter is optional except for the create requests.

‑ProductID
Conditionally required

The product's ID.

‑Section

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

Related Links