Skip to main content

access_log_subscriptions

Creates, updates, deletes or gets an access_log_subscription resource or lists access_log_subscriptions in a region

Overview

Nameaccess_log_subscriptions
TypeResource
DescriptionEnables 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 will 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.
Idaws.vpclattice.access_log_subscriptions

Fields

NameDatatypeDescription
arnstring
destination_arnstring
idstring
resource_arnstring
resource_idstring
resource_identifierstring
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTDestinationArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all access_log_subscriptions in a region.

SELECT
region,
arn,
destination_arn,
id,
resource_arn,
resource_id,
resource_identifier,
tags
FROM aws.vpclattice.access_log_subscriptions
WHERE region = 'us-east-1';

Gets all properties from an individual access_log_subscription.

SELECT
region,
arn,
destination_arn,
id,
resource_arn,
resource_id,
resource_identifier,
tags
FROM aws.vpclattice.access_log_subscriptions
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new access_log_subscription resource, using stack-deploy.

/*+ create */
INSERT INTO aws.vpclattice.access_log_subscriptions (
DestinationArn,
region
)
SELECT
'{{ DestinationArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.vpclattice.access_log_subscriptions
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the access_log_subscriptions resource, the following permissions are required:

Create

vpc-lattice:CreateAccessLogSubscription,
vpc-lattice:TagResource,
vpc-lattice:GetAccessLogSubscription,
vpc-lattice:ListTagsForResource,
logs:CreateLogDelivery,
logs:CreateLogStream,
logs:PutDestination,
logs:PutDestinationPolicy,
logs:PutResourcePolicy,
logs:DescribeResourcePolicies,
logs:DescribeLogGroups,
logs:GetLogDelivery,
s3:PutBucketLogging,
s3:GetBucketLogging,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
firehose:TagDeliveryStream,
firehose:CreateDeliveryStream,
firehose:DescribeDeliveryStream,
iam:CreateServiceLinkedRole

Read

vpc-lattice:GetAccessLogSubscription,
vpc-lattice:ListTagsForResource,
logs:GetLogDelivery

Update

vpc-lattice:GetAccessLogSubscription,
vpc-lattice:UpdateAccessLogSubscription,
vpc-lattice:TagResource,
vpc-lattice:UntagResource,
logs:UpdateLogDelivery,
firehose:UpdateDestination,
logs:CreateLogDelivery,
logs:CreateLogStream,
logs:PutDestination,
logs:PutDestinationPolicy,
logs:PutResourcePolicy,
logs:DescribeResourcePolicies,
logs:DescribeLogGroups,
logs:GetLogDelivery,
s3:PutBucketLogging,
s3:GetBucketLogging,
s3:GetBucketPolicy,
s3:PutBucketPolicy,
firehose:TagDeliveryStream,
firehose:CreateDeliveryStream,
firehose:DescribeDeliveryStream

Delete

vpc-lattice:DeleteAccessLogSubscription,
vpc-lattice:UntagResource,
logs:DeleteLogDelivery,
logs:DeleteLogStream,
logs:GetLogDelivery,
logs:DeleteDestination,
s3:PutBucketLogging,
iam:GetServiceLinkedRoleDeletionStatus,
iam:DeleteServiceLinkedRole,
firehose:DeleteDeliveryStream,
firehose:UntagDeliveryStream

List

vpc-lattice:ListAccessLogSubscriptions