in chalice/awsclient.py [0:0]
def _update_function_config(self,
environment_variables, # type: StrMap
runtime, # type: OptStr
timeout, # type: OptInt
memory_size, # type: OptInt
role_arn, # type: OptStr
subnet_ids, # type: OptStrList
security_group_ids, # type: OptStrList
function_name, # type: str
layers, # type: OptStrList
xray, # type: Optional[bool]
):
# type: (...) -> None
kwargs = {} # type: Dict[str, Any]
if environment_variables is not None:
kwargs['Environment'] = {'Variables': environment_variables}
if runtime is not None:
kwargs['Runtime'] = runtime
if timeout is not None:
kwargs['Timeout'] = timeout
if memory_size is not None:
kwargs['MemorySize'] = memory_size
if role_arn is not None:
kwargs['Role'] = role_arn
if xray:
kwargs['TracingConfig'] = {'Mode': 'Active'}
if security_group_ids is not None and subnet_ids is not None:
kwargs['VpcConfig'] = self._create_vpc_config(
subnet_ids=subnet_ids,
security_group_ids=security_group_ids
)
if layers is not None:
kwargs['Layers'] = layers
if kwargs:
self._do_update_function_config(function_name, kwargs)