published on Tuesday, Jun 9, 2026 by Pulumiverse
published on Tuesday, Jun 9, 2026 by Pulumiverse
Dynatrace SaaS only
To utilize this resource with access to all segments, please define the environment variables
DT_CLIENT_ID,DT_CLIENT_SECRET,DT_ACCOUNT_IDwith an OAuth client including the following permissions: View Filter-Segments (storage:filter-segments:read), Create and Update Filter-Segments (storage:filter-segments:write), Share Filter-Segments (storage:filter-segments:share), Delete Filter-Segments (storage:filter-segments:delete) and Maintain all Filter-Segments on the environment (storage:filter-segments:admin).
Depending on the segment configuration, additional storage permissions may be required for DQL-related access (e.g.
storage:bizevents:read,storage:logs:read,storage:entities:read).
This resource is excluded by default in the export utility, please explicitly specify the resource to retrieve existing configuration.
The
includes.items[X].filterattribute, which is a JSON string, is unfriendly for configuration as code. The structure of that attribute is not publicly documented and therefore subject to change without warning. The resource schema has been created to match our REST API, but we will be reaching out to product management on further enhancement of this endpoint. In the meantime, please use the export utility to create configurations more efficiently.
Dynatrace Documentation
Segments - https://docs.dynatrace.com/docs/manage/segments
Grail Storage Filter-Segments (API) - https://########.apps.dynatrace.com/platform/swagger-ui/index.html?urls.primaryName=Grail+-+Filter+Segments
Create Segment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Segment(name: string, args: SegmentArgs, opts?: CustomResourceOptions);@overload
def Segment(resource_name: str,
args: SegmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Segment(resource_name: str,
opts: Optional[ResourceOptions] = None,
is_public: Optional[bool] = None,
description: Optional[str] = None,
includes: Optional[SegmentIncludesArgs] = None,
name: Optional[str] = None,
variables: Optional[SegmentVariablesArgs] = None)func NewSegment(ctx *Context, name string, args SegmentArgs, opts ...ResourceOption) (*Segment, error)public Segment(string name, SegmentArgs args, CustomResourceOptions? opts = null)
public Segment(String name, SegmentArgs args)
public Segment(String name, SegmentArgs args, CustomResourceOptions options)
type: dynatrace:Segment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "dynatrace_segment" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SegmentArgs
- 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 SegmentArgs
- 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 SegmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SegmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SegmentArgs
- 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 segmentResource = new Dynatrace.Segment("segmentResource", new()
{
IsPublic = false,
Description = "string",
Includes = new Dynatrace.Inputs.SegmentIncludesArgs
{
Items = new[]
{
new Dynatrace.Inputs.SegmentIncludesItemArgs
{
DataObject = "string",
Filter = "string",
ApplyTos = new[]
{
"string",
},
Relationship = new Dynatrace.Inputs.SegmentIncludesItemRelationshipArgs
{
Name = "string",
Target = "string",
},
},
},
},
Name = "string",
Variables = new Dynatrace.Inputs.SegmentVariablesArgs
{
Type = "string",
Value = "string",
},
});
example, err := dynatrace.NewSegment(ctx, "segmentResource", &dynatrace.SegmentArgs{
IsPublic: pulumi.Bool(false),
Description: pulumi.String("string"),
Includes: &dynatrace.SegmentIncludesArgs{
Items: dynatrace.SegmentIncludesItemArray{
&dynatrace.SegmentIncludesItemArgs{
DataObject: pulumi.String("string"),
Filter: pulumi.String("string"),
ApplyTos: pulumi.StringArray{
pulumi.String("string"),
},
Relationship: &dynatrace.SegmentIncludesItemRelationshipArgs{
Name: pulumi.String("string"),
Target: pulumi.String("string"),
},
},
},
},
Name: pulumi.String("string"),
Variables: &dynatrace.SegmentVariablesArgs{
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
})
resource "dynatrace_segment" "segmentResource" {
is_public = false
description = "string"
includes = {
items = [{
"dataObject" = "string"
"filter" = "string"
"applyTos" = ["string"]
"relationship" = {
"name" = "string"
"target" = "string"
}
}]
}
name = "string"
variables = {
type = "string"
value = "string"
}
}
var segmentResource = new Segment("segmentResource", SegmentArgs.builder()
.isPublic(false)
.description("string")
.includes(SegmentIncludesArgs.builder()
.items(SegmentIncludesItemArgs.builder()
.dataObject("string")
.filter("string")
.applyTos("string")
.relationship(SegmentIncludesItemRelationshipArgs.builder()
.name("string")
.target("string")
.build())
.build())
.build())
.name("string")
.variables(SegmentVariablesArgs.builder()
.type("string")
.value("string")
.build())
.build());
segment_resource = dynatrace.Segment("segmentResource",
is_public=False,
description="string",
includes={
"items": [{
"data_object": "string",
"filter": "string",
"apply_tos": ["string"],
"relationship": {
"name": "string",
"target": "string",
},
}],
},
name="string",
variables={
"type": "string",
"value": "string",
})
const segmentResource = new dynatrace.Segment("segmentResource", {
isPublic: false,
description: "string",
includes: {
items: [{
dataObject: "string",
filter: "string",
applyTos: ["string"],
relationship: {
name: "string",
target: "string",
},
}],
},
name: "string",
variables: {
type: "string",
value: "string",
},
});
type: dynatrace:Segment
properties:
description: string
includes:
items:
- applyTos:
- string
dataObject: string
filter: string
relationship:
name: string
target: string
isPublic: false
name: string
variables:
type: string
value: string
Segment 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 Segment resource accepts the following input properties:
- Is
Public bool - Indicates if the filter-segment is publicly accessible within the tenant
- Description string
- Description of the filter-segment
- Includes
Pulumiverse.
Dynatrace. Inputs. Segment Includes - List of includes of the filter-segment
- Name string
- Name of the filter-segment
- Variables
Pulumiverse.
Dynatrace. Inputs. Segment Variables - Variables of the filter-segment
- Is
Public bool - Indicates if the filter-segment is publicly accessible within the tenant
- Description string
- Description of the filter-segment
- Includes
Segment
Includes Args - List of includes of the filter-segment
- Name string
- Name of the filter-segment
- Variables
Segment
Variables Args - Variables of the filter-segment
- is
Public Boolean - Indicates if the filter-segment is publicly accessible within the tenant
- description String
- Description of the filter-segment
- includes
Segment
Includes - List of includes of the filter-segment
- name String
- Name of the filter-segment
- variables
Segment
Variables - Variables of the filter-segment
- is
Public boolean - Indicates if the filter-segment is publicly accessible within the tenant
- description string
- Description of the filter-segment
- includes
Segment
Includes - List of includes of the filter-segment
- name string
- Name of the filter-segment
- variables
Segment
Variables - Variables of the filter-segment
- is_
public bool - Indicates if the filter-segment is publicly accessible within the tenant
- description str
- Description of the filter-segment
- includes
Segment
Includes Args - List of includes of the filter-segment
- name str
- Name of the filter-segment
- variables
Segment
Variables Args - Variables of the filter-segment
- is
Public Boolean - Indicates if the filter-segment is publicly accessible within the tenant
- description String
- Description of the filter-segment
- includes Property Map
- List of includes of the filter-segment
- name String
- Name of the filter-segment
- variables Property Map
- Variables of the filter-segment
Outputs
All input properties are implicitly available as output properties. Additionally, the Segment 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 Segment Resource
Get an existing Segment 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?: SegmentState, opts?: CustomResourceOptions): Segment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
includes: Optional[SegmentIncludesArgs] = None,
is_public: Optional[bool] = None,
name: Optional[str] = None,
variables: Optional[SegmentVariablesArgs] = None) -> Segmentfunc GetSegment(ctx *Context, name string, id IDInput, state *SegmentState, opts ...ResourceOption) (*Segment, error)public static Segment Get(string name, Input<string> id, SegmentState? state, CustomResourceOptions? opts = null)public static Segment get(String name, Output<String> id, SegmentState state, CustomResourceOptions options)resources: _: type: dynatrace:Segment get: id: ${id}import {
to = dynatrace_segment.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.
- Description string
- Description of the filter-segment
- Includes
Pulumiverse.
Dynatrace. Inputs. Segment Includes - List of includes of the filter-segment
- Is
Public bool - Indicates if the filter-segment is publicly accessible within the tenant
- Name string
- Name of the filter-segment
- Variables
Pulumiverse.
Dynatrace. Inputs. Segment Variables - Variables of the filter-segment
- Description string
- Description of the filter-segment
- Includes
Segment
Includes Args - List of includes of the filter-segment
- Is
Public bool - Indicates if the filter-segment is publicly accessible within the tenant
- Name string
- Name of the filter-segment
- Variables
Segment
Variables Args - Variables of the filter-segment
- description String
- Description of the filter-segment
- includes
Segment
Includes - List of includes of the filter-segment
- is
Public Boolean - Indicates if the filter-segment is publicly accessible within the tenant
- name String
- Name of the filter-segment
- variables
Segment
Variables - Variables of the filter-segment
- description string
- Description of the filter-segment
- includes
Segment
Includes - List of includes of the filter-segment
- is
Public boolean - Indicates if the filter-segment is publicly accessible within the tenant
- name string
- Name of the filter-segment
- variables
Segment
Variables - Variables of the filter-segment
- description str
- Description of the filter-segment
- includes
Segment
Includes Args - List of includes of the filter-segment
- is_
public bool - Indicates if the filter-segment is publicly accessible within the tenant
- name str
- Name of the filter-segment
- variables
Segment
Variables Args - Variables of the filter-segment
- description String
- Description of the filter-segment
- includes Property Map
- List of includes of the filter-segment
- is
Public Boolean - Indicates if the filter-segment is publicly accessible within the tenant
- name String
- Name of the filter-segment
- variables Property Map
- Variables of the filter-segment
Supporting Types
SegmentIncludes, SegmentIncludesArgs
- Items
List<Pulumiverse.
Dynatrace. Inputs. Segment Includes Item> - TODO: No documentation available
- Items
[]Segment
Includes Item - TODO: No documentation available
- items list(object)
- TODO: No documentation available
- items
List<Segment
Includes Item> - TODO: No documentation available
- items
Segment
Includes Item[] - TODO: No documentation available
- items
Sequence[Segment
Includes Item] - TODO: No documentation available
- items List<Property Map>
- TODO: No documentation available
SegmentIncludesItem, SegmentIncludesItemArgs
- Data
Object string - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- Filter string
- Data will be filtered by this value
- Apply
Tos List<string> - [Experimental] The tables that the entity-filter will be applied to`
- Relationship
Pulumiverse.
Dynatrace. Inputs. Segment Includes Item Relationship - [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
- Data
Object string - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- Filter string
- Data will be filtered by this value
- Apply
Tos []string - [Experimental] The tables that the entity-filter will be applied to`
- Relationship
Segment
Includes Item Relationship - [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
- data_
object string - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- filter string
- Data will be filtered by this value
- apply_
tos list(string) - [Experimental] The tables that the entity-filter will be applied to`
- relationship object
- [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
- data
Object String - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- filter String
- Data will be filtered by this value
- apply
Tos List<String> - [Experimental] The tables that the entity-filter will be applied to`
- relationship
Segment
Includes Item Relationship - [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
- data
Object string - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- filter string
- Data will be filtered by this value
- apply
Tos string[] - [Experimental] The tables that the entity-filter will be applied to`
- relationship
Segment
Includes Item Relationship - [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
- data_
object str - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- filter str
- Data will be filtered by this value
- apply_
tos Sequence[str] - [Experimental] The tables that the entity-filter will be applied to`
- relationship
Segment
Includes Item Relationship - [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
- data
Object String - The data object that the filter will be applied to. Use 'alldata_object' to apply it to all dataObjects
- filter String
- Data will be filtered by this value
- apply
Tos List<String> - [Experimental] The tables that the entity-filter will be applied to`
- relationship Property Map
- [Experimental] The relationship of an include which has to be be specified when the data object is an entity view
SegmentIncludesItemRelationship, SegmentIncludesItemRelationshipArgs
SegmentVariables, SegmentVariablesArgs
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatraceTerraform Provider.
published on Tuesday, Jun 9, 2026 by Pulumiverse