createProfilingGroup method
Creates a profiling group.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter profilingGroupName :
The name of the profiling group to create.
Parameter agentOrchestrationConfig :
Specifies whether profiling is enabled or disabled for the created
profiling group.
Parameter clientToken :
Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to
prevent the accidental creation of duplicate profiling groups if there are
failures and retries.
Parameter computePlatform :
The compute platform of the profiling group. Use AWSLambda if
your application runs on AWS Lambda. Use Default if your
application runs on a compute platform that is not AWS Lambda, such an
Amazon EC2 instance, an on-premises server, or a different platform. If
not specified, Default is used.
Parameter tags :
A list of tags to add to the created profiling group.
Implementation
Future<CreateProfilingGroupResponse> createProfilingGroup({
required String profilingGroupName,
AgentOrchestrationConfig? agentOrchestrationConfig,
String? clientToken,
ComputePlatform? computePlatform,
Map<String, String>? tags,
}) async {
final $query = <String, List<String>>{
if (clientToken != null) 'clientToken': [clientToken],
};
final $payload = <String, dynamic>{
'profilingGroupName': profilingGroupName,
if (agentOrchestrationConfig != null)
'agentOrchestrationConfig': agentOrchestrationConfig,
if (computePlatform != null) 'computePlatform': computePlatform.value,
if (tags != null) 'tags': tags,
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'POST',
requestUri: '/profilingGroups',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return CreateProfilingGroupResponse(
profilingGroup: ProfilingGroupDescription.fromJson($json),
);
}