createProject method
Future<CreateProjectOutput>
createProject({
- required String projectName,
- required ServiceCatalogProvisioningDetails serviceCatalogProvisioningDetails,
- String? projectDescription,
- List<
Tag> ? tags,
Creates a machine learning (ML) project that can contain one or more templates that set up an ML pipeline from training to deploying an approved model.
May throw ResourceLimitExceeded.
Parameter projectName
:
The name of the project.
Parameter serviceCatalogProvisioningDetails
:
The product ID and provisioning artifact ID to provision a service
catalog. For information, see What
is AWS Service Catalog.
Parameter projectDescription
:
A description for the project.
Parameter tags
:
An array of key-value pairs that you want to use to organize and track
your AWS resource costs. For more information, see Tagging
AWS resources in the AWS General Reference Guide.
Implementation
Future<CreateProjectOutput> createProject({
required String projectName,
required ServiceCatalogProvisioningDetails
serviceCatalogProvisioningDetails,
String? projectDescription,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(projectName, 'projectName');
_s.validateStringLength(
'projectName',
projectName,
1,
32,
isRequired: true,
);
ArgumentError.checkNotNull(
serviceCatalogProvisioningDetails, 'serviceCatalogProvisioningDetails');
_s.validateStringLength(
'projectDescription',
projectDescription,
0,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateProject'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProjectName': projectName,
'ServiceCatalogProvisioningDetails': serviceCatalogProvisioningDetails,
if (projectDescription != null)
'ProjectDescription': projectDescription,
if (tags != null) 'Tags': tags,
},
);
return CreateProjectOutput.fromJson(jsonResponse.body);
}