1. Registry
  2. Packages
  3. Linode Provider
  4. API Docs
  5. getMonitorLogsStreamHistory
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi
linode logo linode logo
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi

    Provides the historical versions of a Linode Monitor Logs Stream. For more information, see the Linode APIv4 docs. (Note: v4beta only.)

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const example = linode.getMonitorLogsStreamHistory({
        streamId: 12345,
    });
    export const historyCount = example.then(example => example.streams).length;
    
    import pulumi
    import pulumi_linode as linode
    
    example = linode.get_monitor_logs_stream_history(stream_id=12345)
    pulumi.export("historyCount", len(example.streams))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := linode.GetMonitorLogsStreamHistory(ctx, &linode.GetMonitorLogsStreamHistoryArgs{
    			StreamId: 12345,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("historyCount", len(example.Streams))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Linode.GetMonitorLogsStreamHistory.Invoke(new()
        {
            StreamId = 12345,
        });
    
        return new Dictionary<string, object?>
        {
            ["historyCount"] = example.Apply(getMonitorLogsStreamHistoryResult => getMonitorLogsStreamHistoryResult.Streams).Length(),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetMonitorLogsStreamHistoryArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = LinodeFunctions.getMonitorLogsStreamHistory(GetMonitorLogsStreamHistoryArgs.builder()
                .streamId(12345)
                .build());
    
            ctx.export("historyCount", example.streams().size());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: linode:getMonitorLogsStreamHistory
          arguments:
            streamId: 12345
    outputs:
      historyCount:
        fn::length: ${example.streams}
    
    pulumi {
      required_providers {
        linode = {
          source = "pulumi/linode"
        }
      }
    }
    
    data "linode_getmonitorlogsstreamhistory" "example" {
      stream_id = 12345
    }
    
    output "historyCount" {
      value = length(data.linode_getmonitorlogsstreamhistory.example.streams)
    }
    

    Using getMonitorLogsStreamHistory

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMonitorLogsStreamHistory(args: GetMonitorLogsStreamHistoryArgs, opts?: InvokeOptions): Promise<GetMonitorLogsStreamHistoryResult>
    function getMonitorLogsStreamHistoryOutput(args: GetMonitorLogsStreamHistoryOutputArgs, opts?: InvokeOutputOptions): Output<GetMonitorLogsStreamHistoryResult>
    def get_monitor_logs_stream_history(stream_id: Optional[int] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetMonitorLogsStreamHistoryResult
    def get_monitor_logs_stream_history_output(stream_id: pulumi.Input[Optional[int]] = None,
                                        opts: Optional[InvokeOutputOptions] = None) -> Output[GetMonitorLogsStreamHistoryResult]
    func GetMonitorLogsStreamHistory(ctx *Context, args *GetMonitorLogsStreamHistoryArgs, opts ...InvokeOption) (*GetMonitorLogsStreamHistoryResult, error)
    func GetMonitorLogsStreamHistoryOutput(ctx *Context, args *GetMonitorLogsStreamHistoryOutputArgs, opts ...InvokeOption) GetMonitorLogsStreamHistoryResultOutput

    > Note: This function is named GetMonitorLogsStreamHistory in the Go SDK.

    public static class GetMonitorLogsStreamHistory 
    {
        public static Task<GetMonitorLogsStreamHistoryResult> InvokeAsync(GetMonitorLogsStreamHistoryArgs args, InvokeOptions? opts = null)
        public static Output<GetMonitorLogsStreamHistoryResult> Invoke(GetMonitorLogsStreamHistoryInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetMonitorLogsStreamHistoryResult> Invoke(GetMonitorLogsStreamHistoryInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetMonitorLogsStreamHistoryResult> getMonitorLogsStreamHistory(GetMonitorLogsStreamHistoryArgs args, InvokeOptions options)
    public static Output<GetMonitorLogsStreamHistoryResult> getMonitorLogsStreamHistory(GetMonitorLogsStreamHistoryArgs args, InvokeOptions options)
    public static Output<GetMonitorLogsStreamHistoryResult> getMonitorLogsStreamHistory(GetMonitorLogsStreamHistoryArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: linode:index/getMonitorLogsStreamHistory:getMonitorLogsStreamHistory
      arguments:
        # arguments dictionary
    data "linode_get_monitor_logs_stream_history" "name" {
        # arguments
    }

    The following arguments are supported:

    StreamId int
    The ID of the logs stream to retrieve history for.
    StreamId int
    The ID of the logs stream to retrieve history for.
    stream_id number
    The ID of the logs stream to retrieve history for.
    streamId Integer
    The ID of the logs stream to retrieve history for.
    streamId number
    The ID of the logs stream to retrieve history for.
    stream_id int
    The ID of the logs stream to retrieve history for.
    streamId Number
    The ID of the logs stream to retrieve history for.

    getMonitorLogsStreamHistory Result

    The following output properties are available:

    Id string
    The ID of the logs stream version.
    StreamId int
    Streams List<GetMonitorLogsStreamHistoryStream>
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:
    Id string
    The ID of the logs stream version.
    StreamId int
    Streams []GetMonitorLogsStreamHistoryStream
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:
    id string
    The ID of the logs stream version.
    stream_id number
    streams list(object)
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:
    id String
    The ID of the logs stream version.
    streamId Integer
    streams List<GetMonitorLogsStreamHistoryStream>
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:
    id string
    The ID of the logs stream version.
    streamId number
    streams GetMonitorLogsStreamHistoryStream[]
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:
    id str
    The ID of the logs stream version.
    stream_id int
    streams Sequence[GetMonitorLogsStreamHistoryStream]
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:
    id String
    The ID of the logs stream version.
    streamId Number
    streams List<Property Map>
    (Nested Attribute List) The historical versions of the logs stream. Each entry exports the following attributes:

    Supporting Types

    GetMonitorLogsStreamHistoryStream

    Created string
    The date and time when this version was created.
    CreatedBy string
    The user who created this stream version.
    Destinations List<int>
    The destination IDs configured at this version.
    Details GetMonitorLogsStreamHistoryStreamDetails
    Additional configuration details at this version.
    Id int
    The ID of the logs stream version.
    Label string
    The label of the logs stream at this version.
    Status string
    The status of the logs stream at this version.
    Type string
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    Updated string
    The date and time when this version was last updated.
    UpdatedBy string
    The user who last updated this stream version.
    Version int
    The version number of this history entry.
    Created string
    The date and time when this version was created.
    CreatedBy string
    The user who created this stream version.
    Destinations []int
    The destination IDs configured at this version.
    Details GetMonitorLogsStreamHistoryStreamDetails
    Additional configuration details at this version.
    Id int
    The ID of the logs stream version.
    Label string
    The label of the logs stream at this version.
    Status string
    The status of the logs stream at this version.
    Type string
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    Updated string
    The date and time when this version was last updated.
    UpdatedBy string
    The user who last updated this stream version.
    Version int
    The version number of this history entry.
    created string
    The date and time when this version was created.
    created_by string
    The user who created this stream version.
    destinations list(number)
    The destination IDs configured at this version.
    details object
    Additional configuration details at this version.
    id number
    The ID of the logs stream version.
    label string
    The label of the logs stream at this version.
    status string
    The status of the logs stream at this version.
    type string
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    updated string
    The date and time when this version was last updated.
    updated_by string
    The user who last updated this stream version.
    version number
    The version number of this history entry.
    created String
    The date and time when this version was created.
    createdBy String
    The user who created this stream version.
    destinations List<Integer>
    The destination IDs configured at this version.
    details GetMonitorLogsStreamHistoryStreamDetails
    Additional configuration details at this version.
    id Integer
    The ID of the logs stream version.
    label String
    The label of the logs stream at this version.
    status String
    The status of the logs stream at this version.
    type String
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    updated String
    The date and time when this version was last updated.
    updatedBy String
    The user who last updated this stream version.
    version Integer
    The version number of this history entry.
    created string
    The date and time when this version was created.
    createdBy string
    The user who created this stream version.
    destinations number[]
    The destination IDs configured at this version.
    details GetMonitorLogsStreamHistoryStreamDetails
    Additional configuration details at this version.
    id number
    The ID of the logs stream version.
    label string
    The label of the logs stream at this version.
    status string
    The status of the logs stream at this version.
    type string
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    updated string
    The date and time when this version was last updated.
    updatedBy string
    The user who last updated this stream version.
    version number
    The version number of this history entry.
    created str
    The date and time when this version was created.
    created_by str
    The user who created this stream version.
    destinations Sequence[int]
    The destination IDs configured at this version.
    details GetMonitorLogsStreamHistoryStreamDetails
    Additional configuration details at this version.
    id int
    The ID of the logs stream version.
    label str
    The label of the logs stream at this version.
    status str
    The status of the logs stream at this version.
    type str
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    updated str
    The date and time when this version was last updated.
    updated_by str
    The user who last updated this stream version.
    version int
    The version number of this history entry.
    created String
    The date and time when this version was created.
    createdBy String
    The user who created this stream version.
    destinations List<Number>
    The destination IDs configured at this version.
    details Property Map
    Additional configuration details at this version.
    id Number
    The ID of the logs stream version.
    label String
    The label of the logs stream at this version.
    status String
    The status of the logs stream at this version.
    type String
    The type of the logs stream at this version. One of: auditLogs, lkeAuditLogs.
    updated String
    The date and time when this version was last updated.
    updatedBy String
    The user who last updated this stream version.
    version Number
    The version number of this history entry.

    GetMonitorLogsStreamHistoryStreamDetails

    ClusterIds List<int>
    The LKE cluster IDs included in this stream version.
    IsAutoAddAllClustersEnabled bool
    Whether all clusters were auto-added at this version.
    ClusterIds []int
    The LKE cluster IDs included in this stream version.
    IsAutoAddAllClustersEnabled bool
    Whether all clusters were auto-added at this version.
    cluster_ids list(number)
    The LKE cluster IDs included in this stream version.
    is_auto_add_all_clusters_enabled bool
    Whether all clusters were auto-added at this version.
    clusterIds List<Integer>
    The LKE cluster IDs included in this stream version.
    isAutoAddAllClustersEnabled Boolean
    Whether all clusters were auto-added at this version.
    clusterIds number[]
    The LKE cluster IDs included in this stream version.
    isAutoAddAllClustersEnabled boolean
    Whether all clusters were auto-added at this version.
    cluster_ids Sequence[int]
    The LKE cluster IDs included in this stream version.
    is_auto_add_all_clusters_enabled bool
    Whether all clusters were auto-added at this version.
    clusterIds List<Number>
    The LKE cluster IDs included in this stream version.
    isAutoAddAllClustersEnabled Boolean
    Whether all clusters were auto-added at this version.

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo linode logo
    Viewing docs for Linode v6.6.0
    published on Tuesday, Sep 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial