associateHealthCheck method
Adds health-based detection to the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your Amazon Web Services resource to improve responsiveness and accuracy in attack detection and response.
You define the health check in Route 53 and then associate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the WAF Developer Guide.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw InvalidResourceException.
May throw LimitsExceededException.
May throw OptimisticLockException.
May throw ResourceNotFoundException.
Parameter healthCheckArn :
The Amazon Resource Name (ARN) of the health check to associate with the
protection.
Parameter protectionId :
The unique identifier (ID) for the Protection object to add the
health check association to.
Implementation
Future<void> associateHealthCheck({
required String healthCheckArn,
required String protectionId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSShield_20160616.AssociateHealthCheck'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HealthCheckArn': healthCheckArn,
'ProtectionId': protectionId,
},
);
}