createWorkflowVersion method
- required String versionName,
- required String workflowId,
- Accelerators? accelerators,
- ContainerRegistryMap? containerRegistryMap,
- String? containerRegistryMapUri,
- DefinitionRepository? definitionRepository,
- String? definitionUri,
- Uint8List? definitionZip,
- String? description,
- WorkflowEngine? engine,
- String? main,
- Map<
String, WorkflowParameter> ? parameterTemplate, - String? parameterTemplatePath,
- String? readmeMarkdown,
- String? readmePath,
- String? readmeUri,
- String? requestId,
- int? storageCapacity,
- StorageType? storageType,
- Map<
String, String> ? tags, - String? workflowBucketOwnerId,
Creates a new workflow version for the workflow that you specify with the
workflowId parameter.
When you create a new version of a workflow, you need to specify the configuration for the new version. It doesn't inherit any configuration values from the workflow.
Provide a version name that is unique for this workflow. You cannot change the name after HealthOmics creates the version. For more information, see Workflow versioning in Amazon Web Services HealthOmics in the Amazon Web Services HealthOmics User Guide.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw RequestTimeoutException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter versionName :
A name for the workflow version. Provide a version name that is unique for
this workflow. You cannot change the name after HealthOmics creates the
version.
The version name must start with a letter or number and it can include upper-case and lower-case letters, numbers, hyphens, periods and underscores. The maximum length is 64 characters. You can use a simple naming scheme, such as version1, version2, version3. You can also match your workflow versions with your own internal versioning conventions, such as 2.7.0, 2.7.1, 2.7.2.
Parameter workflowId :
The ID of the workflow where you are creating the new version. The
workflowId is not the UUID.
Parameter accelerators :
The computational accelerator for this workflow version.
Parameter containerRegistryMap :
(Optional) Use a container registry map to specify mappings between the
ECR private repository and one or more upstream registries. For more
information, see Container
images in the Amazon Web Services HealthOmics User Guide.
Parameter containerRegistryMapUri :
(Optional) URI of the S3 location for the registry mapping file.
Parameter definitionRepository :
The repository information for the workflow version definition. This
allows you to source your workflow version definition directly from a code
repository.
Parameter definitionUri :
The S3 URI of a definition for this workflow version. The S3 bucket must
be in the same region as this workflow version.
Parameter definitionZip :
A ZIP archive containing the main workflow definition file and
dependencies that it imports for this workflow version. You can use a file
with a ://fileb prefix instead of the Base64 string. For more information,
see Workflow definition requirements in the Amazon Web Services
HealthOmics User Guide.
Parameter description :
A description for this workflow version.
Parameter engine :
The workflow engine for this workflow version. This is only required if
you have workflow definition files from more than one engine in your zip
file. Otherwise, the service can detect the engine automatically from your
workflow definition.
Parameter main :
The path of the main definition file for this workflow version. This
parameter is not required if the ZIP archive contains only one workflow
definition file, or if the main definition file is named “main”. An
example path is: workflow-definition/main-file.wdl.
Parameter parameterTemplate :
A parameter template for this workflow version. If this field is blank,
Amazon Web Services HealthOmics will automatically parse the parameter
template values from your workflow definition file. To override these
service generated default values, provide a parameter template. To view an
example of a parameter template, see Parameter
template files in the Amazon Web Services HealthOmics User
Guide.
Parameter parameterTemplatePath :
The path to the workflow version parameter template JSON file within the
repository. This file defines the input parameters for runs that use this
workflow version. If not specified, the workflow version will be created
without a parameter template.
Parameter readmeMarkdown :
The markdown content for the workflow version's README file. This provides
documentation and usage information for users of this specific workflow
version.
Parameter readmePath :
The path to the workflow version README markdown file within the
repository. This file provides documentation and usage information for the
workflow. If not specified, the README.md file from the root
directory of the repository will be used.
Parameter readmeUri :
The S3 URI of the README file for the workflow version. This file provides
documentation and usage information for the workflow version. Requirements
include:
-
The S3 URI must begin with
s3://USER-OWNED-BUCKET/ - The requester must have access to the S3 bucket and object.
- The max README content length is 500 KiB.
Parameter requestId :
An idempotency token to ensure that duplicate workflows are not created
when Amazon Web Services HealthOmics submits retry requests.
Parameter storageCapacity :
The default static storage capacity (in gibibytes) for runs that use this
workflow version. The storageCapacity can be overwritten at
run time. The storage capacity is not required for runs with a
DYNAMIC storage type.
Parameter storageType :
The default storage type for runs that use this workflow version. The
storageType can be overridden at run time.
DYNAMIC storage dynamically scales the storage up or down,
based on file system utilization. STATIC storage allocates a fixed amount
of storage. For more information about dynamic and static storage types,
see Run
storage types in the Amazon Web Services HealthOmics User
Guide.
Parameter tags :
Tags for this workflow version. You can define up to 50 tags for the
workflow. For more information, see Adding
a tag in the Amazon Web Services HealthOmics User Guide.
Parameter workflowBucketOwnerId :
Amazon Web Services Id of the owner of the S3 bucket that contains the
workflow definition. You need to specify this parameter if your account is
not the bucket owner.
Implementation
Future<CreateWorkflowVersionResponse> createWorkflowVersion({
required String versionName,
required String workflowId,
Accelerators? accelerators,
ContainerRegistryMap? containerRegistryMap,
String? containerRegistryMapUri,
DefinitionRepository? definitionRepository,
String? definitionUri,
Uint8List? definitionZip,
String? description,
WorkflowEngine? engine,
String? main,
Map<String, WorkflowParameter>? parameterTemplate,
String? parameterTemplatePath,
String? readmeMarkdown,
String? readmePath,
String? readmeUri,
String? requestId,
int? storageCapacity,
StorageType? storageType,
Map<String, String>? tags,
String? workflowBucketOwnerId,
}) async {
final $payload = <String, dynamic>{
'versionName': versionName,
if (accelerators != null) 'accelerators': accelerators.value,
if (containerRegistryMap != null)
'containerRegistryMap': containerRegistryMap,
if (containerRegistryMapUri != null)
'containerRegistryMapUri': containerRegistryMapUri,
if (definitionRepository != null)
'definitionRepository': definitionRepository,
if (definitionUri != null) 'definitionUri': definitionUri,
if (definitionZip != null) 'definitionZip': base64Encode(definitionZip),
if (description != null) 'description': description,
if (engine != null) 'engine': engine.value,
if (main != null) 'main': main,
if (parameterTemplate != null) 'parameterTemplate': parameterTemplate,
if (parameterTemplatePath != null)
'parameterTemplatePath': parameterTemplatePath,
if (readmeMarkdown != null) 'readmeMarkdown': readmeMarkdown,
if (readmePath != null) 'readmePath': readmePath,
if (readmeUri != null) 'readmeUri': readmeUri,
'requestId': requestId ?? _s.generateIdempotencyToken(),
if (storageCapacity != null) 'storageCapacity': storageCapacity,
if (storageType != null) 'storageType': storageType.value,
if (tags != null) 'tags': tags,
if (workflowBucketOwnerId != null)
'workflowBucketOwnerId': workflowBucketOwnerId,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/workflow/${Uri.encodeComponent(workflowId)}/version',
exceptionFnMap: _exceptionFns,
);
return CreateWorkflowVersionResponse.fromJson(response);
}