createClusterSchedulerConfig method
Create cluster policy configuration. This policy is used for task prioritization and fair-share allocation of idle compute. This helps prioritize critical workloads and distributes idle compute across entities.
May throw ConflictException.
May throw ResourceLimitExceeded.
Parameter clusterArn :
ARN of the cluster.
Parameter name :
Name for the cluster policy.
Parameter schedulerConfig :
Configuration about the monitoring schedule.
Parameter description :
Description of the cluster policy.
Parameter tags :
Tags of the cluster policy.
Implementation
Future<CreateClusterSchedulerConfigResponse> createClusterSchedulerConfig({
required String clusterArn,
required String name,
required SchedulerConfig schedulerConfig,
String? description,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateClusterSchedulerConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterArn': clusterArn,
'Name': name,
'SchedulerConfig': schedulerConfig,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
},
);
return CreateClusterSchedulerConfigResponse.fromJson(jsonResponse.body);
}