AWS Classic
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/v5/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var yada = new LogGroup("yada");
var foo = new LogStream("foo", LogStreamArgs.builder()
.logGroupName(yada.name())
.build());
}
}
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});
resources:
yada:
type: aws:cloudwatch:LogGroup
foo:
type: aws:cloudwatch:LogStream
properties:
logGroupName: ${yada.name}
Create a LogStream Resource
new LogStream(name: string, args: LogStreamArgs, opts?: CustomResourceOptions);
@overload
def LogStream(resource_name: str,
opts: Optional[ResourceOptions] = None,
log_group_name: Optional[str] = None,
name: Optional[str] = None)
@overload
def LogStream(resource_name: str,
args: LogStreamArgs,
opts: Optional[ResourceOptions] = None)
func NewLogStream(ctx *Context, name string, args LogStreamArgs, opts ...ResourceOption) (*LogStream, error)
public LogStream(string name, LogStreamArgs args, CustomResourceOptions? opts = null)
public LogStream(String name, LogStreamArgs args)
public LogStream(String name, LogStreamArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogStream
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args LogStreamArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args LogStreamArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The LogStream resource accepts the following input properties:
- Log
Group stringName 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 stringName 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 StringName 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 stringName 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_ strname 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
:
- log
Group StringName 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
:
Outputs
All input properties are implicitly available as output properties. Additionally, the LogStream resource produces the following output properties:
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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
log_group_name: Optional[str] = None,
name: Optional[str] = None) -> LogStream
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)
public static LogStream get(String name, Output<String> id, LogStreamState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Arn string
The Amazon Resource Name (ARN) specifying the log stream.
- Log
Group stringName 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.
- Log
Group stringName 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.
- log
Group StringName 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.
- log
Group stringName 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_ strname 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
:
- arn String
The Amazon Resource Name (ARN) specifying the log stream.
- log
Group StringName 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
:
Import
Cloudwatch Log Stream can be imported using the stream’s log_group_name
and name
, e.g.,
$ pulumi import aws:cloudwatch/logStream:LogStream foo Yada:SampleLogStream1234
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.