associateResolverQueryLogConfig method
Associates an Amazon VPC with a specified query logging configuration.
Route 53 Resolver logs DNS queries that originate in all of the Amazon
VPCs that are associated with a specified query logging configuration. To
associate more than one VPC with a configuration, submit one
AssociateResolverQueryLogConfig
request for each VPC.
To remove a VPC from a query logging configuration, see DisassociateResolverQueryLogConfig.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw InvalidRequestException. May throw ResourceExistsException. May throw LimitExceededException. May throw InternalServiceErrorException. May throw ThrottlingException. May throw AccessDeniedException.
Parameter resolverQueryLogConfigId
:
The ID of the query logging configuration that you want to associate a VPC
with.
Parameter resourceId
:
The ID of an Amazon VPC that you want this query logging configuration to
log queries for.
Implementation
Future<AssociateResolverQueryLogConfigResponse>
associateResolverQueryLogConfig({
required String resolverQueryLogConfigId,
required String resourceId,
}) async {
ArgumentError.checkNotNull(
resolverQueryLogConfigId, 'resolverQueryLogConfigId');
_s.validateStringLength(
'resolverQueryLogConfigId',
resolverQueryLogConfigId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(resourceId, 'resourceId');
_s.validateStringLength(
'resourceId',
resourceId,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Route53Resolver.AssociateResolverQueryLogConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResolverQueryLogConfigId': resolverQueryLogConfigId,
'ResourceId': resourceId,
},
);
return AssociateResolverQueryLogConfigResponse.fromJson(jsonResponse.body);
}