LambdaMicroVMs / Client / update_microvm_image
update_microvm_image¶
- LambdaMicroVMs.Client.update_microvm_image(**kwargs)¶
Updates the configuration of a MicroVM image and triggers a new version build. This operation uses PUT semantics — all required fields (codeArtifact, baseImageArn, buildRoleArn) must be provided with every request.
See also: AWS API Documentation
Request Syntax
response = client.update_microvm_image( baseImageArn='string', baseImageVersion='string', buildRoleArn='string', description='string', codeArtifact={ 'uri': 'string' }, logging={ 'disabled': {} , 'cloudWatch': { 'logGroup': 'string', 'logStream': 'string' } }, egressNetworkConnectors=[ 'string', ], cpuConfigurations=[ { 'architecture': 'ARM_64' }, ], resources=[ { 'minimumMemoryInMiB': 123 }, ], additionalOsCapabilities=[ 'ALL', ], hooks={ 'port': 123, 'microvmHooks': { 'run': 'DISABLED'|'ENABLED', 'runTimeoutInSeconds': 123, 'resume': 'DISABLED'|'ENABLED', 'resumeTimeoutInSeconds': 123, 'suspend': 'DISABLED'|'ENABLED', 'suspendTimeoutInSeconds': 123, 'terminate': 'DISABLED'|'ENABLED', 'terminateTimeoutInSeconds': 123 }, 'microvmImageHooks': { 'ready': 'DISABLED'|'ENABLED', 'readyTimeoutInSeconds': 123, 'validate': 'DISABLED'|'ENABLED', 'validateTimeoutInSeconds': 123 } }, environmentVariables={ 'string': 'string' }, imageIdentifier='string', clientToken='string' )
- Parameters:
baseImageArn (string) –
[REQUIRED]
The ARN of the base MicroVM image.
baseImageVersion (string) – The specific version of the base MicroVM image to use.
buildRoleArn (string) –
[REQUIRED]
The ARN of the IAM build role.
description (string) – The description of the MicroVM image.
codeArtifact (dict) –
[REQUIRED]
The code artifact containing the application code and metadata for the MicroVM image.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
uri.uri (string) –
The URI of the code artifact, such as an Amazon S3 path or Amazon ECR image URI.
logging (dict) –
The logging configuration for build-time and runtime logs. Specify {“cloudWatch”: {“logGroup”: “…”}} to stream logs to a custom CloudWatch log group, or {“disabled”: {}} to turn off logging.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
disabled,cloudWatch.disabled (dict) –
Specifies that logging is disabled.
cloudWatch (dict) –
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) –
The name of the CloudWatch Logs log group to send logs to.
logStream (string) –
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) –
The list of egress network connectors available to the MicroVM at runtime.
(string) –
cpuConfigurations (list) –
The list of supported CPU configurations for the MicroVM.
(dict) –
Configuration for the CPU architecture of a MicroVM.
architecture (string) – [REQUIRED]
The CPU architecture.
resources (list) –
The resource requirements for the MicroVM.
(dict) –
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) – [REQUIRED]
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) –
Additional OS capabilities granted to the MicroVM runtime environment.
(string) –
Capability granted to the application when booted
hooks (dict) –
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) –
The port number on which the hooks listener runs.
microvmHooks (dict) –
The lifecycle hooks for MicroVM events.
run (string) –
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) –
The maximum time in seconds for the run hook to complete.
resume (string) –
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) –
The maximum time in seconds for the resume hook to complete.
suspend (string) –
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) –
The maximum time in seconds for the suspend hook to complete.
terminate (string) –
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) –
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) –
The hooks for MicroVM image build events.
ready (string) –
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) –
The maximum time in seconds for the ready hook to complete.
validate (string) –
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) –
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) –
Environment variables set in the MicroVM runtime environment.
(string) –
(string) –
imageIdentifier (string) –
[REQUIRED]
The unique identifier (ARN or ID) of the MicroVM image to update.
clientToken (string) –
A unique, case-sensitive identifier you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'imageArn': 'string', 'name': 'string', 'state': 'CREATING'|'CREATED'|'CREATE_FAILED'|'UPDATING'|'UPDATED'|'UPDATE_FAILED'|'DELETING'|'DELETE_FAILED'|'DELETED', 'latestActiveImageVersion': 'string', 'latestFailedImageVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'baseImageArn': 'string', 'baseImageVersion': 'string', 'buildRoleArn': 'string', 'description': 'string', 'codeArtifact': { 'uri': 'string' }, 'logging': { 'disabled': {}, 'cloudWatch': { 'logGroup': 'string', 'logStream': 'string' } }, 'egressNetworkConnectors': [ 'string', ], 'cpuConfigurations': [ { 'architecture': 'ARM_64' }, ], 'resources': [ { 'minimumMemoryInMiB': 123 }, ], 'additionalOsCapabilities': [ 'ALL', ], 'hooks': { 'port': 123, 'microvmHooks': { 'run': 'DISABLED'|'ENABLED', 'runTimeoutInSeconds': 123, 'resume': 'DISABLED'|'ENABLED', 'resumeTimeoutInSeconds': 123, 'suspend': 'DISABLED'|'ENABLED', 'suspendTimeoutInSeconds': 123, 'terminate': 'DISABLED'|'ENABLED', 'terminateTimeoutInSeconds': 123 }, 'microvmImageHooks': { 'ready': 'DISABLED'|'ENABLED', 'readyTimeoutInSeconds': 123, 'validate': 'DISABLED'|'ENABLED', 'validateTimeoutInSeconds': 123 } }, 'environmentVariables': { 'string': 'string' }, 'updatedAt': datetime(2015, 1, 1), 'imageVersion': 'string' }
Response Structure
(dict) –
imageArn (string) –
The ARN of the MicroVM image.
name (string) –
The name of the MicroVM image.
state (string) –
The current state of the MicroVM image.
latestActiveImageVersion (string) –
The latest active version of the MicroVM image.
latestFailedImageVersion (string) –
The latest failed version of the MicroVM image, if any.
createdAt (datetime) –
The timestamp when the MicroVM image was created.
baseImageArn (string) –
The ARN of the base MicroVM image.
baseImageVersion (string) –
The specific version of the base MicroVM image.
buildRoleArn (string) –
The ARN of the IAM build role.
description (string) –
The description of the MicroVM image.
codeArtifact (dict) –
The code artifact containing the application code and metadata for the MicroVM image.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
uri. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
uri (string) –
The URI of the code artifact, such as an Amazon S3 path or Amazon ECR image URI.
logging (dict) –
The logging configuration for build-time and runtime logs. Specify {“cloudWatch”: {“logGroup”: “…”}} to stream logs to a custom CloudWatch log group, or {“disabled”: {}} to turn off logging.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
disabled,cloudWatch. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
disabled (dict) –
Specifies that logging is disabled.
cloudWatch (dict) –
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) –
The name of the CloudWatch Logs log group to send logs to.
logStream (string) –
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) –
The list of egress network connectors available to the MicroVM at runtime.
(string) –
cpuConfigurations (list) –
The list of supported CPU configurations for the MicroVM.
(dict) –
Configuration for the CPU architecture of a MicroVM.
architecture (string) –
The CPU architecture.
resources (list) –
The resource requirements for the MicroVM.
(dict) –
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) –
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) –
Additional OS capabilities granted to the MicroVM runtime environment.
(string) –
Capability granted to the application when booted
hooks (dict) –
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) –
The port number on which the hooks listener runs.
microvmHooks (dict) –
The lifecycle hooks for MicroVM events.
run (string) –
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) –
The maximum time in seconds for the run hook to complete.
resume (string) –
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) –
The maximum time in seconds for the resume hook to complete.
suspend (string) –
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) –
The maximum time in seconds for the suspend hook to complete.
terminate (string) –
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) –
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) –
The hooks for MicroVM image build events.
ready (string) –
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) –
The maximum time in seconds for the ready hook to complete.
validate (string) –
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) –
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) –
Environment variables set in the MicroVM runtime environment.
(string) –
(string) –
updatedAt (datetime) –
The timestamp when the MicroVM image was last updated.
imageVersion (string) –
The version of the MicroVM image.
Exceptions
LambdaMicroVMs.Client.exceptions.InternalServerExceptionLambdaMicroVMs.Client.exceptions.AccessDeniedExceptionLambdaMicroVMs.Client.exceptions.ResourceNotFoundExceptionLambdaMicroVMs.Client.exceptions.ThrottlingExceptionLambdaMicroVMs.Client.exceptions.ConflictExceptionLambdaMicroVMs.Client.exceptions.ValidationExceptionLambdaMicroVMs.Client.exceptions.ServiceQuotaExceededException