createProject method

Future<CreateProjectOutput> createProject({
  1. required String domainIdentifier,
  2. required String name,
  3. String? description,
  4. String? domainUnitId,
  5. List<String>? glossaryTerms,
  6. List<ProjectMembershipAssignment>? membershipAssignments,
  7. String? projectCategory,
  8. String? projectExecutionRole,
  9. String? projectProfileId,
  10. Map<String, String>? resourceTags,
  11. List<EnvironmentConfigurationUserParameter>? userParameters,
})

Creates an Amazon DataZone 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 in which this project is created.

Parameter name : The name of the Amazon DataZone project.

Parameter description : The description of the Amazon DataZone project.

Parameter domainUnitId : The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.

Parameter glossaryTerms : The glossary terms that can be used in this Amazon DataZone project.

Parameter membershipAssignments : The members to be assigned to the project.

Parameter projectCategory : The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.

Parameter projectExecutionRole : The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.

Parameter projectProfileId : The ID of the project profile.

Parameter resourceTags : The resource tags of the project.

Parameter userParameters : The user parameters of the project.

Implementation

Future<CreateProjectOutput> createProject({
  required String domainIdentifier,
  required String name,
  String? description,
  String? domainUnitId,
  List<String>? glossaryTerms,
  List<ProjectMembershipAssignment>? membershipAssignments,
  String? projectCategory,
  String? projectExecutionRole,
  String? projectProfileId,
  Map<String, String>? resourceTags,
  List<EnvironmentConfigurationUserParameter>? userParameters,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    if (description != null) 'description': description,
    if (domainUnitId != null) 'domainUnitId': domainUnitId,
    if (glossaryTerms != null) 'glossaryTerms': glossaryTerms,
    if (membershipAssignments != null)
      'membershipAssignments': membershipAssignments,
    if (projectCategory != null) 'projectCategory': projectCategory,
    if (projectExecutionRole != null)
      'projectExecutionRole': projectExecutionRole,
    if (projectProfileId != null) 'projectProfileId': projectProfileId,
    if (resourceTags != null) 'resourceTags': resourceTags,
    if (userParameters != null) 'userParameters': userParameters,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/projects',
    exceptionFnMap: _exceptionFns,
  );
  return CreateProjectOutput.fromJson(response);
}