update_function
async
¶
update_function(
id: FunctionId,
*,
config_overrides: Optional[AsyncElementalInferenceClientConfig] = None,
name: Optional[ResourceName] = None,
target: Optional[FunctionTarget] = None,
request_expression: Optional[JsonataExpression] = None,
response_expression: Optional[JsonataExpression] = None,
description: Optional[FunctionDescription] = None,
event_bridge_delivery: Optional[EventBridgeDeliveryMode] = None,
) -> UpdateFunctionResponse
Updates a function. Include only the parameters that you want to change; parameters that you don't include aren't affected. Elemental Inference validates the updated expressions in the same way as CreateFunction.
While a feed references the function, you can change only its expressions and its description, and you can set eventBridgeDelivery to DISABLED but not to ENABLED. The request expression must keep referencing the same media context, as reported in contextTypes. Changing an expression changes the behavior of every feed that references the function.
Parameters:
-
id(FunctionId) –The ID of the function.
-
name(Optional[ResourceName], default:None) –A new name for the function. You can't change the name while the function is referenced by a feed.
-
target(Optional[FunctionTarget], default:None) –A new target for the function. You can't change the target while the function is referenced by a feed.
-
request_expression(Optional[JsonataExpression], default:None) –A new request expression for the function. Elemental Inference derives contextTypes again from the new expression. While a feed references the function, the new expression must reference the same media context as the current one.
-
response_expression(Optional[JsonataExpression], default:None) –A new response expression for the function. To remove the response expression, specify an empty string. A function with a Bedrock target and eventBridgeDelivery set to ENABLED must keep a response expression.
-
description(Optional[FunctionDescription], default:None) –A new description for the function.
-
event_bridge_delivery(Optional[EventBridgeDeliveryMode], default:None) –Specifies whether Elemental Inference also sends this function's marked results to Amazon EventBridge, as described for CreateFunction. If you omit this parameter, the current value is kept. While a feed references the function, you can change this value to DISABLED, but not to ENABLED.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be completed due to a conflict.
-
InternalServerErrorException–An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.
-
ResourceNotFoundException–The resource specified in the action doesn't exist.
-
TooManyRequestException–The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.
-
ValidationException–The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_elementalinference/_services/async_elemental_inference.py
1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 | |