AWS::XRay::Group - AWS CloudFormation

AWS::XRay::Group

Use the AWS::XRay::Group resource to specify a group with a name and a filter expression. Groups enable the collection of traces that match the filter expression, can be used to filter service graphs and traces, and to supply Amazon CloudWatch metrics.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::XRay::Group", "Properties" : { "FilterExpression" : String, "GroupName" : String, "InsightsConfiguration" : InsightsConfiguration, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::XRay::Group Properties: FilterExpression: String GroupName: String InsightsConfiguration: InsightsConfiguration Tags: - Tag

Properties

FilterExpression

The filter expression defining the parameters to include traces.

Required: No

Type: String

Update requires: No interruption

GroupName

The unique case-sensitive name of the group.

Required: Yes

Type: String

Minimum: 1

Maximum: 32

Update requires: No interruption

InsightsConfiguration

The structure containing configurations related to insights.

  • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.

  • The NotificationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.

Required: No

Type: InsightsConfiguration

Update requires: No interruption

Tags

An array of key-value pairs to apply to this resource.

Required: No

Type: Array of Tag

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the group.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

GroupARN

The group ARN that was created or updated.

Examples

Create group

This example creates a new group called MyGroup.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "MyGroupResource": { "Type": "AWS::XRay::Group", "Properties": { "GroupName": "MyGroup", "FilterExpression": "duration > 10", "InsightsConfiguration": { "InsightsEnabled": "false", "NotificationsEnabled": "false" } } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: MyGroupResource: Type: AWS::XRay::Group Properties: GroupName: MyGroup FilterExpression: duration > 10 InsightsConfiguration: InsightsEnabled: false NotificationsEnabled: false

See also