access_log_subscriptions
Creates, updates, deletes, gets or lists an access_log_subscriptions resource.
Overview
| Name | access_log_subscriptions |
| Type | Resource |
| Id | aws.vpc_lattice.access_log_subscriptions |
Fields
The following fields are returned by SELECT queries:
- list_access_log_subscriptions
- get_access_log_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the access log subscription. (pattern: <code>als-[0-9a-z]{17}</code>) |
arn | string | The 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_at | string (date-time) | The date and time that the access log subscription was created, in ISO-8601 format. |
destination_arn | string | The 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_at | string (date-time) | The date and time that the access log subscription was last updated, in ISO-8601 format. |
resource_arn | string | The 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_id | string | The ID of the service or service network. (pattern: <code>((sn)|(svc))-[0-9a-z]{17}</code>) |
service_network_log_type | string | Log type of the service network. (SERVICE, RESOURCE) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the access log subscription. (pattern: <code>als-[0-9a-z]{17}</code>) |
arn | string | The 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_at | string (date-time) | The date and time that the access log subscription was created, in ISO-8601 format. |
destination_arn | string | The Amazon Resource Name (ARN) of the access log destination. (pattern: <code>arn(:[a-z0-9]+([.-][a-z0-9]+)){2}(:([a-z0-9]+([.-][a-z0-9]+))?){2}:([^/].*)?</code>) |
last_updated_at | string (date-time) | The date and time that the access log subscription was last updated, in ISO-8601 format. |
resource_arn | string | The Amazon Resource Name (ARN) of the service network or service. (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_id | string | The ID of the service network or service. (pattern: <code>((sn)|(svc))-[0-9a-z]{17}</code>) |
service_network_log_type | string | The log type for the service network. (SERVICE, RESOURCE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_access_log_subscriptions | select | resourceIdentifier, region | maxResults, nextToken | Lists the access log subscriptions for the specified service network or service. |
get_access_log_subscription | select | access_log_subscription_identifier, region | Retrieves information about the specified access log subscription. | |
create_access_log_subscription | insert | region, resourceIdentifier, destinationArn | 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. | |
update_access_log_subscription | update | access_log_subscription_identifier, region, destinationArn | Updates the specified access log subscription. | |
delete_access_log_subscription | delete | access_log_subscription_identifier, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
access_log_subscription_identifier | string | The ID or ARN of the access log subscription. |
region | string | AWS region (default: us-east-1) |
resourceIdentifier | string | The ID or ARN of the service network or service. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | A pagination token for the next page of results. |
SELECT examples
- list_access_log_subscriptions
- get_access_log_subscription
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 }}'
;
Retrieves information about the specified access log subscription.
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 access_log_subscription_identifier = '{{ access_log_subscription_identifier }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_access_log_subscription
- Manifest
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
;
# Description fields are for documentation purposes
- name: access_log_subscriptions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the access_log_subscriptions resource.
- name: clientToken
value: "{{ clientToken }}"
- name: resourceIdentifier
value: "{{ resourceIdentifier }}"
- name: destinationArn
value: "{{ destinationArn }}"
- name: serviceNetworkLogType
value: "{{ serviceNetworkLogType }}"
valid_values: ['SERVICE', 'RESOURCE']
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_access_log_subscription
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
- delete_access_log_subscription
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
;