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.
Idawscc.vpclattice.access_log_subscriptions

Fields

NameDatatypeDescription
arnstring
destination_arnstring
idstring
resource_arnstring
resource_idstring
resource_identifierstring
service_network_log_typestring
tagsarray
regionstringAWS region.

For more information, see AWS::VpcLattice::AccessLogSubscription.

Methods

NameResourceAccessible byRequired Params
create_resourceaccess_log_subscriptionsINSERTDestinationArn, region
delete_resourceaccess_log_subscriptionsDELETEIdentifier, region
update_resourceaccess_log_subscriptionsUPDATEIdentifier, PatchDocument, region
list_resourcesaccess_log_subscriptions_list_onlySELECTregion
get_resourceaccess_log_subscriptionsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

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

/*+ 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
;

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:

ParameterDescription
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:

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