TestConnectionFunction - Amazon CloudFront

TestConnectionFunction

Tests a connection function.

Request Syntax

POST /2020-05-31/connection-function/Id/test HTTP/1.1 If-Match: IfMatch <?xml version="1.0" encoding="UTF-8"?> <TestConnectionFunctionRequest xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/"> <ConnectionObject>blob</ConnectionObject> <Stage>string</Stage> </TestConnectionFunctionRequest>

URI Request Parameters

The request uses the following URI parameters.

Id

The connection function ID.

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

If-Match

The current version (ETag value) of the connection function.

Required: Yes

Request Body

The request accepts the following data in XML format.

TestConnectionFunctionRequest

Root level tag for the TestConnectionFunctionRequest parameters.

Required: Yes

ConnectionObject

The connection object.

Type: Base64-encoded binary data object

Length Constraints: Minimum length of 0. Maximum length of 40960.

Required: Yes

Stage

The connection function stage.

Type: String

Valid Values: DEVELOPMENT | LIVE

Required: No

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ConnectionFunctionTestResult> <ComputeUtilization>string</ComputeUtilization> <ConnectionFunctionErrorMessage>string</ConnectionFunctionErrorMessage> <ConnectionFunctionExecutionLogs> <member>string</member> </ConnectionFunctionExecutionLogs> <ConnectionFunctionOutput>string</ConnectionFunctionOutput> <ConnectionFunctionSummary> <ConnectionFunctionArn>string</ConnectionFunctionArn> <ConnectionFunctionConfig> <Comment>string</Comment> <KeyValueStoreAssociations> <Items> <KeyValueStoreAssociation> <KeyValueStoreARN>string</KeyValueStoreARN> </KeyValueStoreAssociation> </Items> <Quantity>integer</Quantity> </KeyValueStoreAssociations> <Runtime>string</Runtime> </ConnectionFunctionConfig> <CreatedTime>timestamp</CreatedTime> <Id>string</Id> <LastModifiedTime>timestamp</LastModifiedTime> <Name>string</Name> <Stage>string</Stage> <Status>string</Status> </ConnectionFunctionSummary> </ConnectionFunctionTestResult>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

ConnectionFunctionTestResult

Root level tag for the ConnectionFunctionTestResult parameters.

Required: Yes

ComputeUtilization

The connection function compute utilization.

Type: String

ConnectionFunctionErrorMessage

The connection function error message.

Type: String

ConnectionFunctionExecutionLogs

The connection function execution logs.

Type: Array of strings

ConnectionFunctionOutput

The connection function output.

Type: String

ConnectionFunctionSummary

The connection function summary.

Type: ConnectionFunctionSummary object

Errors

For information about the errors that are common to all actions, see Common Errors.

EntityNotFound

The entity was not found.

HTTP Status Code: 404

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

InvalidIfMatchVersion

The If-Match version is missing or not valid.

HTTP Status Code: 400

PreconditionFailed

The precondition in one or more of the request fields evaluated to false.

HTTP Status Code: 412

TestFunctionFailed

The CloudFront function failed.

HTTP Status Code: 500

UnsupportedOperation

This operation is not supported in this AWS Region.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: