AWS X-Ray

2020/10/15 - AWS X-Ray - 5 updated api methods

Changes  Update xray client to latest version

BatchGetTraces (updated) Link ¶
Changes (response)
{'Traces': {'LimitExceeded': 'boolean'}}

Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request. Use GetTraceSummaries to get a list of trace IDs.

See also: AWS API Documentation

Request Syntax

client.batch_get_traces(
    TraceIds=[
        'string',
    ],
    NextToken='string'
)
type TraceIds:

list

param TraceIds:

[REQUIRED]

Specify the trace IDs of requests for which to retrieve segments.

  • (string) --

type NextToken:

string

param NextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'Traces': [
        {
            'Id': 'string',
            'Duration': 123.0,
            'LimitExceeded': True|False,
            'Segments': [
                {
                    'Id': 'string',
                    'Document': 'string'
                },
            ]
        },
    ],
    'UnprocessedTraceIds': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Traces (list) --

      Full traces for the specified requests.

      • (dict) --

        A collection of segment documents with matching trace IDs.

        • Id (string) --

          The unique identifier for the request that generated the trace's segments and subsegments.

        • Duration (float) --

          The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.

        • LimitExceeded (boolean) --

          LimitExceeded is set to true when the trace has exceeded one of the defined quotas. For more information about quotas, see AWS X-Ray endpoints and quotas.

        • Segments (list) --

          Segment documents for the segments and subsegments that comprise the trace.

          • (dict) --

            A segment from a trace that has been ingested by the X-Ray service. The segment can be compiled from documents uploaded with PutTraceSegments, or an inferred segment for a downstream service, generated from a subsegment sent by the service that called it.

            For the full segment document schema, see AWS X-Ray Segment Documents in the AWS X-Ray Developer Guide.

            • Id (string) --

              The segment's ID.

            • Document (string) --

              The segment document.

    • UnprocessedTraceIds (list) --

      Trace IDs of requests that haven't been processed.

      • (string) --

    • NextToken (string) --

      Pagination token.

CreateGroup (updated) Link ¶
Changes (request, response)
Request
{'InsightsConfiguration': {'NotificationsEnabled': 'boolean'}}
Response
{'Group': {'InsightsConfiguration': {'NotificationsEnabled': 'boolean'}}}

Creates a group resource with a name and a filter expression.

See also: AWS API Documentation

Request Syntax

client.create_group(
    GroupName='string',
    FilterExpression='string',
    InsightsConfiguration={
        'InsightsEnabled': True|False,
        'NotificationsEnabled': True|False
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type GroupName:

string

param GroupName:

[REQUIRED]

The case-sensitive name of the new group. Default is a reserved name and names must be unique.

type FilterExpression:

string

param FilterExpression:

The filter expression defining criteria by which to group traces.

type InsightsConfiguration:

dict

param InsightsConfiguration:

The structure containing configurations related to insights.

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

  • The NotifcationsEnabled boolean can be set to true to enable insights notifications for the new group. Notifications may only be enabled on a group with InsightsEnabled set to true.

  • InsightsEnabled (boolean) --

    Set the InsightsEnabled value to true to enable insights or false to disable insights.

  • NotificationsEnabled (boolean) --

    Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

type Tags:

list

param Tags:

A map that contains one or more tag keys and tag values to attach to an X-Ray group. For more information about ways to use tags, see Tagging AWS resources in the AWS General Reference.

The following restrictions apply to tags:

  • Maximum number of user-applied tags per resource: 50

  • Maximum tag key length: 128 Unicode characters

  • Maximum tag value length: 256 Unicode characters

  • Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @

  • Tag keys and values are case sensitive.

  • Don't use aws: as a prefix for keys; it's reserved for AWS use.

  • (dict) --

    A map that contains tag keys and tag values to attach to an AWS X-Ray group or sampling rule. For more information about ways to use tags, see Tagging AWS resources in the AWS General Reference.

    The following restrictions apply to tags:

    • Maximum number of user-applied tags per resource: 50

    • Tag keys and values are case sensitive.

    • Don't use aws: as a prefix for keys; it's reserved for AWS use. You cannot edit or delete system tags.

    • Key (string) -- [REQUIRED]

      A tag key, such as Stage or Name. A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

    • Value (string) -- [REQUIRED]

      An optional tag value, such as Production or test-only. The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

rtype:

dict

returns:

Response Syntax

{
    'Group': {
        'GroupName': 'string',
        'GroupARN': 'string',
        'FilterExpression': 'string',
        'InsightsConfiguration': {
            'InsightsEnabled': True|False,
            'NotificationsEnabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The group that was created. Contains the name of the group that was created, the Amazon Resource Name (ARN) of the group that was generated based on the group name, the filter expression, and the insight configuration that was assigned to the group.

      • GroupName (string) --

        The unique case-sensitive name of the group.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group generated based on the GroupName.

      • FilterExpression (string) --

        The filter expression defining the parameters to include traces.

      • InsightsConfiguration (dict) --

        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 NotifcationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.

        • InsightsEnabled (boolean) --

          Set the InsightsEnabled value to true to enable insights or false to disable insights.

        • NotificationsEnabled (boolean) --

          Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

GetGroup (updated) Link ¶
Changes (response)
{'Group': {'InsightsConfiguration': {'NotificationsEnabled': 'boolean'}}}

Retrieves group resource details.

See also: AWS API Documentation

Request Syntax

client.get_group(
    GroupName='string',
    GroupARN='string'
)
type GroupName:

string

param GroupName:

The case-sensitive name of the group.

type GroupARN:

string

param GroupARN:

The ARN of the group that was generated on creation.

rtype:

dict

returns:

Response Syntax

{
    'Group': {
        'GroupName': 'string',
        'GroupARN': 'string',
        'FilterExpression': 'string',
        'InsightsConfiguration': {
            'InsightsEnabled': True|False,
            'NotificationsEnabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The group that was requested. Contains the name of the group, the ARN of the group, the filter expression, and the insight configuration assigned to the group.

      • GroupName (string) --

        The unique case-sensitive name of the group.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group generated based on the GroupName.

      • FilterExpression (string) --

        The filter expression defining the parameters to include traces.

      • InsightsConfiguration (dict) --

        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 NotifcationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.

        • InsightsEnabled (boolean) --

          Set the InsightsEnabled value to true to enable insights or false to disable insights.

        • NotificationsEnabled (boolean) --

          Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

GetGroups (updated) Link ¶
Changes (response)
{'Groups': {'InsightsConfiguration': {'NotificationsEnabled': 'boolean'}}}

Retrieves all active group details.

See also: AWS API Documentation

Request Syntax

client.get_groups(
    NextToken='string'
)
type NextToken:

string

param NextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'Groups': [
        {
            'GroupName': 'string',
            'GroupARN': 'string',
            'FilterExpression': 'string',
            'InsightsConfiguration': {
                'InsightsEnabled': True|False,
                'NotificationsEnabled': True|False
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Groups (list) --

      The collection of all active groups.

      • (dict) --

        Details for a group without metadata.

        • GroupName (string) --

          The unique case-sensitive name of the group.

        • GroupARN (string) --

          The ARN of the group generated based on the GroupName.

        • FilterExpression (string) --

          The filter expression defining the parameters to include traces.

        • InsightsConfiguration (dict) --

          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. Notifications can only be enabled on a group with InsightsEnabled set to true.

          • InsightsEnabled (boolean) --

            Set the InsightsEnabled value to true to enable insights or false to disable insights.

          • NotificationsEnabled (boolean) --

            Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

    • NextToken (string) --

      Pagination token.

UpdateGroup (updated) Link ¶
Changes (request, response)
Request
{'InsightsConfiguration': {'NotificationsEnabled': 'boolean'}}
Response
{'Group': {'InsightsConfiguration': {'NotificationsEnabled': 'boolean'}}}

Updates a group resource.

See also: AWS API Documentation

Request Syntax

client.update_group(
    GroupName='string',
    GroupARN='string',
    FilterExpression='string',
    InsightsConfiguration={
        'InsightsEnabled': True|False,
        'NotificationsEnabled': True|False
    }
)
type GroupName:

string

param GroupName:

The case-sensitive name of the group.

type GroupARN:

string

param GroupARN:

The ARN that was generated upon creation.

type FilterExpression:

string

param FilterExpression:

The updated filter expression defining criteria by which to group traces.

type InsightsConfiguration:

dict

param 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 NotifcationsEnabled boolean can be set to true to enable insights notifications for the group. Notifications can only be enabled on a group with InsightsEnabled set to true.

  • InsightsEnabled (boolean) --

    Set the InsightsEnabled value to true to enable insights or false to disable insights.

  • NotificationsEnabled (boolean) --

    Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

rtype:

dict

returns:

Response Syntax

{
    'Group': {
        'GroupName': 'string',
        'GroupARN': 'string',
        'FilterExpression': 'string',
        'InsightsConfiguration': {
            'InsightsEnabled': True|False,
            'NotificationsEnabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The group that was updated. Contains the name of the group that was updated, the ARN of the group that was updated, the updated filter expression, and the updated insight configuration assigned to the group.

      • GroupName (string) --

        The unique case-sensitive name of the group.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group generated based on the GroupName.

      • FilterExpression (string) --

        The filter expression defining the parameters to include traces.

      • InsightsConfiguration (dict) --

        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 NotifcationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.

        • InsightsEnabled (boolean) --

          Set the InsightsEnabled value to true to enable insights or false to disable insights.

        • NotificationsEnabled (boolean) --

          Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.