1. Packages
  2. Vercel
  3. API Docs
  4. getLogDrain
Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse

vercel.getLogDrain

Explore with Pulumi AI

vercel logo
Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse

    Provides information about an existing Log Drain.

    Log Drains collect all of your logs using a service specializing in storing app logs.

    Teams on Pro and Enterprise plans can subscribe to log drains that are generic and configurable from the Vercel dashboard without creating an integration. This allows you to use a HTTP service to receive logs through Vercel’s log drains.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumi/vercel";
    
    const example = vercel.getLogDrain({
        id: "lg_xxxxxxx_xxxxxx_xxxxx",
    });
    
    import pulumi
    import pulumi_vercel as vercel
    
    example = vercel.get_log_drain(id="lg_xxxxxxx_xxxxxx_xxxxx")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vercel.LookupLogDrain(ctx, &vercel.LookupLogDrainArgs{
    			Id: "lg_xxxxxxx_xxxxxx_xxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumi.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Vercel.GetLogDrain.Invoke(new()
        {
            Id = "lg_xxxxxxx_xxxxxx_xxxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.VercelFunctions;
    import com.pulumi.vercel.inputs.GetLogDrainArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 = VercelFunctions.getLogDrain(GetLogDrainArgs.builder()
                .id("lg_xxxxxxx_xxxxxx_xxxxx")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: vercel:getLogDrain
          Arguments:
            id: lg_xxxxxxx_xxxxxx_xxxxx
    

    Using getLogDrain

    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 getLogDrain(args: GetLogDrainArgs, opts?: InvokeOptions): Promise<GetLogDrainResult>
    function getLogDrainOutput(args: GetLogDrainOutputArgs, opts?: InvokeOptions): Output<GetLogDrainResult>
    def get_log_drain(endpoint: Optional[str] = None,
                      id: Optional[str] = None,
                      team_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetLogDrainResult
    def get_log_drain_output(endpoint: Optional[pulumi.Input[str]] = None,
                      id: Optional[pulumi.Input[str]] = None,
                      team_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetLogDrainResult]
    func LookupLogDrain(ctx *Context, args *LookupLogDrainArgs, opts ...InvokeOption) (*LookupLogDrainResult, error)
    func LookupLogDrainOutput(ctx *Context, args *LookupLogDrainOutputArgs, opts ...InvokeOption) LookupLogDrainResultOutput

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

    public static class GetLogDrain 
    {
        public static Task<GetLogDrainResult> InvokeAsync(GetLogDrainArgs args, InvokeOptions? opts = null)
        public static Output<GetLogDrainResult> Invoke(GetLogDrainInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLogDrainResult> getLogDrain(GetLogDrainArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vercel:index/getLogDrain:getLogDrain
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Id string
    The ID of the Log Drain.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Id string
    The ID of the Log Drain.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    id String
    The ID of the Log Drain.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    id string
    The ID of the Log Drain.
    teamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    endpoint str
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    id str
    The ID of the Log Drain.
    team_id str
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    id String
    The ID of the Log Drain.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.

    getLogDrain Result

    The following output properties are available:

    DeliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Environments List<string>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    Headers Dictionary<string, string>
    Custom headers to include in requests to the log drain endpoint.
    Id string
    The ID of the Log Drain.
    ProjectIds List<string>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    SamplingRate double
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent.
    Sources List<string>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and function.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    DeliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    Endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    Environments []string
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    Headers map[string]string
    Custom headers to include in requests to the log drain endpoint.
    Id string
    The ID of the Log Drain.
    ProjectIds []string
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    SamplingRate float64
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent.
    Sources []string
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and function.
    TeamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The format log data should be delivered in. Can be json or ndjson.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments List<String>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers Map<String,String>
    Custom headers to include in requests to the log drain endpoint.
    id String
    The ID of the Log Drain.
    projectIds List<String>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate Double
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and function.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat string
    The format log data should be delivered in. Can be json or ndjson.
    endpoint string
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments string[]
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers {[key: string]: string}
    Custom headers to include in requests to the log drain endpoint.
    id string
    The ID of the Log Drain.
    projectIds string[]
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent.
    sources string[]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and function.
    teamId string
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    delivery_format str
    The format log data should be delivered in. Can be json or ndjson.
    endpoint str
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments Sequence[str]
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers Mapping[str, str]
    Custom headers to include in requests to the log drain endpoint.
    id str
    The ID of the Log Drain.
    project_ids Sequence[str]
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    sampling_rate float
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent.
    sources Sequence[str]
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and function.
    team_id str
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.
    deliveryFormat String
    The format log data should be delivered in. Can be json or ndjson.
    endpoint String
    Logs will be sent as POST requests to this URL. The endpoint will be verified, and must return a 200 status code and an x-vercel-verify header taken from the endpoint_verification data source. The value the x-vercel-verify header should be can be read from the vercel_endpoint_verification_code data source.
    environments List<String>
    Logs from the selected environments will be forwarded to your webhook. At least one must be present.
    headers Map<String>
    Custom headers to include in requests to the log drain endpoint.
    id String
    The ID of the Log Drain.
    projectIds List<String>
    A list of project IDs that the log drain should be associated with. Logs from these projects will be sent log events to the specified endpoint. If omitted, logs will be sent for all projects.
    samplingRate Number
    A ratio of logs matching the sampling rate will be sent to your log drain. Should be a value between 0 and 1. If unspecified, all logs are sent.
    sources List<String>
    A set of sources that the log drain should send logs for. Valid values are static, edge, external, build and function.
    teamId String
    The ID of the team the Log Drain should exist under. Required when configuring a team resource if a default team has not been set in the provider.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Vercel v1.11.0 published on Thursday, May 23, 2024 by Pulumiverse