publish_function¶
Operation¶
publish_function
¶
publish_function(request: PublishFunctionInput | PublishFunctionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PublishFunctionInputDict]) -> 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 |
|---|---|---|---|
request
|
PublishFunctionInput | PublishFunctionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[PublishFunctionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
PublishFunctionOutput
|
An instance of |
publish_function
async
¶
publish_function(request: PublishFunctionInput | PublishFunctionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PublishFunctionInputDict]) -> 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 |
|---|---|---|---|
request
|
PublishFunctionInput | PublishFunctionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[PublishFunctionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
PublishFunctionOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
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.