createImagePipeline method
- required String infrastructureConfigurationArn,
- required String name,
- String? clientToken,
- String? containerRecipeArn,
- String? description,
- String? distributionConfigurationArn,
- bool? enhancedImageMetadataEnabled,
- String? executionRole,
- String? imageRecipeArn,
- ImageScanningConfiguration? imageScanningConfiguration,
- Map<
String, String> ? imageTags, - ImageTestsConfiguration? imageTestsConfiguration,
- PipelineLoggingConfiguration? loggingConfiguration,
- Schedule? schedule,
- PipelineStatus? status,
- Map<
String, String> ? tags, - List<
WorkflowConfiguration> ? workflows,
Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images.
May throw CallRateLimitExceededException.
May throw ClientException.
May throw ForbiddenException.
May throw IdempotentParameterMismatchException.
May throw InvalidRequestException.
May throw ResourceAlreadyExistsException.
May throw ResourceInUseException.
May throw ServiceException.
May throw ServiceQuotaExceededException.
May throw ServiceUnavailableException.
Parameter infrastructureConfigurationArn :
The Amazon Resource Name (ARN) of the infrastructure configuration that
will be used to build images created by this image pipeline.
Parameter name :
The name of the image pipeline.
Parameter clientToken :
Unique, case-sensitive identifier you provide to ensure idempotency of the
request. For more information, see Ensuring
idempotency in the Amazon EC2 API Reference.
Parameter containerRecipeArn :
The Amazon Resource Name (ARN) of the container recipe that is used to
configure images created by this container pipeline.
Parameter description :
The description of the image pipeline.
Parameter distributionConfigurationArn :
The Amazon Resource Name (ARN) of the distribution configuration that will
be used to configure and distribute images created by this image pipeline.
Parameter enhancedImageMetadataEnabled :
Collects additional information about the image being created, including
the operating system (OS) version and package list. This information is
used to enhance the overall experience of using EC2 Image Builder. Enabled
by default.
Parameter executionRole :
The name or Amazon Resource Name (ARN) for the IAM role you create that
grants Image Builder access to perform workflow actions.
Parameter imageRecipeArn :
The Amazon Resource Name (ARN) of the image recipe that will be used to
configure images created by this image pipeline.
Parameter imageScanningConfiguration :
Contains settings for vulnerability scans.
Parameter imageTags :
The tags to be applied to the images produced by this pipeline.
Parameter imageTestsConfiguration :
The image test configuration of the image pipeline.
Parameter loggingConfiguration :
Define logging configuration for the image build process.
Parameter schedule :
The schedule of the image pipeline.
Parameter status :
The status of the image pipeline.
Parameter tags :
The tags of the image pipeline.
Parameter workflows :
Contains an array of workflow configuration objects.
Implementation
Future<CreateImagePipelineResponse> createImagePipeline({
required String infrastructureConfigurationArn,
required String name,
String? clientToken,
String? containerRecipeArn,
String? description,
String? distributionConfigurationArn,
bool? enhancedImageMetadataEnabled,
String? executionRole,
String? imageRecipeArn,
ImageScanningConfiguration? imageScanningConfiguration,
Map<String, String>? imageTags,
ImageTestsConfiguration? imageTestsConfiguration,
PipelineLoggingConfiguration? loggingConfiguration,
Schedule? schedule,
PipelineStatus? status,
Map<String, String>? tags,
List<WorkflowConfiguration>? workflows,
}) async {
final $payload = <String, dynamic>{
'infrastructureConfigurationArn': infrastructureConfigurationArn,
'name': name,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (containerRecipeArn != null) 'containerRecipeArn': containerRecipeArn,
if (description != null) 'description': description,
if (distributionConfigurationArn != null)
'distributionConfigurationArn': distributionConfigurationArn,
if (enhancedImageMetadataEnabled != null)
'enhancedImageMetadataEnabled': enhancedImageMetadataEnabled,
if (executionRole != null) 'executionRole': executionRole,
if (imageRecipeArn != null) 'imageRecipeArn': imageRecipeArn,
if (imageScanningConfiguration != null)
'imageScanningConfiguration': imageScanningConfiguration,
if (imageTags != null) 'imageTags': imageTags,
if (imageTestsConfiguration != null)
'imageTestsConfiguration': imageTestsConfiguration,
if (loggingConfiguration != null)
'loggingConfiguration': loggingConfiguration,
if (schedule != null) 'schedule': schedule,
if (status != null) 'status': status.value,
if (tags != null) 'tags': tags,
if (workflows != null) 'workflows': workflows,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/CreateImagePipeline',
exceptionFnMap: _exceptionFns,
);
return CreateImagePipelineResponse.fromJson(response);
}