update_image_pipeline
¶
update_image_pipeline(
image_pipeline_arn: ImagePipelineArn,
infrastructure_configuration_arn: InfrastructureConfigurationArn,
client_token: ClientToken,
*,
config_overrides: Optional[imagebuilderClientConfig] = None,
description: Optional[NonEmptyString] = None,
image_recipe_arn: Optional[ImageRecipeArn] = None,
container_recipe_arn: Optional[ContainerRecipeArn] = None,
distribution_configuration_arn: Optional[DistributionConfigurationArn] = None,
image_tests_configuration: Optional[ImageTestsConfiguration] = None,
enhanced_image_metadata_enabled: Optional[NullableBoolean] = None,
schedule: Optional[Schedule] = None,
status: Optional[PipelineStatus] = None,
image_scanning_configuration: Optional[ImageScanningConfiguration] = None,
workflows: Optional[WorkflowConfigurationList] = None,
logging_configuration: Optional[PipelineLoggingConfiguration] = None,
execution_role: Optional[RoleNameOrArn] = None,
image_tags: Optional[TagMap] = None,
) -> UpdateImagePipelineResponse
Updates an image pipeline. Use image pipelines to automate the creation and distribution of images. You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn. The recipe must be the same type, image or container, as the pipeline's current recipe.
UpdateImagePipeline does not support selective updates. The request replaces the pipeline's entire configuration, so include every setting that you want to keep. Any optional property that you omit is removed or reset to its default.
Parameters:
-
image_pipeline_arn(ImagePipelineArn) –The Amazon Resource Name (ARN) of the image pipeline that you want to update.
-
description(Optional[NonEmptyString], default:None) –The description of the image pipeline.
-
image_recipe_arn(Optional[ImageRecipeArn], default:None) –The Amazon Resource Name (ARN) of the image recipe that configures images created by this image pipeline. You must specify either this property or
containerRecipeArn, but not both. -
container_recipe_arn(Optional[ContainerRecipeArn], default:None) –The Amazon Resource Name (ARN) of the container recipe that is used to configure images created by this container pipeline. You must specify either this property or
imageRecipeArn, but not both. -
infrastructure_configuration_arn(InfrastructureConfigurationArn) –The Amazon Resource Name (ARN) of the infrastructure configuration that Image Builder uses to build images created by this image pipeline.
-
distribution_configuration_arn(Optional[DistributionConfigurationArn], default:None) –The Amazon Resource Name (ARN) of the distribution configuration that Image Builder uses to configure and distribute images created by this image pipeline.
-
image_tests_configuration(Optional[ImageTestsConfiguration], default:None) –Specifies the test settings that Image Builder applies to images that this pipeline creates. If you don't provide test settings, Image Builder stores a default configuration with image tests enabled.
-
enhanced_image_metadata_enabled(Optional[NullableBoolean], default:None) –Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults to
true. -
schedule(Optional[Schedule], default:None) –The schedule of the image pipeline. Because the update replaces the entire configuration, omitting this property removes any existing schedule. The pipeline then runs only when you call StartImagePipelineExecution.
-
status(Optional[PipelineStatus], default:None) –The status of the image pipeline. Defaults to
ENABLEDwhen omitted. To keep a pipeline disabled, include this property set toDISABLEDin your update request. -
client_token(ClientToken) –A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
-
image_scanning_configuration(Optional[ImageScanningConfiguration], default:None) –Contains settings for vulnerability scans that Amazon Inspector runs against the test instance during image creation.
-
workflows(Optional[WorkflowConfigurationList], default:None) –The array of workflow configuration objects for builds that this pipeline starts. You must also specify
executionRolewhen you provide workflows. -
logging_configuration(Optional[PipelineLoggingConfiguration], default:None) –Specifies the logging configuration for the image pipeline. Use this to define custom CloudWatch Logs log groups for your pipeline execution logs and image build logs. The service manages log groups with names starting with
/aws/imagebuilder/using the service-linked role. For custom log group names outside of this prefix, you must also provide anexecutionRole. -
execution_role(Optional[RoleNameOrArn], default:None) –The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. If you omit this property, the pipeline reverts to the Image Builder service-linked role.
-
image_tags(Optional[TagMap], default:None) –The tags that Image Builder applies to the Image Builder image resource that this pipeline's scheduled executions create. These tags don't apply to the output AMI. To tag output AMIs, use
amiTagsin the pipeline's distribution configuration.
Raises:
-
CallRateLimitExceededException–You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.
-
ClientException–A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.
-
ForbiddenException–You are not authorized to perform the requested operation.
-
IdempotentParameterMismatchException–You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.
-
InvalidRequestException–The request is malformed or otherwise invalid. Verify the request and try again.
-
ResourceInUseException–The resource that you are trying to operate on is currently in use. Review the message details and retry later.
-
ServiceException–An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.
-
ServiceUnavailableException–The service is unable to process your request at this time.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Update an image pipeline The following example changes the pipeline's schedule to build every day at 6:00 AM UTC.
>>> client.update_image_pipeline(image_pipeline_arn='arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline', image_recipe_arn='arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0', infrastructure_configuration_arn='arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure', schedule={'scheduleExpression': 'cron(0 6 * * ? *)', 'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'}, status='ENABLED', client_token='a1b2c3d4-5678-90ab-cdef-EXAMPLEddddd')
Source code in docs_src/capo_imagebuilder/_services/imagebuilder.py
6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 | |