putPermissionPolicy method
Future<void>
putPermissionPolicy(
{ - required String policy,
- required String resourceArn,
})
Implementation
Future<void> putPermissionPolicy({
required String policy,
required String resourceArn,
}) async {
ArgumentError.checkNotNull(policy, 'policy');
_s.validateStringLength(
'policy',
policy,
1,
395000,
isRequired: true,
);
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
_s.validateStringLength(
'resourceArn',
resourceArn,
1,
1224,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSWAF_Regional_20161128.PutPermissionPolicy'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Policy': policy,
'ResourceArn': resourceArn,
},
);
}