createAgentSpace method
Creates a new agent space. An agent space is a dedicated workspace for securing a specific application.
Parameter name :
The name of the agent space.
Parameter awsResources :
The AWS resources to associate with the agent space.
Parameter codeReviewSettings :
The code review settings for the agent space.
Parameter description :
A description of the agent space.
Parameter kmsKeyId :
The identifier of the AWS KMS key to use for encrypting data in the agent
space.
Parameter tags :
The tags to associate with the agent space.
Parameter targetDomainIds :
The list of target domain identifiers to associate with the agent space.
Implementation
Future<CreateAgentSpaceOutput> createAgentSpace({
required String name,
AWSResources? awsResources,
CodeReviewSettings? codeReviewSettings,
String? description,
String? kmsKeyId,
Map<String, String>? tags,
List<String>? targetDomainIds,
}) async {
final $payload = <String, dynamic>{
'name': name,
if (awsResources != null) 'awsResources': awsResources,
if (codeReviewSettings != null) 'codeReviewSettings': codeReviewSettings,
if (description != null) 'description': description,
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (tags != null) 'tags': tags,
if (targetDomainIds != null) 'targetDomainIds': targetDomainIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateAgentSpace',
exceptionFnMap: _exceptionFns,
);
return CreateAgentSpaceOutput.fromJson(response);
}