Skip to main content

log_streams

Creates, updates, deletes or gets a log_stream resource or lists log_streams in a region

Overview

Namelog_streams
TypeResource
DescriptionResource Type definition for AWS::Logs::LogStream
Idaws.logs.log_streams

Fields

NameDatatypeDescription
log_stream_namestringThe name of the log stream. The name must be unique wihtin the log group.
log_group_namestringThe name of the log group where the log stream is created.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTLogGroupName, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all log_streams in a region.

SELECT
region,
log_stream_name,
log_group_name
FROM aws.logs.log_streams
WHERE region = 'us-east-1';

Gets all properties from an individual log_stream.

SELECT
region,
log_stream_name,
log_group_name
FROM aws.logs.log_streams
WHERE region = 'us-east-1' AND data__Identifier = '<LogGroupName>|<LogStreamName>';

INSERT example

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

/*+ create */
INSERT INTO aws.logs.log_streams (
LogGroupName,
region
)
SELECT
'{{ LogGroupName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.logs.log_streams
WHERE data__Identifier = '<LogGroupName|LogStreamName>'
AND region = 'us-east-1';

Permissions

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

Read

logs:DescribeLogStreams

Create

logs:CreateLogStream,
logs:DescribeLogStreams

List

logs:DescribeLogStreams

Delete

logs:DeleteLogStream