LogStream

Provides a CloudWatch Log Stream resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var yada = new Aws.CloudWatch.LogGroup("yada", new Aws.CloudWatch.LogGroupArgs
        {
        });
        var foo = new Aws.CloudWatch.LogStream("foo", new Aws.CloudWatch.LogStreamArgs
        {
            LogGroupName = yada.Name,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cloudwatch"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        yada, err := cloudwatch.NewLogGroup(ctx, "yada", nil)
        if err != nil {
            return err
        }
        _, err = cloudwatch.NewLogStream(ctx, "foo", &cloudwatch.LogStreamArgs{
            LogGroupName: yada.Name,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

yada = aws.cloudwatch.LogGroup("yada")
foo = aws.cloudwatch.LogStream("foo", log_group_name=yada.name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const yada = new aws.cloudwatch.LogGroup("yada", {});
const foo = new aws.cloudwatch.LogStream("foo", {
    logGroupName: yada.name,
});

Create a LogStream Resource

def LogStream(resource_name, opts=None, log_group_name=None, name=None, __props__=None);
func NewLogStream(ctx *Context, name string, args LogStreamArgs, opts ...ResourceOption) (*LogStream, error)
public LogStream(string name, LogStreamArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LogStreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LogStreamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LogStreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LogStream Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LogStream resource accepts the following input properties:

LogGroupName string

The name of the log group under which the log stream is to be created.

Name string

The name of the log stream. Must not be longer than 512 characters and must not contain :

LogGroupName string

The name of the log group under which the log stream is to be created.

Name string

The name of the log stream. Must not be longer than 512 characters and must not contain :

logGroupName string

The name of the log group under which the log stream is to be created.

name string

The name of the log stream. Must not be longer than 512 characters and must not contain :

log_group_name str

The name of the log group under which the log stream is to be created.

name str

The name of the log stream. Must not be longer than 512 characters and must not contain :

Outputs

All input properties are implicitly available as output properties. Additionally, the LogStream resource produces the following output properties:

Arn string

The Amazon Resource Name (ARN) specifying the log stream.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The Amazon Resource Name (ARN) specifying the log stream.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The Amazon Resource Name (ARN) specifying the log stream.

id string
The provider-assigned unique ID for this managed resource.
arn str

The Amazon Resource Name (ARN) specifying the log stream.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing LogStream Resource

Get an existing LogStream resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LogStreamState, opts?: CustomResourceOptions): LogStream
static get(resource_name, id, opts=None, arn=None, log_group_name=None, name=None, __props__=None);
func GetLogStream(ctx *Context, name string, id IDInput, state *LogStreamState, opts ...ResourceOption) (*LogStream, error)
public static LogStream Get(string name, Input<string> id, LogStreamState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The Amazon Resource Name (ARN) specifying the log stream.

LogGroupName string

The name of the log group under which the log stream is to be created.

Name string

The name of the log stream. Must not be longer than 512 characters and must not contain :

Arn string

The Amazon Resource Name (ARN) specifying the log stream.

LogGroupName string

The name of the log group under which the log stream is to be created.

Name string

The name of the log stream. Must not be longer than 512 characters and must not contain :

arn string

The Amazon Resource Name (ARN) specifying the log stream.

logGroupName string

The name of the log group under which the log stream is to be created.

name string

The name of the log stream. Must not be longer than 512 characters and must not contain :

arn str

The Amazon Resource Name (ARN) specifying the log stream.

log_group_name str

The name of the log group under which the log stream is to be created.

name str

The name of the log stream. Must not be longer than 512 characters and must not contain :

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.