Newer Version Available

This content describes an older version of this product. View Latest

Named Credential

Get, create, update, and delete a credential.
Resource
1/named-credentials/credential
Available version
56.0
Requires Chatter
No
HTTP methods
GET, POST, PUT, DELETE
Request parameters for GET and DELETE
Parameter Name Type Description Required or Optional Available Version
externalCredential String Developer name of the external credential. Required 56.0
principalName String Name of the external credential named principal. Required if principalType is NamedPrincipal 56.0
principalType String Type of credential principal. Values are:
  • AwsStsPrincipal
  • NamedPrincipal
  • PerUserPrincipal
Required 56.0
Request body for POST and PUT
Root XML tag
<credential>
JSON example
1{
2externalCredential: "ecNameAws",
3authenticationProtocol: "AwsSv4",
4principalName: "principalA",
5principalType: "NamedPrincipal",
6credentials: {
7   awsAccessKeyId: {
8      value: "00000000000",
9      encrypted: false
10   },
11   awsSecretAccessKey: {
12      value: "aws-secret-value",
13      encrypted: true
14   },
15   awsRoleArn: {
16      value: "arn:partition:service:region:account-id:resource-id",
17      encrypted: false
18   }
19}
20}
Properties
Name Type Description Required or Optional Available Version
authentication​Protocol String Authentication protocol of the external credential. Values are:
  • AwsSv4
  • Custom
  • OAuth
Required 56.0
credentials Map<String, Credential Value Input> Map of protocol-specific credentials.
Authentication protocols have credential allowlists and encryption rules.
  • AwsSv4awsAccessKeyId (not encrypted), awsSecretAccessKey (encrypted), awsRoleArn (not encrypted)
  • Custom—Any credential name is valid (user sets encryption rules)
Required 56.0
externalCredential String Developer name of the external credential. Required 56.0
principalName String Name of the external credential named principal. Required if principalType is NamedPrincipal 56.0
principalType String Type of credential principal. Values are:
  • AwsStsPrincipal
  • NamedPrincipal
  • PerUserPrincipal
Required 56.0
Response body for GET, POST, and PUT
Credential
Response for DELETE
204: Successful Delete