publish_function¶
Operation¶
publish_function
async
¶
publish_function(input: PublishFunctionInput, plugins: list[Plugin] | None = None) -> PublishFunctionOutput
Publishes a CloudFront function by copying the function code from the
DEVELOPMENT stage to LIVE. This automatically updates all cache
behaviors that are using this function to use the newly published copy
in the LIVE stage.
When a function is published to the LIVE stage, you can attach the
function to a distribution's cache behavior, using the function's
Amazon Resource Name (ARN).
To publish a function, you must provide the function's name and version
(ETag value). To get these values, you can use ListFunctions and
DescribeFunction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
PublishFunctionInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
PublishFunctionOutput
|
An instance of |
Input¶
PublishFunctionInput
dataclass
¶
Output¶
PublishFunctionOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for PublishFunctionOutput structure.
Attributes¶
function_summary
class-attribute
instance-attribute
¶
function_summary: FunctionSummary | None = ...
Contains configuration information and metadata about a CloudFront function.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.