access_log_subscriptions
Creates, updates, deletes or gets an access_log_subscription resource or lists access_log_subscriptions in a region
Overview
| Name | access_log_subscriptions |
| Type | Resource |
| Description | 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 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. |
| Id | awscc.vpclattice.access_log_subscriptions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
destination_arn | string | |
id | string | |
resource_arn | string | |
resource_id | string | |
resource_identifier | string | |
service_network_log_type | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::VpcLattice::AccessLogSubscription.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | access_log_subscriptions | INSERT | DestinationArn, region |
delete_resource | access_log_subscriptions | DELETE | Identifier, region |
update_resource | access_log_subscriptions | UPDATE | Identifier, PatchDocument, region |
list_resources | access_log_subscriptions_list_only | SELECT | region |
get_resource | access_log_subscriptions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual access_log_subscription.
SELECT
region,
arn,
destination_arn,
id,
resource_arn,
resource_id,
resource_identifier,
service_network_log_type,
tags
FROM awscc.vpclattice.access_log_subscriptions
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all access_log_subscriptions in a region.
SELECT
region,
arn
FROM awscc.vpclattice.access_log_subscriptions_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new access_log_subscription resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.vpclattice.access_log_subscriptions (
DestinationArn,
region
)
SELECT
'{{ destination_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.vpclattice.access_log_subscriptions (
DestinationArn,
ResourceIdentifier,
ServiceNetworkLogType,
Tags,
region
)
SELECT
'{{ destination_arn }}',
'{{ resource_identifier }}',
'{{ service_network_log_type }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: access_log_subscription
props:
- name: destination_arn
value: '{{ destination_arn }}'
- name: resource_identifier
value: '{{ resource_identifier }}'
- name: service_network_log_type
value: '{{ service_network_log_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a access_log_subscription resource, using stack-deploy.
/*+ update */
UPDATE awscc.vpclattice.access_log_subscriptions
SET PatchDocument = string('{{ {
"DestinationArn": destination_arn,
"ServiceNetworkLogType": service_network_log_type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.vpclattice.access_log_subscriptions
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the access_log_subscriptions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
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
vpc-lattice:GetAccessLogSubscription,
vpc-lattice:ListTagsForResource,
logs:GetLogDelivery
vpc-lattice:GetAccessLogSubscription,
vpc-lattice:UpdateAccessLogSubscription,
vpc-lattice:ListTagsForResource,
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
vpc-lattice:DeleteAccessLogSubscription,
vpc-lattice:UntagResource,
logs:DeleteLogDelivery,
logs:DeleteLogStream,
logs:GetLogDelivery,
logs:DeleteDestination,
s3:PutBucketLogging,
iam:GetServiceLinkedRoleDeletionStatus,
iam:DeleteServiceLinkedRole,
firehose:DeleteDeliveryStream,
firehose:UntagDeliveryStream
vpc-lattice:ListAccessLogSubscriptions,
logs:GetLogDelivery