CreateConnectionFunction - Amazon CloudFront

CreateConnectionFunction

Creates a connection function.

Request Syntax

POST /2020-05-31/connection-function HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <CreateConnectionFunctionRequest xmlns="http://cloudfront.amazonaws.com/doc/2020-05-31/"> <ConnectionFunctionCode>blob</ConnectionFunctionCode> <ConnectionFunctionConfig> <Comment>string</Comment> <KeyValueStoreAssociations> <Items> <KeyValueStoreAssociation> <KeyValueStoreARN>string</KeyValueStoreARN> </KeyValueStoreAssociation> </Items> <Quantity>integer</Quantity> </KeyValueStoreAssociations> <Runtime>string</Runtime> </ConnectionFunctionConfig> <Name>string</Name> <Tags> <Items> <Tag> <Key>string</Key> <Value>string</Value> </Tag> </Items> </Tags> </CreateConnectionFunctionRequest>

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in XML format.

CreateConnectionFunctionRequest

Root level tag for the CreateConnectionFunctionRequest parameters.

Required: Yes

ConnectionFunctionCode

The code for the connection function.

Type: Base64-encoded binary data object

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

Required: Yes

ConnectionFunctionConfig

Contains configuration information about a CloudFront function.

Type: FunctionConfig object

Required: Yes

Name

A name for the connection function.

Type: String

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

Pattern: [a-zA-Z0-9-_]{1,64}

Required: Yes

Tags

A complex type that contains zero or more Tag elements.

Type: Tags object

Required: No

Response Syntax

HTTP/1.1 201 <?xml version="1.0" encoding="UTF-8"?> <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>

Response Elements

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

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

ConnectionFunctionSummary

Root level tag for the ConnectionFunctionSummary parameters.

Required: Yes

ConnectionFunctionArn

The connection function Amazon Resource Name (ARN).

Type: String

ConnectionFunctionConfig

Contains configuration information about a CloudFront function.

Type: FunctionConfig object

CreatedTime

The connection function created time.

Type: Timestamp

Id

The connection function ID.

Type: String

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

LastModifiedTime

The connection function last modified time.

Type: Timestamp

Name

The connection function name.

Type: String

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

Pattern: [a-zA-Z0-9-_]{1,64}

Stage

The connection function stage.

Type: String

Valid Values: DEVELOPMENT | LIVE

Status

The connection function status.

Type: String

Errors

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

AccessDenied

Access denied.

HTTP Status Code: 403

EntityAlreadyExists

The entity already exists. You must provide a unique entity.

HTTP Status Code: 409

EntityLimitExceeded

The entity limit has been exceeded.

HTTP Status Code: 400

EntitySizeLimitExceeded

The entity size limit was exceeded.

HTTP Status Code: 413

InvalidArgument

An argument is invalid.

HTTP Status Code: 400

InvalidTagging

The tagging specified is not valid.

HTTP Status Code: 400

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: