createImagePipeline method
- required String infrastructureConfigurationArn,
- required String name,
- String? clientToken,
- String? containerRecipeArn,
- String? description,
- String? distributionConfigurationArn,
- bool? enhancedImageMetadataEnabled,
- String? imageRecipeArn,
- ImageTestsConfiguration? imageTestsConfiguration,
- Schedule? schedule,
- PipelineStatus? status,
- Map<
String, String> ? tags,
Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images.
May throw ServiceException. May throw ClientException. May throw ServiceUnavailableException. May throw InvalidRequestException. May throw IdempotentParameterMismatchException. May throw ForbiddenException. May throw CallRateLimitExceededException. May throw ResourceInUseException. May throw ResourceAlreadyExistsException. May throw ServiceQuotaExceededException.
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
:
The idempotency token used to make this request idempotent.
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 imageRecipeArn
:
The Amazon Resource Name (ARN) of the image recipe that will be used to
configure images created by this image pipeline.
Parameter imageTestsConfiguration
:
The image test configuration of the image pipeline.
Parameter schedule
:
The schedule of the image pipeline.
Parameter status
:
The status of the image pipeline.
Parameter tags
:
The tags of the image pipeline.
Implementation
Future<CreateImagePipelineResponse> createImagePipeline({
required String infrastructureConfigurationArn,
required String name,
String? clientToken,
String? containerRecipeArn,
String? description,
String? distributionConfigurationArn,
bool? enhancedImageMetadataEnabled,
String? imageRecipeArn,
ImageTestsConfiguration? imageTestsConfiguration,
Schedule? schedule,
PipelineStatus? status,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(
infrastructureConfigurationArn, 'infrastructureConfigurationArn');
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'clientToken',
clientToken,
1,
36,
);
_s.validateStringLength(
'description',
description,
1,
1024,
);
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 (imageRecipeArn != null) 'imageRecipeArn': imageRecipeArn,
if (imageTestsConfiguration != null)
'imageTestsConfiguration': imageTestsConfiguration,
if (schedule != null) 'schedule': schedule,
if (status != null) 'status': status.toValue(),
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/CreateImagePipeline',
exceptionFnMap: _exceptionFns,
);
return CreateImagePipelineResponse.fromJson(response);
}