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 = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all access_log_subscriptions in a region.
SELECT
region,
arn
FROM awscc.vpclattice.access_log_subscriptions_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.vpclattice.access_log_subscriptions (
DestinationArn,
ResourceIdentifier,
ServiceNetworkLogType,
Tags,
region
)
SELECT
'{{ destination_arn }}',
'{{ resource_identifier }}',
'{{ service_network_log_type }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.vpclattice.access_log_subscriptions
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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