public class CMAApiKey extends CMAResource
| Constructor and Description |
|---|
CMAApiKey()
Create a new api key.
|
| Modifier and Type | Method and Description |
|---|---|
CMAApiKey |
addEnvironment(String environment)
Add environment ids to the api key.
|
String |
getAccessToken() |
String |
getDescription() |
List<CMALink> |
getEnvironments() |
String |
getName() |
CMALink |
getPreviewApiKey() |
CMAApiKey |
setAccessToken(String accessToken) |
CMAApiKey |
setDescription(String description)
Update the description of this key.
|
CMAApiKey |
setName(String name)
Update the name of the key.
|
CMAApiKey |
setPreviewApiKey(CMALink previewApiKey) |
String |
toString() |
getEnvironmentId, getId, getSpaceId, getSystem, getVersion, getVisibility, isArchived, isPublished, setEnvironmentId, setId, setSpaceId, setSystem, setVersion, setVisibilitypublic String getName()
public CMAApiKey setName(String name)
name - new name to be used.public String getDescription()
public CMAApiKey setDescription(String description)
description - to be changed to.public String getAccessToken()
public CMALink getPreviewApiKey()
public List<CMALink> getEnvironments()
public CMAApiKey addEnvironment(String environment)
environment - a new environment to be affected by this key.
A link for the payload will be created automatically.public String toString()
toString in class CMAResourceCopyright © 2026 Contentful, GmbH.. All rights reserved.