afv-library/skills/platform-metadata-api-context-get/assets/metadata_api/NamedCredential.json

205 lines
23 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"sections": [
"title",
"description",
"file_information",
"directory_location",
"fields",
"sub_types",
"wsdl_segment",
"declarative_metadata_sample_definition"
],
"title": "NamedCredential - Metadata API",
"description": "Represents a named credential, which specifies the URL of a callout endpoint and its required authentication parameters in one definition. A named credential can be specified as an endpoint to simplify the setup of authenticated callouts.",
"file_information": ".namedCredential",
"directory_location": "namedCredentials",
"fields_columns": [
"type",
"description",
"required"
],
"fields": {
"allowMergeFieldsInBody": {
"type": "boolean",
"description": "Specifies whether Apex code can use merge fields to populate the HTTP request body with org data when a callout is made. Corresponds to Allow Merge Fields in HTTP Body in the user interface. Defaults to false.This field is available in API version 41.0 and later."
},
"allowMergeFieldsInHeader": {
"type": "boolean",
"description": "Specifies whether Apex code can use merge fields to populate the HTTP header with org data when a callout is made. Corresponds to Allow Merge Fields in HTTP Header in the user interface. Defaults to false.This field is available in API version 41.0 and later."
},
"authProvider": {
"type": "string",
"description": "The authentication provider that the AuthProvider component represents.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"authTokenEndpointUrl": {
"type": "string",
"description": "The URL where JWTs are exchanged for access tokens. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"awsAccessKey": {
"type": "string",
"description": "First part of the access key used to sign programmatic requests to AWS. Use when AWS Signature Version 4 is your authentication protocol. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"awsAccessSecret": {
"type": "string",
"description": "The second part of the access key that's used to sign programmatic requests to AWS. Use when AWS Signature Version 4 is your authentication protocol. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"awsRegion": {
"type": "string",
"description": "Specifies which AWS Region the named credential accesses. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"awsService": {
"type": "string",
"description": "Specifies which AWS resource the named credential accesses. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"calloutStatus": {
"type": "calloutStatus (enumeration of type string)",
"description": "Specifies whether the named credential is enabled for callouts. Valid values are: Disabled: The named credential is disabled for callouts. Enabled: The named credential is enabled for callouts. This field is available in API version 59.0 and later."
},
"certificate": {
"type": "string",
"description": "If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system. The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"description": {
"type": "string",
"description": "A meaningful description of the named credential."
},
"endpoint": {
"type": "string",
"description": "The URL or root URL of the callout endpoint. Corresponds to URL in the user interface.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"generateAuthorizationHeader": {
"type": "boolean",
"description": "Specifies whether Salesforce generates an authorization header and applies it to each callout that references the named credential. Corresponds to Generate Authorization Header in the user interface. Defaults to true.This field is available in API version 41.0 and later."
},
"jwtAudience": {
"type": "string",
"description": "External service or other allowed recipients for the JWT. Written as JSON, with a quoted string for a single audience and an array of quoted strings for multiple audiences. Single audience example: “aud1” Multiple audiences example: [“aud1”, “aud2”, “aud3”].This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"jwtFormulaSubject": {
"type": "string",
"description": "Formula string calculating the Subject of the JWT. API names and constant strings, in single quotes, can be included. Allows a dynamic Subject unique per user requesting the token. For example, 'User='+$User.Id. Use this field when principalType is set to PerUser. Corresponds to Per User Subject in the user interface. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"jwtIssuer": {
"type": "string",
"description": "Specify who issued the JWT using a case-sensitive string. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"jwtSigningCertificate": {
"type": "string",
"description": "Certificate verifying the JWTs authenticity to external sites. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"jwtTextSubject": {
"type": "string",
"description": "Static text, without quotes, that specifies the JWT Subject. Use this field when principalType is set to NamedUser. Corresponds to Named Principal Subject in the user interface. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"jwtValidityPeriodSeconds": {
"type": "int",
"description": "Specify the number of seconds that the token is valid. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 46.0, this field is deprecated in API version 56.0 and later."
},
"label": {
"type": "string",
"required": true,
"description": "A user-friendly name for the named credential that appears in the Salesforce user interface, such as in list views."
},
"namedCredentialParameters": {
"type": "NamedCredentialParameter[]",
"description": "Reference to the (one or more) NamedCredentialParameter used to configure a named credential. This field is available in API version 56.0 and later."
},
"namedCredentialType": {
"type": "NamedCredentialType (enumeration of type string)",
"description": "Specifies the type or behavior of this named credential. Valid values are: Legacy: The named credential is a legacy type, which means that it doesnt use the schema introduced in the Winter 23 release. Used for backward compatibility. PrivateEndpoint: The named credential sends traffic through a private connection, bypassing the public internet. If the credential type is PrivateEndpoint, you must specify the value of OutboundNetworkConnection. SecuredEndpoint: The named credential is extensible and uses external credentials to control authentication and permissions. Standard: Reserved for internal use. This field is available in API version 56.0 and later."
},
"oauthRefreshToken": {
"type": "string",
"description": "The OAuth refresh token. Used to obtain a new access token for an end user when a token expires.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"oauthScope": {
"type": "string",
"description": "Specifies the scope of permissions to request for the access token. Corresponds to Scope in the user interface.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"oauthToken": {
"type": "string",
"description": "The access token thats issued by your authorization server.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"outboundNetworkConnection": {
"type": "string",
"description": "Specifies the outbound network connection that uses the named credential to send callouts to AWS. This field is valid only when NamedCredentialType is set to Legacy. First available in API version 49.0, this field is deprecated in API version 56.0 and later."
},
"password": {
"type": "string",
"description": "The password to be used by your org to access the external system. Ensure that the credentials have adequate privileges to access the external system. Depending on how you set up access, you might need to provide the administrator password.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"principalType": {
"type": "ExternalPrincipalType (enumeration of type string)",
"description": "Determines whether you're using one set or multiple sets of credentials to access the external system. Corresponds to Identity Type in the user interface. Values are: Anonymous NamedUser PerUser This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"protocol": {
"type": "AuthenticationProtocol (enumeration of type string)",
"description": "The authentication protocol thats required to access the external system. Valid values are: AwsSv4 Jwt JwtExchange NoAuthentication Oauth Password For connections to Amazon Web Services using Signature Version 4, use AwsSv4. For connections using a direct token system, select Jwt. If using an intermediary authorization provider to process JWTs and return access tokens, use JwtExchange. For Simple URL data sources, select NoAuthentication. For cloud-based Files Connect external systems, select Oauth. For on-premises systems, select Password. This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
},
"username": {
"type": "string",
"description": "The username to be used by your org to access the external system. Ensure that the credentials have adequate privileges for performing callouts to the external system. Depending on how you set up access, you might need to provide the administrator username.This field is valid only when NamedCredentialType is set to Legacy. This field is deprecated in API version 56.0."
}
},
"sub_types": {
"NamedCredentialParameter": {
"certificate": {
"type": "string",
"description": "If the value of the parameterType field is ClientCertificate then this field references the certificate."
},
"description": {
"type": "string",
"description": "A human-readable description of this named credential parameter."
},
"externalCredential": {
"type": "string",
"description": "If the value of the parameterType field is Authentication, then this field references an external credential that in turn references a set of authenticated user credentials."
},
"globalNamedPrincipalCredential": {
"type": "boolean",
"reserved_for_internal_use": true
},
"managedFeatureEnabledCallout": {
"type": "boolean",
"reserved_for_internal_use": true
},
"outboundNetworkConnection": {
"type": "string",
"description": "The lookup field for the OutboundNetworkConnection parameter type. Used when namedCredentialType is PrivateEndpoint."
},
"parameterName": {
"type": "string",
"required": true,
"description": "The name of the named credential parameter."
},
"parameterType": {
"type": "NamedCredentialParamType (enumeration of type string)",
"required": true,
"description": "The type of the named credential parameter. Valid values are: AllowedManagedPackageNamespaces: Allows managed packages identified by specified namespaces to use the named credential and make callouts through it. Authentication: Specifies that this parameter configures authentication using the credentials specified in the external credential, referenced by the externalCredential field. ClientCertificate: Specifies that this parameter configures a client certificate, referenced by the certificate field. ConnectionStatus: Reserved for internal use. CreatedByNamespace: Reserved for internal use. CustomParameter: Reserved for internal use. HttpHeader: Allows the user to specify custom headers to be added to the callout at run time. When using HttpHeader, the parameterName field must be the header name as a string, and parameterValue must be a formula of a header value that is evaluated at run time. ManagedByComponent: Reserved for internal use. ManagedByFeature: Reserved for internal use. ManagedByNamespace: Specifies the manageability capabilities for a packaged named credential. The parameterValue indicates whether the named credential uses subscriber-controlled or developer-controlled manageability. NamedCredentialOptions: Reserved for internal use. OutboundNetworkConnection: Specifies a lookup to an outbound network connection. When using this parameter type, the outboundNetworkConnection field is a string representing the lookup. Used when namedCredentialType is PrivateEndpoint. SfHttpRequestExtensionName: Reserved for internal use. StandardNamedCredentialType: Reserved for internal use. Url: Specifies that this parameter configures the URL of the endpoint. Store the actual URL in the parameterValue field."
},
"parameterValue": {
"type": "string",
"description": "If the parameterType field describes a literal value, such as Url, then the literal value is stored in this field, such as https://iam.amazonaws.com/."
},
"readOnlyNamedCredential": {
"type": "boolean",
"reserved_for_internal_use": true
},
"sequenceNumber": {
"type": "int",
"description": "Used to order HttpHeader parameters."
},
"systemUserNamedCredential": {
"type": "boolean",
"reserved_for_internal_use": true
}
}
},
"wsdl_segment": "```xml\n<xsd:simpleType name=\"AuthenticationProtocol\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"NoAuthentication\"/>\n <xsd:enumeration value=\"Oauth\"/>\n <xsd:enumeration value=\"Password\"/>\n <xsd:enumeration value=\"AwsSv4\"/>\n <xsd:enumeration value=\"Jwt\"/>\n <xsd:enumeration value=\"JwtExchange\"/>\n <xsd:enumeration value=\"Custom\"/>\n <xsd:enumeration value=\"Basic\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:simpleType name=\"CalloutStatus\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Enabled\"/>\n <xsd:enumeration value=\"Disabled\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:simpleType name=\"ExternalPrincipalType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Anonymous\"/>\n <xsd:enumeration value=\"PerUser\"/>\n <xsd:enumeration value=\"NamedUser\"/>\n <xsd:enumeration value=\"NamedCustomPrincipal\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:complexType name=\"Metadata\">\n <xsd:sequence>\n <xsd:element name=\"fullName\" minOccurs=\"0\" type=\"xsd:string\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:complexType name=\"NamedCredential\">\n <xsd:complexContent>\n <xsd:extension base=\"tns:Metadata\">\n <xsd:sequence>\n <xsd:element name=\"allowMergeFieldsInBody\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"allowMergeFieldsInHeader\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"authProvider\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"authTokenEndpointUrl\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"awsAccessKey\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"awsAccessSecret\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"awsRegion\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"awsService\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"calloutStatus\" minOccurs=\"0\" type=\"tns:CalloutStatus\"/>\n <xsd:element name=\"certificate\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"endpoint\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"generateAuthorizationHeader\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"jwtAudience\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"jwtFormulaSubject\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"jwtIssuer\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"jwtSigningCertificate\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"jwtTextSubject\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"jwtValidityPeriodSeconds\" minOccurs=\"0\" type=\"xsd:int\"/>\n <xsd:element name=\"label\" type=\"xsd:string\"/>\n <xsd:element name=\"namedCredentialParameters\" minOccurs=\"0\" maxOccurs=\"unbounded\" type=\"tns:NamedCredentialParameter\"/>\n <xsd:element name=\"namedCredentialType\" minOccurs=\"0\" type=\"tns:NamedCredentialType\"/>\n <xsd:element name=\"oauthRefreshToken\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"oauthScope\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"oauthToken\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"outboundNetworkConnection\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"password\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"principalType\" minOccurs=\"0\" type=\"tns:ExternalPrincipalType\"/>\n <xsd:element name=\"protocol\" minOccurs=\"0\" type=\"tns:AuthenticationProtocol\"/>\n <xsd:element name=\"username\" minOccurs=\"0\" type=\"xsd:string\"/>\n </xsd:sequence>\n </xsd:extension>\n </xsd:complexContent>\n</xsd:complexType>\n<xsd:simpleType name=\"NamedCredentialParamType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Url\"/>\n <xsd:enumeration value=\"HttpHeader\"/>\n <xsd:enumeration value=\"ClientCertificate\"/>\n <xsd:enumeration value=\"Authentication\"/>\n <xsd:enumeration value=\"OutboundNetworkConnection\"/>\n <xsd:enumeration value=\"AllowedManagedPackageNamespaces\"/>\n <xsd:enumeration value=\"CreatedByNamespace\"/>\n <xsd:enumeration value=\"CustomParameter\"/>\n <xsd:enumeration value=\"StandardNamedCredentialType\"/>\n <xsd:enumeration value=\"ManagedByFeature\"/>\n <xsd:enumeration value=\"ManagedByComponent\"/>\n <xsd:enumeration value=\"ConnectionStatus\"/>\n <xsd:enumeration value=\"SfHttpRequestExtensionName\"/>\n <xsd:enumeration value=\"NamedCredentialOptions\"/>\n <xsd:enumeration value=\"ManagedByNamespace\"/>\n </xsd:restriction>\n</xsd:simpleType>\n<xsd:complexType name=\"NamedCredentialParameter\">\n <xsd:sequence>\n <xsd:element name=\"certificate\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"description\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"externalCredential\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"globalNamedPrincipalCredential\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"managedFeatureEnabledCallout\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"outboundNetworkConnection\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"parameterName\" type=\"xsd:string\"/>\n <xsd:element name=\"parameterType\" type=\"tns:NamedCredentialParamType\"/>\n <xsd:element name=\"parameterValue\" minOccurs=\"0\" type=\"xsd:string\"/>\n <xsd:element name=\"readOnlyNamedCredential\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <xsd:element name=\"sequenceNumber\" minOccurs=\"0\" type=\"xsd:int\"/>\n <xsd:element name=\"systemUserNamedCredential\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n </xsd:sequence>\n</xsd:complexType>\n<xsd:simpleType name=\"NamedCredentialType\">\n <xsd:restriction base=\"xsd:string\">\n <xsd:enumeration value=\"Legacy\"/>\n <xsd:enumeration value=\"SecuredEndpoint\"/>\n <xsd:enumeration value=\"PrivateEndpoint\"/>\n <xsd:enumeration value=\"Standard\"/>\n </xsd:restriction>\n</xsd:simpleType>\n```",
"declarative_metadata_sample_definition": [
{
"description": "The following is an example of a NamedCredential component.",
"code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<NamedCredential xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <label>SampleNamedCredential</label>\n <namedCredentialType>SecuredEndpoint</namedCredentialType>\n <namedCredentialParameters>\n <description>IAM Endpoint</description>\n <parameterName>DefaultEndpoint</parameterName>\n <parameterType>Url</parameterType>\n <parameterValue>https://iam.amazonaws.com/</parameterValue>\n </namedCredentialParameters>\n <namedCredentialParameters>\n <description>AWS Auth</description>\n <parameterName>DefaultAuth</parameterName>\n <parameterType>Authentication</parameterType>\n <externalCredential>SampleExternalCredential</externalCredential>\n </namedCredentialParameters>\n <namedCredentialParameters>\n <description>Cert</description>\n <parameterName>DefaultCert</parameterName>\n <parameterType>ClientCertificate</parameterType>\n <certificate>MyCertificate</certificate>\n </namedCredentialParameters>\n <allowMergeFieldsInBody>true</allowMergeFieldsInBody>\n <allowMergeFieldsInHeader>true</allowMergeFieldsInHeader>\n <generateAuthorizationHeader>true</generateAuthorizationHeader>\n</NamedCredential>"
}
]
}