Skip to main content

access_log_subscriptions

Creates, updates, deletes, gets or lists an access_log_subscriptions resource.

Overview

Nameaccess_log_subscriptions
TypeResource
Idaws.vpc_lattice.access_log_subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the access log subscription. (pattern: <code>als-[0-9a-z]{17}</code>)
arnstringThe Amazon Resource Name (ARN) of the access log subscription (pattern: <code>arn:[a-z0-9-]+:vpc-lattice:[a-zA-Z0-9-]+:\d{12}:accesslogsubscription/als-[0-9a-z]{17}</code>)
created_atstring (date-time)The date and time that the access log subscription was created, in ISO-8601 format.
destination_arnstringThe Amazon Resource Name (ARN) of the destination. (pattern: <code>arn(:[a-z0-9]+([.-][a-z0-9]+)){2}(:([a-z0-9]+([.-][a-z0-9]+))?){2}:([^/].*)?</code>)
last_updated_atstring (date-time)The date and time that the access log subscription was last updated, in ISO-8601 format.
resource_arnstringThe Amazon Resource Name (ARN) of the service or service network. (pattern: <code>arn(:[a-z0-9]+([.-][a-z0-9]+)){2}(:([a-z0-9]+([.-][a-z0-9]+))?){2}:((servicenetwork/sn)|(service/svc)|(resourceconfiguration/rcfg))-[0-9a-z]{17}</code>)
resource_idstringThe ID of the service or service network. (pattern: <code>((sn)|(svc))-[0-9a-z]{17}</code>)
service_network_log_typestringLog type of the service network. (SERVICE, RESOURCE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_access_log_subscriptionsselectresourceIdentifier, regionmaxResults, nextTokenLists the access log subscriptions for the specified service network or service.
get_access_log_subscriptionselectaccess_log_subscription_identifier, regionRetrieves information about the specified access log subscription.
create_access_log_subscriptioninsertregion, resourceIdentifier, destinationArnEnables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner can only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network. For more information, see Access logs in the Amazon VPC Lattice User Guide.
update_access_log_subscriptionupdateaccess_log_subscription_identifier, region, destinationArnUpdates the specified access log subscription.
delete_access_log_subscriptiondeleteaccess_log_subscription_identifier, regionDeletes the specified access log subscription.

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.

NameDatatypeDescription
access_log_subscription_identifierstringThe ID or ARN of the access log subscription.
regionstringAWS region (default: us-east-1)
resourceIdentifierstringThe ID or ARN of the service network or service.
maxResultsintegerThe maximum number of results to return.
nextTokenstringA pagination token for the next page of results.

SELECT examples

Lists the access log subscriptions for the specified service network or service.

SELECT
id,
arn,
created_at,
destination_arn,
last_updated_at,
resource_arn,
resource_id,
service_network_log_type
FROM aws.vpc_lattice.access_log_subscriptions
WHERE resourceIdentifier = '{{ resourceIdentifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Enables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner can only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network. For more information, see Access logs in the Amazon VPC Lattice User Guide.

INSERT INTO aws.vpc_lattice.access_log_subscriptions (
clientToken,
resourceIdentifier,
destinationArn,
serviceNetworkLogType,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ resourceIdentifier }}' /* required */,
'{{ destinationArn }}' /* required */,
'{{ serviceNetworkLogType }}',
'{{ tags }}',
'{{ region }}'
RETURNING
id,
arn,
destination_arn,
resource_arn,
resource_id,
service_network_log_type
;

UPDATE examples

Updates the specified access log subscription.

UPDATE aws.vpc_lattice.access_log_subscriptions
SET
destinationArn = '{{ destinationArn }}'
WHERE
access_log_subscription_identifier = '{{ access_log_subscription_identifier }}' --required
AND region = '{{ region }}' --required
AND destinationArn = '{{ destinationArn }}' --required
RETURNING
id,
arn,
destination_arn,
resource_arn,
resource_id;

DELETE examples

Deletes the specified access log subscription.

DELETE FROM aws.vpc_lattice.access_log_subscriptions
WHERE access_log_subscription_identifier = '{{ access_log_subscription_identifier }}' --required
AND region = '{{ region }}' --required
;