createSupportPermit method
Creates a support permit that authorizes an AWS support operator to perform specified actions on specified resources. The permit is cryptographically signed using a customer-managed AWS KMS key (ECC_NIST_P384, SIGN_VERIFY) to ensure non-repudiation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
A customer-chosen name for the support permit. Must be between 1 and 256
alphanumeric characters.
Parameter permit :
The permit definition specifying the actions, resources, and time-window
conditions that the support operator is authorized to use.
Parameter signingKeyInfo :
The signing key information used to sign the permit. Must reference an AWS
KMS key with key usage SIGN_VERIFY and key spec ECC_NIST_P384.
Parameter clientToken :
A unique, case-sensitive identifier to ensure that the operation completes
no more than one time. If this token matches a previous request, the
service returns the existing permit without creating a duplicate.
Parameter description :
A human-readable description of why this permit is being created. Maximum
length of 1024 characters.
Parameter supportCaseDisplayId :
The display identifier of the AWS Support case associated with this
permit.
Parameter tags :
The tags to associate with the support permit on creation.
Implementation
Future<CreateSupportPermitOutput> createSupportPermit({
required String name,
required Permit permit,
required SigningKeyInfo signingKeyInfo,
String? clientToken,
String? description,
String? supportCaseDisplayId,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
'permit': permit,
'signingKeyInfo': signingKeyInfo,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (supportCaseDisplayId != null)
'supportCaseDisplayId': supportCaseDisplayId,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/support-permits',
exceptionFnMap: _exceptionFns,
);
return CreateSupportPermitOutput.fromJson(response);
}