vercel.LogDrain
Explore with Pulumi AI
Create LogDrain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogDrain(name: string, args: LogDrainArgs, opts?: CustomResourceOptions);
@overload
def LogDrain(resource_name: str,
args: LogDrainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogDrain(resource_name: str,
opts: Optional[ResourceOptions] = None,
delivery_format: Optional[str] = None,
endpoint: Optional[str] = None,
environments: Optional[Sequence[str]] = None,
sources: Optional[Sequence[str]] = None,
headers: Optional[Mapping[str, str]] = None,
project_ids: Optional[Sequence[str]] = None,
sampling_rate: Optional[float] = None,
secret: Optional[str] = None,
team_id: Optional[str] = None)
func NewLogDrain(ctx *Context, name string, args LogDrainArgs, opts ...ResourceOption) (*LogDrain, error)
public LogDrain(string name, LogDrainArgs args, CustomResourceOptions? opts = null)
public LogDrain(String name, LogDrainArgs args)
public LogDrain(String name, LogDrainArgs args, CustomResourceOptions options)
type: vercel:LogDrain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LogDrainArgs
- 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 LogDrainArgs
- 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 LogDrainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogDrainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogDrainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var logDrainResource = new Vercel.LogDrain("logDrainResource", new()
{
DeliveryFormat = "string",
Endpoint = "string",
Environments = new[]
{
"string",
},
Sources = new[]
{
"string",
},
Headers =
{
{ "string", "string" },
},
ProjectIds = new[]
{
"string",
},
SamplingRate = 0,
Secret = "string",
TeamId = "string",
});
example, err := vercel.NewLogDrain(ctx, "logDrainResource", &vercel.LogDrainArgs{
DeliveryFormat: pulumi.String("string"),
Endpoint: pulumi.String("string"),
Environments: pulumi.StringArray{
pulumi.String("string"),
},
Sources: pulumi.StringArray{
pulumi.String("string"),
},
Headers: pulumi.StringMap{
"string": pulumi.String("string"),
},
ProjectIds: pulumi.StringArray{
pulumi.String("string"),
},
SamplingRate: pulumi.Float64(0),
Secret: pulumi.String("string"),
TeamId: pulumi.String("string"),
})
var logDrainResource = new LogDrain("logDrainResource", LogDrainArgs.builder()
.deliveryFormat("string")
.endpoint("string")
.environments("string")
.sources("string")
.headers(Map.of("string", "string"))
.projectIds("string")
.samplingRate(0.0)
.secret("string")
.teamId("string")
.build());
log_drain_resource = vercel.LogDrain("logDrainResource",
delivery_format="string",
endpoint="string",
environments=["string"],
sources=["string"],
headers={
"string": "string",
},
project_ids=["string"],
sampling_rate=0,
secret="string",
team_id="string")
const logDrainResource = new vercel.LogDrain("logDrainResource", {
deliveryFormat: "string",
endpoint: "string",
environments: ["string"],
sources: ["string"],
headers: {
string: "string",
},
projectIds: ["string"],
samplingRate: 0,
secret: "string",
teamId: "string",
});
type: vercel:LogDrain
properties:
deliveryFormat: string
endpoint: string
environments:
- string
headers:
string: string
projectIds:
- string
samplingRate: 0
secret: string
sources:
- string
teamId: string
LogDrain Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LogDrain resource accepts the following input properties:
- Delivery
Format string - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- Sources List<string>
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - Headers Dictionary<string, string>
- Custom headers to include in requests to the log drain endpoint.
- Project
Ids 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.
- Sampling
Rate 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.
- Secret string
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- Team
Id 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 string - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_endpoint_verification_code
data source. - Environments []string
- Logs from the selected environments will be forwarded to your webhook. At least one must be present.
- Sources []string
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - Headers map[string]string
- Custom headers to include in requests to the log drain endpoint.
- Project
Ids []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.
- Sampling
Rate 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.
- Secret string
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- Team
Id 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 String - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- sources List<String>
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - headers Map<String,String>
- Custom headers to include in requests to the log drain endpoint.
- project
Ids 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.
- sampling
Rate 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.
- secret String
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- team
Id 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 string - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_endpoint_verification_code
data source. - environments string[]
- Logs from the selected environments will be forwarded to your webhook. At least one must be present.
- sources string[]
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - headers {[key: string]: string}
- Custom headers to include in requests to the log drain endpoint.
- project
Ids 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.
- sampling
Rate 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.
- secret string
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- team
Id 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
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- sources Sequence[str]
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - headers Mapping[str, str]
- Custom headers to include in requests to the log drain endpoint.
- 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.
- secret str
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- 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.
- delivery
Format String - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- sources List<String>
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - headers Map<String>
- Custom headers to include in requests to the log drain endpoint.
- project
Ids 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.
- sampling
Rate 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.
- secret String
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- team
Id 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogDrain resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing LogDrain Resource
Get an existing LogDrain 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?: LogDrainState, opts?: CustomResourceOptions): LogDrain
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
delivery_format: Optional[str] = None,
endpoint: Optional[str] = None,
environments: Optional[Sequence[str]] = None,
headers: Optional[Mapping[str, str]] = None,
project_ids: Optional[Sequence[str]] = None,
sampling_rate: Optional[float] = None,
secret: Optional[str] = None,
sources: Optional[Sequence[str]] = None,
team_id: Optional[str] = None) -> LogDrain
func GetLogDrain(ctx *Context, name string, id IDInput, state *LogDrainState, opts ...ResourceOption) (*LogDrain, error)
public static LogDrain Get(string name, Input<string> id, LogDrainState? state, CustomResourceOptions? opts = null)
public static LogDrain get(String name, Output<String> id, LogDrainState state, CustomResourceOptions options)
resources: _: type: vercel:LogDrain get: id: ${id}
- 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.
- Delivery
Format string - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- Project
Ids 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.
- Sampling
Rate 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.
- Secret string
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- Sources List<string>
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - Team
Id 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 string - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- Project
Ids []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.
- Sampling
Rate 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.
- Secret string
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- Sources []string
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - Team
Id 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 String - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- project
Ids 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.
- sampling
Rate 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.
- secret String
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- sources List<String>
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - team
Id 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 string - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- project
Ids 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.
- sampling
Rate 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.
- secret string
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- sources string[]
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - team
Id 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
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- 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.
- secret str
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- sources Sequence[str]
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - 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.
- delivery
Format String - The format log data should be delivered in. Can be
json
orndjson
. - 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 anx-vercel-verify
header taken from the endpoint_verification data source. The value thex-vercel-verify
header should be can be read from thevercel_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.
- project
Ids 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.
- sampling
Rate 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.
- secret String
- A custom secret to be used for signing log events. You can use this secret to verify that log events are coming from Vercel and are not tampered with. See https://vercel.com/docs/observability/log-drains/log-drains-reference#secure-log-drains for full info.
- sources List<String>
- A set of sources that the log drain should send logs for. Valid values are
static
,edge
,external
,build
andlambda
. - team
Id 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.