createSecurityRequirementPack method
Creates a customer managed security requirement pack.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name of the security requirement pack.
Parameter description :
A description of the security requirement pack.
Parameter kmsKeyId :
The identifier of the AWS KMS key used to encrypt pack contents.
Parameter status :
The status of the pack. Defaults to ENABLED if not provided.
Parameter tags :
The tags to associate with the security requirement pack.
Implementation
Future<CreateSecurityRequirementPackOutput> createSecurityRequirementPack({
required String name,
String? description,
String? kmsKeyId,
SecurityRequirementPackStatus? status,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
if (description != null) 'description': description,
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (status != null) 'status': status.value,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateSecurityRequirementPack',
exceptionFnMap: _exceptionFns,
);
return CreateSecurityRequirementPackOutput.fromJson(response);
}