registerCrossAccountAccessRole method
Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.
May throw InternalException. May throw InvalidInputException. May throw AccessDeniedException. May throw InvalidCrossAccountRoleException. May throw ServiceTemporarilyUnavailableException.
Parameter roleArn
:
The ARN of the IAM role that grants Amazon Inspector access to AWS
Services needed to perform security assessments.
Implementation
Future<void> registerCrossAccountAccessRole({
required String roleArn,
}) async {
ArgumentError.checkNotNull(roleArn, 'roleArn');
_s.validateStringLength(
'roleArn',
roleArn,
1,
300,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'InspectorService.RegisterCrossAccountAccessRole'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'roleArn': roleArn,
},
);
}