update_image_pipeline
async
¶
update_image_pipeline(
image_pipeline_arn: ImagePipelineArn,
infrastructure_configuration_arn: InfrastructureConfigurationArn,
client_token: ClientToken,
*,
config_overrides: Optional[AsyncimagebuilderClientConfig] = 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.
>>> await 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/async_imagebuilder.py
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 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 | |