published on Tuesday, May 26, 2026 by Pulumi
published on Tuesday, May 26, 2026 by Pulumi
Manages the destination of data sent to PutTraceSegments by AWS X-Ray.
Note: Removing this resource from Terraform has no effect on the destination configuration within AWS X-Ray.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.xray.TraceSegmentDestination("example", {destination: "CloudWatchLogs"});
import pulumi
import pulumi_aws as aws
example = aws.xray.TraceSegmentDestination("example", destination="CloudWatchLogs")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/xray"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := xray.NewTraceSegmentDestination(ctx, "example", &xray.TraceSegmentDestinationArgs{
Destination: pulumi.String("CloudWatchLogs"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Xray.TraceSegmentDestination("example", new()
{
Destination = "CloudWatchLogs",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.xray.TraceSegmentDestination;
import com.pulumi.aws.xray.TraceSegmentDestinationArgs;
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) {
var example = new TraceSegmentDestination("example", TraceSegmentDestinationArgs.builder()
.destination("CloudWatchLogs")
.build());
}
}
resources:
example:
type: aws:xray:TraceSegmentDestination
properties:
destination: CloudWatchLogs
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_xray_tracesegmentdestination" "example" {
destination = "CloudWatchLogs"
}
Create TraceSegmentDestination Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TraceSegmentDestination(name: string, args: TraceSegmentDestinationArgs, opts?: CustomResourceOptions);@overload
def TraceSegmentDestination(resource_name: str,
args: TraceSegmentDestinationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TraceSegmentDestination(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[TraceSegmentDestinationTimeoutsArgs] = None)func NewTraceSegmentDestination(ctx *Context, name string, args TraceSegmentDestinationArgs, opts ...ResourceOption) (*TraceSegmentDestination, error)public TraceSegmentDestination(string name, TraceSegmentDestinationArgs args, CustomResourceOptions? opts = null)
public TraceSegmentDestination(String name, TraceSegmentDestinationArgs args)
public TraceSegmentDestination(String name, TraceSegmentDestinationArgs args, CustomResourceOptions options)
type: aws:xray:TraceSegmentDestination
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_xray_tracesegmentdestination" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args TraceSegmentDestinationArgs
- 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 TraceSegmentDestinationArgs
- 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 TraceSegmentDestinationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TraceSegmentDestinationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TraceSegmentDestinationArgs
- 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 traceSegmentDestinationResource = new Aws.Xray.TraceSegmentDestination("traceSegmentDestinationResource", new()
{
Destination = "string",
Region = "string",
Timeouts = new Aws.Xray.Inputs.TraceSegmentDestinationTimeoutsArgs
{
Create = "string",
Update = "string",
},
});
example, err := xray.NewTraceSegmentDestination(ctx, "traceSegmentDestinationResource", &xray.TraceSegmentDestinationArgs{
Destination: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &xray.TraceSegmentDestinationTimeoutsArgs{
Create: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
resource "aws_xray_tracesegmentdestination" "traceSegmentDestinationResource" {
destination = "string"
region = "string"
timeouts = {
create = "string"
update = "string"
}
}
var traceSegmentDestinationResource = new TraceSegmentDestination("traceSegmentDestinationResource", TraceSegmentDestinationArgs.builder()
.destination("string")
.region("string")
.timeouts(TraceSegmentDestinationTimeoutsArgs.builder()
.create("string")
.update("string")
.build())
.build());
trace_segment_destination_resource = aws.xray.TraceSegmentDestination("traceSegmentDestinationResource",
destination="string",
region="string",
timeouts={
"create": "string",
"update": "string",
})
const traceSegmentDestinationResource = new aws.xray.TraceSegmentDestination("traceSegmentDestinationResource", {
destination: "string",
region: "string",
timeouts: {
create: "string",
update: "string",
},
});
type: aws:xray:TraceSegmentDestination
properties:
destination: string
region: string
timeouts:
create: string
update: string
TraceSegmentDestination 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 TraceSegmentDestination resource accepts the following input properties:
- Destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Trace
Segment Destination Timeouts
- Destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Trace
Segment Destination Timeouts Args
- destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts object
- destination String
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Trace
Segment Destination Timeouts
- destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Trace
Segment Destination Timeouts
- destination str
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Trace
Segment Destination Timeouts Args
- destination String
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the TraceSegmentDestination 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 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 TraceSegmentDestination Resource
Get an existing TraceSegmentDestination 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?: TraceSegmentDestinationState, opts?: CustomResourceOptions): TraceSegmentDestination@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
destination: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[TraceSegmentDestinationTimeoutsArgs] = None) -> TraceSegmentDestinationfunc GetTraceSegmentDestination(ctx *Context, name string, id IDInput, state *TraceSegmentDestinationState, opts ...ResourceOption) (*TraceSegmentDestination, error)public static TraceSegmentDestination Get(string name, Input<string> id, TraceSegmentDestinationState? state, CustomResourceOptions? opts = null)public static TraceSegmentDestination get(String name, Output<String> id, TraceSegmentDestinationState state, CustomResourceOptions options)resources: _: type: aws:xray:TraceSegmentDestination get: id: ${id}import {
to = aws_xray_tracesegmentdestination.example
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.
- Destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Trace
Segment Destination Timeouts
- Destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Timeouts
Trace
Segment Destination Timeouts Args
- destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts object
- destination String
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Trace
Segment Destination Timeouts
- destination string
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Trace
Segment Destination Timeouts
- destination str
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts
Trace
Segment Destination Timeouts Args
- destination String
- Destination of trace segments. Valid values:
XRay,CloudWatchLogs. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- timeouts Property Map
Supporting Types
TraceSegmentDestinationTimeouts, TraceSegmentDestinationTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Identity Schema
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import XRay Trace Segment Destinations using the region name. For example:
$ pulumi import aws:xray/traceSegmentDestination:TraceSegmentDestination example us-west-2
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, May 26, 2026 by Pulumi