resolver_query_log_configs
Creates, updates, deletes, gets or lists a resolver_query_log_configs resource.
Overview
| Name | resolver_query_log_configs |
| Type | Resource |
| Id | aws.route53resolver.resolver_query_log_configs |
Fields
The following fields are returned by SELECT queries:
- get_resolver_query_log_config
- list_resolver_query_log_configs
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN for the query logging configuration. |
association_count | integer | The number of VPCs that are associated with the query logging configuration. |
creation_time | string | The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal Time (UTC). |
creator_request_id | string | A unique string that identifies the request that created the query logging configuration. The CreatorRequestId allows failed requests to be retried without the risk of running the operation twice. |
destination_arn | string | The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream. |
id | string | The ID for the query logging configuration. |
name | string | The name of the query logging configuration. (pattern: <code>(?!^[0-9]+$)([a-zA-Z0-9-_' ']+)</code>) |
owner_id | string | The Amazon Web Services account ID for the account that created the query logging configuration. |
share_status | string | An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or was shared with the current account by another Amazon Web Services account. Sharing is configured through Resource Access Manager (RAM). (NOT_SHARED, SHARED_WITH_ME, SHARED_BY_ME) |
status | string | The status of the specified query logging configuration. Valid values include the following: CREATING: Resolver is creating the query logging configuration. CREATED: The query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC. DELETING: Resolver is deleting this query logging configuration. FAILED: Resolver can't deliver logs to the location that is specified in the query logging configuration. Here are two common causes: The specified destination (for example, an Amazon S3 bucket) was deleted. Permissions don't allow sending logs to the destination. (CREATING, CREATED, DELETING, FAILED) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN for the query logging configuration. |
association_count | integer | The number of VPCs that are associated with the query logging configuration. |
creation_time | string | The date and time that the query logging configuration was created, in Unix time format and Coordinated Universal Time (UTC). |
creator_request_id | string | A unique string that identifies the request that created the query logging configuration. The CreatorRequestId allows failed requests to be retried without the risk of running the operation twice. |
destination_arn | string | The ARN of the resource that you want Resolver to send query logs: an Amazon S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream. |
id | string | The ID for the query logging configuration. |
name | string | The name of the query logging configuration. (pattern: <code>(?!^[0-9]+$)([a-zA-Z0-9-_' ']+)</code>) |
owner_id | string | The Amazon Web Services account ID for the account that created the query logging configuration. |
share_status | string | An indication of whether the query logging configuration is shared with other Amazon Web Services accounts, or was shared with the current account by another Amazon Web Services account. Sharing is configured through Resource Access Manager (RAM). (NOT_SHARED, SHARED_WITH_ME, SHARED_BY_ME) |
status | string | The status of the specified query logging configuration. Valid values include the following: CREATING: Resolver is creating the query logging configuration. CREATED: The query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC. DELETING: Resolver is deleting this query logging configuration. FAILED: Resolver can't deliver logs to the location that is specified in the query logging configuration. Here are two common causes: The specified destination (for example, an Amazon S3 bucket) was deleted. Permissions don't allow sending logs to the destination. (CREATING, CREATED, DELETING, FAILED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resolver_query_log_config | select | region | Gets information about a specified Resolver query logging configuration, such as the number of VPCs that the configuration is logging queries for and the location that logs are sent to. | |
list_resolver_query_log_configs | select | region | Lists information about the specified query logging configurations. Each configuration defines where you want Resolver to save DNS query logs and specifies the VPCs that you want to log queries for. | |
create_resolver_query_log_config | insert | region, DestinationArn, CreatorRequestId | Creates a Resolver query logging configuration, which defines where you want Resolver to save DNS query logs that originate in your VPCs. Resolver can log queries only for VPCs that are in the same Region as the query logging configuration. To specify which VPCs you want to log queries for, you use AssociateResolverQueryLogConfig. For more information, see AssociateResolverQueryLogConfig. You can optionally use Resource Access Manager (RAM) to share a query logging configuration with other Amazon Web Services accounts. The other accounts can then associate VPCs with the configuration. The query logs that Resolver creates for a configuration include all DNS queries that originate in all VPCs that are associated with the configuration. | |
associate_resolver_query_log_config | update | region, ResolverQueryLogConfigId, ResourceId | 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. The VPCs that you associate with a query logging configuration must be in the same Region as the configuration. To remove a VPC from a query logging configuration, see DisassociateResolverQueryLogConfig. | |
delete_resolver_query_log_config | delete | region | Deletes a query logging configuration. When you delete a configuration, Resolver stops logging DNS queries for all of the Amazon VPCs that are associated with the configuration. This also applies if the query logging configuration is shared with other Amazon Web Services accounts, and the other accounts have associated VPCs with the shared configuration. Before you can delete a query logging configuration, you must first disassociate all VPCs from the configuration. See DisassociateResolverQueryLogConfig. If you used Resource Access Manager (RAM) to share a query logging configuration with other accounts, you must stop sharing the configuration before you can delete a configuration. The accounts that you shared the configuration with can first disassociate VPCs that they associated with the configuration, but that's not necessary. If you stop sharing the configuration, those VPCs are automatically disassociated from the configuration. | |
disassociate_resolver_query_log_config | exec | region, ResolverQueryLogConfigId, ResourceId | Disassociates a VPC from a query logging configuration. Before you can delete a query logging configuration, you must first disassociate all VPCs from the configuration. If you used Resource Access Manager (RAM) to share a query logging configuration with other accounts, VPCs can be disassociated from the configuration in the following ways: The accounts that you shared the configuration with can disassociate VPCs from the configuration. You can stop sharing the configuration. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_resolver_query_log_config
- list_resolver_query_log_configs
Gets information about a specified Resolver query logging configuration, such as the number of VPCs that the configuration is logging queries for and the location that logs are sent to.
SELECT
arn,
association_count,
creation_time,
creator_request_id,
destination_arn,
id,
name,
owner_id,
share_status,
status
FROM aws.route53resolver.resolver_query_log_configs
WHERE region = '{{ region }}' -- required
;
Lists information about the specified query logging configurations. Each configuration defines where you want Resolver to save DNS query logs and specifies the VPCs that you want to log queries for.
SELECT
arn,
association_count,
creation_time,
creator_request_id,
destination_arn,
id,
name,
owner_id,
share_status,
status
FROM aws.route53resolver.resolver_query_log_configs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_resolver_query_log_config
- Manifest
Creates a Resolver query logging configuration, which defines where you want Resolver to save DNS query logs that originate in your VPCs. Resolver can log queries only for VPCs that are in the same Region as the query logging configuration. To specify which VPCs you want to log queries for, you use AssociateResolverQueryLogConfig. For more information, see AssociateResolverQueryLogConfig. You can optionally use Resource Access Manager (RAM) to share a query logging configuration with other Amazon Web Services accounts. The other accounts can then associate VPCs with the configuration. The query logs that Resolver creates for a configuration include all DNS queries that originate in all VPCs that are associated with the configuration.
INSERT INTO aws.route53resolver.resolver_query_log_configs (
Name,
DestinationArn,
CreatorRequestId,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ DestinationArn }}' /* required */,
'{{ CreatorRequestId }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
resolver_query_log_config
;
# Description fields are for documentation purposes
- name: resolver_query_log_configs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resolver_query_log_configs resource.
- name: Name
value: "{{ Name }}"
description: |
The name that you want to give the query logging configuration.
- name: DestinationArn
value: "{{ DestinationArn }}"
description: |
The ARN of the resource that you want Resolver to send query logs. You can send query logs to an S3 bucket, a CloudWatch Logs log group, or a Kinesis Data Firehose delivery stream. Examples of valid values include the following: S3 bucket: arn:aws:s3:::amzn-s3-demo-bucket You can optionally append a file prefix to the end of the ARN. arn:aws:s3:::amzn-s3-demo-bucket/development/ CloudWatch Logs log group: arn:aws:logs:us-west-1:123456789012:log-group:/mystack-testgroup-12ABC1AB12A1:* Kinesis Data Firehose delivery stream: arn:aws:kinesis:us-east-2:0123456789:stream/my_stream_name
- name: CreatorRequestId
value: "{{ CreatorRequestId }}"
description: |
A unique string that identifies the request and that allows failed requests to be retried without the risk of running the operation twice. CreatorRequestId can be any unique string, for example, a date/time stamp.
- name: Tags
description: |
A list of the tag keys and values that you want to associate with the query logging configuration.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- associate_resolver_query_log_config
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. The VPCs that you associate with a query logging configuration must be in the same Region as the configuration. To remove a VPC from a query logging configuration, see DisassociateResolverQueryLogConfig.
UPDATE aws.route53resolver.resolver_query_log_configs
SET
ResolverQueryLogConfigId = '{{ ResolverQueryLogConfigId }}',
ResourceId = '{{ ResourceId }}'
WHERE
region = '{{ region }}' --required
AND ResolverQueryLogConfigId = '{{ ResolverQueryLogConfigId }}' --required
AND ResourceId = '{{ ResourceId }}' --required
RETURNING
resolver_query_log_config_association;
DELETE examples
- delete_resolver_query_log_config
Deletes a query logging configuration. When you delete a configuration, Resolver stops logging DNS queries for all of the Amazon VPCs that are associated with the configuration. This also applies if the query logging configuration is shared with other Amazon Web Services accounts, and the other accounts have associated VPCs with the shared configuration. Before you can delete a query logging configuration, you must first disassociate all VPCs from the configuration. See DisassociateResolverQueryLogConfig. If you used Resource Access Manager (RAM) to share a query logging configuration with other accounts, you must stop sharing the configuration before you can delete a configuration. The accounts that you shared the configuration with can first disassociate VPCs that they associated with the configuration, but that's not necessary. If you stop sharing the configuration, those VPCs are automatically disassociated from the configuration.
DELETE FROM aws.route53resolver.resolver_query_log_configs
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disassociate_resolver_query_log_config
Disassociates a VPC from a query logging configuration. Before you can delete a query logging configuration, you must first disassociate all VPCs from the configuration. If you used Resource Access Manager (RAM) to share a query logging configuration with other accounts, VPCs can be disassociated from the configuration in the following ways: The accounts that you shared the configuration with can disassociate VPCs from the configuration. You can stop sharing the configuration.
EXEC aws.route53resolver.resolver_query_log_configs.disassociate_resolver_query_log_config
@region='{{ region }}' --required
@@json=
'{
"ResolverQueryLogConfigId": "{{ ResolverQueryLogConfigId }}",
"ResourceId": "{{ ResourceId }}"
}'
;