startMetadataGenerationRun method

Future<StartMetadataGenerationRunOutput> startMetadataGenerationRun({
  1. required String domainIdentifier,
  2. required String owningProjectIdentifier,
  3. required MetadataGenerationRunTarget target,
  4. String? clientToken,
  5. MetadataGenerationRunType? type,
  6. List<MetadataGenerationRunType>? types,
})

Starts the metadata generation run.

Prerequisites:

  • Asset must be created and belong to the specified domain and project.
  • Asset type must be supported for metadata generation (e.g., Amazon Web Services Glue table).
  • Asset must have a structured schema with valid rows and columns.
  • Valid values for --type: BUSINESS_DESCRIPTIONS, BUSINESS_NAMES, BUSINESS_GLOSSARY_ASSOCIATIONS.
  • The user must have permission to run metadata generation in the domain/project.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The ID of the Amazon DataZone domain where you want to start a metadata generation run.

Parameter owningProjectIdentifier : The ID of the project that owns the asset for which you want to start a metadata generation run.

Parameter target : The asset for which you want to start a metadata generation run.

Parameter clientToken : A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.

Parameter type : The type of the metadata generation run.

Parameter types : The types of the metadata generation run.

Implementation

Future<StartMetadataGenerationRunOutput> startMetadataGenerationRun({
  required String domainIdentifier,
  required String owningProjectIdentifier,
  required MetadataGenerationRunTarget target,
  String? clientToken,
  MetadataGenerationRunType? type,
  List<MetadataGenerationRunType>? types,
}) async {
  final $payload = <String, dynamic>{
    'owningProjectIdentifier': owningProjectIdentifier,
    'target': target,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (type != null) 'type': type.value,
    if (types != null) 'types': types.map((e) => e.value).toList(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/metadata-generation-runs',
    exceptionFnMap: _exceptionFns,
  );
  return StartMetadataGenerationRunOutput.fromJson(response);
}