XRayClient
Auto-generated documentation for XRay type annotations stubs module mypy-boto3-xray.
XRayClient
Type annotations and code completion for boto3.client("xray")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_xray.client import XRayClient
def get_xray_client() -> XRayClient:
return Session().client("xray")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("xray").exceptions
structure.
client = boto3.client("xray")
try:
do_something(client)
except (
client.ClientError,
client.InvalidPolicyRevisionIdException,
client.InvalidRequestException,
client.LockoutPreventionException,
client.MalformedPolicyDocumentException,
client.PolicyCountLimitExceededException,
client.PolicySizeLimitExceededException,
client.ResourceNotFoundException,
client.RuleLimitExceededException,
client.ThrottledException,
client.TooManyTagsException,
) as e:
print(e)
from mypy_boto3_xray.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods
batch_get_traces
Retrieves a list of traces specified by ID.
Type annotations and code completion for boto3.client("xray").batch_get_traces
method.
boto3 documentation
def batch_get_traces(
self,
*,
TraceIds: Sequence[str],
NextToken: str = ...,
) -> BatchGetTracesResultTypeDef: # (1)
...
kwargs: BatchGetTracesRequestRequestTypeDef = { # (1)
"TraceIds": ...,
}
parent.batch_get_traces(**kwargs)
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("xray").can_paginate
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("xray").close
method.
boto3 documentation
create_group
Creates a group resource with a name and a filter expression.
Type annotations and code completion for boto3.client("xray").create_group
method.
boto3 documentation
def create_group(
self,
*,
GroupName: str,
FilterExpression: str = ...,
InsightsConfiguration: InsightsConfigurationTypeDef = ..., # (1)
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateGroupResultTypeDef: # (3)
...
kwargs: CreateGroupRequestRequestTypeDef = { # (1)
"GroupName": ...,
}
parent.create_group(**kwargs)
create_sampling_rule
Creates a rule to control sampling behavior for instrumented applications.
Type annotations and code completion for boto3.client("xray").create_sampling_rule
method.
boto3 documentation
def create_sampling_rule(
self,
*,
SamplingRule: SamplingRuleTypeDef, # (1)
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateSamplingRuleResultTypeDef: # (3)
...
kwargs: CreateSamplingRuleRequestRequestTypeDef = { # (1)
"SamplingRule": ...,
}
parent.create_sampling_rule(**kwargs)
delete_group
Deletes a group resource.
Type annotations and code completion for boto3.client("xray").delete_group
method.
boto3 documentation
def delete_group(
self,
*,
GroupName: str = ...,
GroupARN: str = ...,
) -> Dict[str, Any]:
...
kwargs: DeleteGroupRequestRequestTypeDef = { # (1)
"GroupName": ...,
}
parent.delete_group(**kwargs)
delete_resource_policy
Deletes a resource policy from the target Amazon Web Services account.
Type annotations and code completion for boto3.client("xray").delete_resource_policy
method.
boto3 documentation
def delete_resource_policy(
self,
*,
PolicyName: str,
PolicyRevisionId: str = ...,
) -> Dict[str, Any]:
...
kwargs: DeleteResourcePolicyRequestRequestTypeDef = { # (1)
"PolicyName": ...,
}
parent.delete_resource_policy(**kwargs)
delete_sampling_rule
Deletes a sampling rule.
Type annotations and code completion for boto3.client("xray").delete_sampling_rule
method.
boto3 documentation
def delete_sampling_rule(
self,
*,
RuleName: str = ...,
RuleARN: str = ...,
) -> DeleteSamplingRuleResultTypeDef: # (1)
...
kwargs: DeleteSamplingRuleRequestRequestTypeDef = { # (1)
"RuleName": ...,
}
parent.delete_sampling_rule(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("xray").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_encryption_config
Retrieves the current encryption configuration for X-Ray data.
Type annotations and code completion for boto3.client("xray").get_encryption_config
method.
boto3 documentation
get_group
Retrieves group resource details.
Type annotations and code completion for boto3.client("xray").get_group
method.
boto3 documentation
def get_group(
self,
*,
GroupName: str = ...,
GroupARN: str = ...,
) -> GetGroupResultTypeDef: # (1)
...
kwargs: GetGroupRequestRequestTypeDef = { # (1)
"GroupName": ...,
}
parent.get_group(**kwargs)
get_groups
Retrieves all active group details.
Type annotations and code completion for boto3.client("xray").get_groups
method.
boto3 documentation
def get_groups(
self,
*,
NextToken: str = ...,
) -> GetGroupsResultTypeDef: # (1)
...
kwargs: GetGroupsRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.get_groups(**kwargs)
get_insight
Retrieves the summary information of an insight.
Type annotations and code completion for boto3.client("xray").get_insight
method.
boto3 documentation
kwargs: GetInsightRequestRequestTypeDef = { # (1)
"InsightId": ...,
}
parent.get_insight(**kwargs)
get_insight_events
X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event.
Type annotations and code completion for boto3.client("xray").get_insight_events
method.
boto3 documentation
def get_insight_events(
self,
*,
InsightId: str,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetInsightEventsResultTypeDef: # (1)
...
kwargs: GetInsightEventsRequestRequestTypeDef = { # (1)
"InsightId": ...,
}
parent.get_insight_events(**kwargs)
get_insight_impact_graph
Retrieves a service graph structure filtered by the specified insight.
Type annotations and code completion for boto3.client("xray").get_insight_impact_graph
method.
boto3 documentation
def get_insight_impact_graph(
self,
*,
InsightId: str,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
NextToken: str = ...,
) -> GetInsightImpactGraphResultTypeDef: # (1)
...
kwargs: GetInsightImpactGraphRequestRequestTypeDef = { # (1)
"InsightId": ...,
"StartTime": ...,
"EndTime": ...,
}
parent.get_insight_impact_graph(**kwargs)
get_insight_summaries
Retrieves the summaries of all insights in the specified group matching the provided filter values.
Type annotations and code completion for boto3.client("xray").get_insight_summaries
method.
boto3 documentation
def get_insight_summaries(
self,
*,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
States: Sequence[InsightStateType] = ..., # (1)
GroupARN: str = ...,
GroupName: str = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetInsightSummariesResultTypeDef: # (2)
...
kwargs: GetInsightSummariesRequestRequestTypeDef = { # (1)
"StartTime": ...,
"EndTime": ...,
}
parent.get_insight_summaries(**kwargs)
get_sampling_rules
Retrieves all sampling rules.
Type annotations and code completion for boto3.client("xray").get_sampling_rules
method.
boto3 documentation
def get_sampling_rules(
self,
*,
NextToken: str = ...,
) -> GetSamplingRulesResultTypeDef: # (1)
...
kwargs: GetSamplingRulesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.get_sampling_rules(**kwargs)
get_sampling_statistic_summaries
Retrieves information about recent sampling results for all sampling rules.
Type annotations and code completion for boto3.client("xray").get_sampling_statistic_summaries
method.
boto3 documentation
def get_sampling_statistic_summaries(
self,
*,
NextToken: str = ...,
) -> GetSamplingStatisticSummariesResultTypeDef: # (1)
...
kwargs: GetSamplingStatisticSummariesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.get_sampling_statistic_summaries(**kwargs)
get_sampling_targets
Requests a sampling quota for rules that the service is using to sample requests.
Type annotations and code completion for boto3.client("xray").get_sampling_targets
method.
boto3 documentation
def get_sampling_targets(
self,
*,
SamplingStatisticsDocuments: Sequence[SamplingStatisticsDocumentTypeDef], # (1)
) -> GetSamplingTargetsResultTypeDef: # (2)
...
kwargs: GetSamplingTargetsRequestRequestTypeDef = { # (1)
"SamplingStatisticsDocuments": ...,
}
parent.get_sampling_targets(**kwargs)
get_service_graph
Retrieves a document that describes services that process incoming requests, and downstream services that they call as a result.
Type annotations and code completion for boto3.client("xray").get_service_graph
method.
boto3 documentation
def get_service_graph(
self,
*,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
GroupName: str = ...,
GroupARN: str = ...,
NextToken: str = ...,
) -> GetServiceGraphResultTypeDef: # (1)
...
kwargs: GetServiceGraphRequestRequestTypeDef = { # (1)
"StartTime": ...,
"EndTime": ...,
}
parent.get_service_graph(**kwargs)
get_time_series_service_statistics
Get an aggregation of service statistics defined by a specific time range.
Type annotations and code completion for boto3.client("xray").get_time_series_service_statistics
method.
boto3 documentation
def get_time_series_service_statistics(
self,
*,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
GroupName: str = ...,
GroupARN: str = ...,
EntitySelectorExpression: str = ...,
Period: int = ...,
ForecastStatistics: bool = ...,
NextToken: str = ...,
) -> GetTimeSeriesServiceStatisticsResultTypeDef: # (1)
...
kwargs: GetTimeSeriesServiceStatisticsRequestRequestTypeDef = { # (1)
"StartTime": ...,
"EndTime": ...,
}
parent.get_time_series_service_statistics(**kwargs)
get_trace_graph
Retrieves a service graph for one or more specific trace IDs.
Type annotations and code completion for boto3.client("xray").get_trace_graph
method.
boto3 documentation
def get_trace_graph(
self,
*,
TraceIds: Sequence[str],
NextToken: str = ...,
) -> GetTraceGraphResultTypeDef: # (1)
...
kwargs: GetTraceGraphRequestRequestTypeDef = { # (1)
"TraceIds": ...,
}
parent.get_trace_graph(**kwargs)
get_trace_summaries
Retrieves IDs and annotations for traces available for a specified time frame using an optional filter.
Type annotations and code completion for boto3.client("xray").get_trace_summaries
method.
boto3 documentation
def get_trace_summaries(
self,
*,
StartTime: Union[datetime, str],
EndTime: Union[datetime, str],
TimeRangeType: TimeRangeTypeType = ..., # (1)
Sampling: bool = ...,
SamplingStrategy: SamplingStrategyTypeDef = ..., # (2)
FilterExpression: str = ...,
NextToken: str = ...,
) -> GetTraceSummariesResultTypeDef: # (3)
...
kwargs: GetTraceSummariesRequestRequestTypeDef = { # (1)
"StartTime": ...,
"EndTime": ...,
}
parent.get_trace_summaries(**kwargs)
list_resource_policies
Returns the list of resource policies in the target Amazon Web Services account.
Type annotations and code completion for boto3.client("xray").list_resource_policies
method.
boto3 documentation
def list_resource_policies(
self,
*,
NextToken: str = ...,
) -> ListResourcePoliciesResultTypeDef: # (1)
...
kwargs: ListResourcePoliciesRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_resource_policies(**kwargs)
list_tags_for_resource
Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.
Type annotations and code completion for boto3.client("xray").list_tags_for_resource
method.
boto3 documentation
def list_tags_for_resource(
self,
*,
ResourceARN: str,
NextToken: str = ...,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_tags_for_resource(**kwargs)
put_encryption_config
Updates the encryption configuration for X-Ray data.
Type annotations and code completion for boto3.client("xray").put_encryption_config
method.
boto3 documentation
def put_encryption_config(
self,
*,
Type: EncryptionTypeType, # (1)
KeyId: str = ...,
) -> PutEncryptionConfigResultTypeDef: # (2)
...
kwargs: PutEncryptionConfigRequestRequestTypeDef = { # (1)
"Type": ...,
}
parent.put_encryption_config(**kwargs)
put_resource_policy
Sets the resource policy to grant one or more Amazon Web Services services and accounts permissions to access X-Ray.
Type annotations and code completion for boto3.client("xray").put_resource_policy
method.
boto3 documentation
def put_resource_policy(
self,
*,
PolicyName: str,
PolicyDocument: str,
PolicyRevisionId: str = ...,
BypassPolicyLockoutCheck: bool = ...,
) -> PutResourcePolicyResultTypeDef: # (1)
...
kwargs: PutResourcePolicyRequestRequestTypeDef = { # (1)
"PolicyName": ...,
"PolicyDocument": ...,
}
parent.put_resource_policy(**kwargs)
put_telemetry_records
Used by the Amazon Web Services X-Ray daemon to upload telemetry.
Type annotations and code completion for boto3.client("xray").put_telemetry_records
method.
boto3 documentation
def put_telemetry_records(
self,
*,
TelemetryRecords: Sequence[TelemetryRecordTypeDef], # (1)
EC2InstanceId: str = ...,
Hostname: str = ...,
ResourceARN: str = ...,
) -> Dict[str, Any]:
...
kwargs: PutTelemetryRecordsRequestRequestTypeDef = { # (1)
"TelemetryRecords": ...,
}
parent.put_telemetry_records(**kwargs)
put_trace_segments
Uploads segment documents to Amazon Web Services X-Ray.
Type annotations and code completion for boto3.client("xray").put_trace_segments
method.
boto3 documentation
def put_trace_segments(
self,
*,
TraceSegmentDocuments: Sequence[str],
) -> PutTraceSegmentsResultTypeDef: # (1)
...
kwargs: PutTraceSegmentsRequestRequestTypeDef = { # (1)
"TraceSegmentDocuments": ...,
}
parent.put_trace_segments(**kwargs)
tag_resource
Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.
Type annotations and code completion for boto3.client("xray").tag_resource
method.
boto3 documentation
def tag_resource(
self,
*,
ResourceARN: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource
Removes tags from an Amazon Web Services X-Ray group or sampling rule.
Type annotations and code completion for boto3.client("xray").untag_resource
method.
boto3 documentation
def untag_resource(
self,
*,
ResourceARN: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
update_group
Updates a group resource.
Type annotations and code completion for boto3.client("xray").update_group
method.
boto3 documentation
def update_group(
self,
*,
GroupName: str = ...,
GroupARN: str = ...,
FilterExpression: str = ...,
InsightsConfiguration: InsightsConfigurationTypeDef = ..., # (1)
) -> UpdateGroupResultTypeDef: # (2)
...
kwargs: UpdateGroupRequestRequestTypeDef = { # (1)
"GroupName": ...,
}
parent.update_group(**kwargs)
update_sampling_rule
Modifies a sampling rule's configuration.
Type annotations and code completion for boto3.client("xray").update_sampling_rule
method.
boto3 documentation
def update_sampling_rule(
self,
*,
SamplingRuleUpdate: SamplingRuleUpdateTypeDef, # (1)
) -> UpdateSamplingRuleResultTypeDef: # (2)
...
kwargs: UpdateSamplingRuleRequestRequestTypeDef = { # (1)
"SamplingRuleUpdate": ...,
}
parent.update_sampling_rule(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("xray").get_paginator
method with overloads.
client.get_paginator("batch_get_traces")
-> BatchGetTracesPaginatorclient.get_paginator("get_groups")
-> GetGroupsPaginatorclient.get_paginator("get_sampling_rules")
-> GetSamplingRulesPaginatorclient.get_paginator("get_sampling_statistic_summaries")
-> GetSamplingStatisticSummariesPaginatorclient.get_paginator("get_service_graph")
-> GetServiceGraphPaginatorclient.get_paginator("get_time_series_service_statistics")
-> GetTimeSeriesServiceStatisticsPaginatorclient.get_paginator("get_trace_graph")
-> GetTraceGraphPaginatorclient.get_paginator("get_trace_summaries")
-> GetTraceSummariesPaginatorclient.get_paginator("list_resource_policies")
-> ListResourcePoliciesPaginatorclient.get_paginator("list_tags_for_resource")
-> ListTagsForResourcePaginator