putResolverQueryLogConfigPolicy method

Future<PutResolverQueryLogConfigPolicyResponse> putResolverQueryLogConfigPolicy({
  1. required String arn,
  2. required String resolverQueryLogConfigPolicy,
})

Specifies an AWS account that you want to share a query logging configuration with, the query logging configuration that you want to share, and the operations that you want the account to be able to perform on the configuration.

May throw InvalidPolicyDocument. May throw InvalidParameterException. May throw InvalidRequestException. May throw UnknownResourceException. May throw InternalServiceErrorException. May throw AccessDeniedException.

Parameter arn : The Amazon Resource Name (ARN) of the account that you want to share rules with.

Parameter resolverQueryLogConfigPolicy : An AWS Identity and Access Management policy statement that lists the query logging configurations that you want to share with another AWS account and the operations that you want the account to be able to perform. You can specify the following operations in the Actions section of the statement:

  • route53resolver:AssociateResolverQueryLogConfig
  • route53resolver:DisassociateResolverQueryLogConfig
  • route53resolver:ListResolverQueryLogConfigAssociations
  • route53resolver:ListResolverQueryLogConfigs
In the Resource section of the statement, you specify the ARNs for the query logging configurations that you want to share with the account that you specified in Arn.

Implementation

Future<PutResolverQueryLogConfigPolicyResponse>
    putResolverQueryLogConfigPolicy({
  required String arn,
  required String resolverQueryLogConfigPolicy,
}) async {
  ArgumentError.checkNotNull(arn, 'arn');
  _s.validateStringLength(
    'arn',
    arn,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      resolverQueryLogConfigPolicy, 'resolverQueryLogConfigPolicy');
  _s.validateStringLength(
    'resolverQueryLogConfigPolicy',
    resolverQueryLogConfigPolicy,
    0,
    5000,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.PutResolverQueryLogConfigPolicy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Arn': arn,
      'ResolverQueryLogConfigPolicy': resolverQueryLogConfigPolicy,
    },
  );

  return PutResolverQueryLogConfigPolicyResponse.fromJson(jsonResponse.body);
}