Struct aws_sdk_xray::Client
source · pub struct Client { /* private fields */ }Expand description
Client for AWS X-Ray
Client for invoking operations on AWS X-Ray. Each operation on AWS X-Ray is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_xray::Client::new(&config);Occasionally, SDKs may have additional service-specific that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_xray::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
Using the Client
A client has a function for every operation that can be performed by the service.
For example, the BatchGetTraces operation has
a Client::batch_get_traces, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.batch_get_traces()
.next_token("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn batch_get_traces(&self) -> BatchGetTracesFluentBuilder
pub fn batch_get_traces(&self) -> BatchGetTracesFluentBuilder
Constructs a fluent builder for the BatchGetTraces operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
trace_ids(impl Into<String>)/set_trace_ids(Option<Vec<String>>):Specify the trace IDs of requests for which to retrieve segments.
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
BatchGetTracesOutputwith field(s):traces(Option<Vec<Trace>>):Full traces for the specified requests.
unprocessed_trace_ids(Option<Vec<String>>):Trace IDs of requests that haven’t been processed.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<BatchGetTracesError>
source§impl Client
impl Client
sourcepub fn create_group(&self) -> CreateGroupFluentBuilder
pub fn create_group(&self) -> CreateGroupFluentBuilder
Constructs a fluent builder for the CreateGroup operation.
- The fluent builder is configurable:
group_name(impl Into<String>)/set_group_name(Option<String>):The case-sensitive name of the new group. Default is a reserved name and names must be unique.
filter_expression(impl Into<String>)/set_filter_expression(Option<String>):The filter expression defining criteria by which to group traces.
insights_configuration(InsightsConfiguration)/set_insights_configuration(Option<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 NotificationsEnabled 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.
-
tags(Tag)/set_tags(Option<Vec<Tag>>):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 Amazon Web Services resources in the Amazon Web Services 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 Amazon Web Services use.
-
- On success, responds with
CreateGroupOutputwith field(s):group(Option<Group>):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.
- On failure, responds with
SdkError<CreateGroupError>
source§impl Client
impl Client
sourcepub fn create_sampling_rule(&self) -> CreateSamplingRuleFluentBuilder
pub fn create_sampling_rule(&self) -> CreateSamplingRuleFluentBuilder
Constructs a fluent builder for the CreateSamplingRule operation.
- The fluent builder is configurable:
sampling_rule(SamplingRule)/set_sampling_rule(Option<SamplingRule>):The rule definition.
tags(Tag)/set_tags(Option<Vec<Tag>>):A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services 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 Amazon Web Services use.
-
- On success, responds with
CreateSamplingRuleOutputwith field(s):sampling_rule_record(Option<SamplingRuleRecord>):The saved rule definition and metadata.
- On failure, responds with
SdkError<CreateSamplingRuleError>
source§impl Client
impl Client
sourcepub fn delete_group(&self) -> DeleteGroupFluentBuilder
pub fn delete_group(&self) -> DeleteGroupFluentBuilder
Constructs a fluent builder for the DeleteGroup operation.
- The fluent builder is configurable:
group_name(impl Into<String>)/set_group_name(Option<String>):The case-sensitive name of the group.
group_arn(impl Into<String>)/set_group_arn(Option<String>):The ARN of the group that was generated on creation.
- On success, responds with
DeleteGroupOutput - On failure, responds with
SdkError<DeleteGroupError>
source§impl Client
impl Client
sourcepub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
Constructs a fluent builder for the DeleteResourcePolicy operation.
- The fluent builder is configurable:
policy_name(impl Into<String>)/set_policy_name(Option<String>):The name of the resource policy to delete.
policy_revision_id(impl Into<String>)/set_policy_revision_id(Option<String>):Specifies a specific policy revision to delete. Provide a
PolicyRevisionIdto ensure an atomic delete operation. If the provided revision id does not match the latest policy revision id, anInvalidPolicyRevisionIdExceptionexception is returned.
- On success, responds with
DeleteResourcePolicyOutput - On failure, responds with
SdkError<DeleteResourcePolicyError>
source§impl Client
impl Client
sourcepub fn delete_sampling_rule(&self) -> DeleteSamplingRuleFluentBuilder
pub fn delete_sampling_rule(&self) -> DeleteSamplingRuleFluentBuilder
Constructs a fluent builder for the DeleteSamplingRule operation.
- The fluent builder is configurable:
rule_name(impl Into<String>)/set_rule_name(Option<String>):The name of the sampling rule. Specify a rule by either name or ARN, but not both.
rule_arn(impl Into<String>)/set_rule_arn(Option<String>):The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
- On success, responds with
DeleteSamplingRuleOutputwith field(s):sampling_rule_record(Option<SamplingRuleRecord>):The deleted rule definition and metadata.
- On failure, responds with
SdkError<DeleteSamplingRuleError>
source§impl Client
impl Client
sourcepub fn get_encryption_config(&self) -> GetEncryptionConfigFluentBuilder
pub fn get_encryption_config(&self) -> GetEncryptionConfigFluentBuilder
Constructs a fluent builder for the GetEncryptionConfig operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetEncryptionConfigOutputwith field(s):encryption_config(Option<EncryptionConfig>):The encryption configuration document.
- On failure, responds with
SdkError<GetEncryptionConfigError>
source§impl Client
impl Client
sourcepub fn get_group(&self) -> GetGroupFluentBuilder
pub fn get_group(&self) -> GetGroupFluentBuilder
Constructs a fluent builder for the GetGroup operation.
- The fluent builder is configurable:
group_name(impl Into<String>)/set_group_name(Option<String>):The case-sensitive name of the group.
group_arn(impl Into<String>)/set_group_arn(Option<String>):The ARN of the group that was generated on creation.
- On success, responds with
GetGroupOutputwith field(s):group(Option<Group>):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.
- On failure, responds with
SdkError<GetGroupError>
source§impl Client
impl Client
sourcepub fn get_groups(&self) -> GetGroupsFluentBuilder
pub fn get_groups(&self) -> GetGroupsFluentBuilder
Constructs a fluent builder for the GetGroups operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetGroupsOutputwith field(s):groups(Option<Vec<GroupSummary>>):The collection of all active groups.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetGroupsError>
source§impl Client
impl Client
sourcepub fn get_insight(&self) -> GetInsightFluentBuilder
pub fn get_insight(&self) -> GetInsightFluentBuilder
Constructs a fluent builder for the GetInsight operation.
- The fluent builder is configurable:
insight_id(impl Into<String>)/set_insight_id(Option<String>):The insight’s unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
- On success, responds with
GetInsightOutputwith field(s):insight(Option<Insight>):The summary information of an insight.
- On failure, responds with
SdkError<GetInsightError>
source§impl Client
impl Client
sourcepub fn get_insight_events(&self) -> GetInsightEventsFluentBuilder
pub fn get_insight_events(&self) -> GetInsightEventsFluentBuilder
Constructs a fluent builder for the GetInsightEvents operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
insight_id(impl Into<String>)/set_insight_id(Option<String>):The insight’s unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
max_results(i32)/set_max_results(Option<i32>):Used to retrieve at most the specified value of events.
next_token(impl Into<String>)/set_next_token(Option<String>):Specify the pagination token returned by a previous request to retrieve the next page of events.
- On success, responds with
GetInsightEventsOutputwith field(s):insight_events(Option<Vec<InsightEvent>>):A detailed description of the event. This includes the time of the event, client and root cause impact statistics, and the top anomalous service at the time of the event.
next_token(Option<String>):Use this token to retrieve the next page of insight events.
- On failure, responds with
SdkError<GetInsightEventsError>
source§impl Client
impl Client
sourcepub fn get_insight_impact_graph(&self) -> GetInsightImpactGraphFluentBuilder
pub fn get_insight_impact_graph(&self) -> GetInsightImpactGraphFluentBuilder
Constructs a fluent builder for the GetInsightImpactGraph operation.
- The fluent builder is configurable:
insight_id(impl Into<String>)/set_insight_id(Option<String>):The insight’s unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
start_time(DateTime)/set_start_time(Option<DateTime>):The estimated start time of the insight, in Unix time seconds. The StartTime is inclusive of the value provided and can’t be more than 30 days old.
end_time(DateTime)/set_end_time(Option<DateTime>):The estimated end time of the insight, in Unix time seconds. The EndTime is exclusive of the value provided. The time range between the start time and end time can’t be more than six hours.
next_token(impl Into<String>)/set_next_token(Option<String>):Specify the pagination token returned by a previous request to retrieve the next page of results.
- On success, responds with
GetInsightImpactGraphOutputwith field(s):insight_id(Option<String>):The insight’s unique identifier.
start_time(Option<DateTime>):The provided start time.
end_time(Option<DateTime>):The provided end time.
service_graph_start_time(Option<DateTime>):The time, in Unix seconds, at which the service graph started.
service_graph_end_time(Option<DateTime>):The time, in Unix seconds, at which the service graph ended.
services(Option<Vec<InsightImpactGraphService>>):The Amazon Web Services instrumented services related to the insight.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetInsightImpactGraphError>
source§impl Client
impl Client
sourcepub fn get_insight_summaries(&self) -> GetInsightSummariesFluentBuilder
pub fn get_insight_summaries(&self) -> GetInsightSummariesFluentBuilder
Constructs a fluent builder for the GetInsightSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
states(InsightState)/set_states(Option<Vec<InsightState>>):The list of insight states.
group_arn(impl Into<String>)/set_group_arn(Option<String>):The Amazon Resource Name (ARN) of the group. Required if the GroupName isn’t provided.
group_name(impl Into<String>)/set_group_name(Option<String>):The name of the group. Required if the GroupARN isn’t provided.
start_time(DateTime)/set_start_time(Option<DateTime>):The beginning of the time frame in which the insights started. The start time can’t be more than 30 days old.
end_time(DateTime)/set_end_time(Option<DateTime>):The end of the time frame in which the insights ended. The end time can’t be more than 30 days old.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to display.
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetInsightSummariesOutputwith field(s):insight_summaries(Option<Vec<InsightSummary>>):The summary of each insight within the group matching the provided filters. The summary contains the InsightID, start and end time, the root cause service, the root cause and client impact statistics, the top anomalous services, and the status of the insight.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetInsightSummariesError>
source§impl Client
impl Client
sourcepub fn get_sampling_rules(&self) -> GetSamplingRulesFluentBuilder
pub fn get_sampling_rules(&self) -> GetSamplingRulesFluentBuilder
Constructs a fluent builder for the GetSamplingRules operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetSamplingRulesOutputwith field(s):sampling_rule_records(Option<Vec<SamplingRuleRecord>>):Rule definitions and metadata.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetSamplingRulesError>
source§impl Client
impl Client
sourcepub fn get_sampling_statistic_summaries(
&self
) -> GetSamplingStatisticSummariesFluentBuilder
pub fn get_sampling_statistic_summaries( &self ) -> GetSamplingStatisticSummariesFluentBuilder
Constructs a fluent builder for the GetSamplingStatisticSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetSamplingStatisticSummariesOutputwith field(s):sampling_statistic_summaries(Option<Vec<SamplingStatisticSummary>>):Information about the number of requests instrumented for each sampling rule.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetSamplingStatisticSummariesError>
source§impl Client
impl Client
sourcepub fn get_sampling_targets(&self) -> GetSamplingTargetsFluentBuilder
pub fn get_sampling_targets(&self) -> GetSamplingTargetsFluentBuilder
Constructs a fluent builder for the GetSamplingTargets operation.
- The fluent builder is configurable:
sampling_statistics_documents(SamplingStatisticsDocument)/set_sampling_statistics_documents(Option<Vec<SamplingStatisticsDocument>>):Information about rules that the service is using to sample requests.
- On success, responds with
GetSamplingTargetsOutputwith field(s):sampling_target_documents(Option<Vec<SamplingTargetDocument>>):Updated rules that the service should use to sample requests.
last_rule_modification(Option<DateTime>):The last time a user changed the sampling rule configuration. If the sampling rule configuration changed since the service last retrieved it, the service should call GetSamplingRules to get the latest version.
unprocessed_statistics(Option<Vec<UnprocessedStatistics>>):Information about SamplingStatisticsDocument that X-Ray could not process.
- On failure, responds with
SdkError<GetSamplingTargetsError>
source§impl Client
impl Client
sourcepub fn get_service_graph(&self) -> GetServiceGraphFluentBuilder
pub fn get_service_graph(&self) -> GetServiceGraphFluentBuilder
Constructs a fluent builder for the GetServiceGraph operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
start_time(DateTime)/set_start_time(Option<DateTime>):The start of the time frame for which to generate a graph.
end_time(DateTime)/set_end_time(Option<DateTime>):The end of the timeframe for which to generate a graph.
group_name(impl Into<String>)/set_group_name(Option<String>):The name of a group based on which you want to generate a graph.
group_arn(impl Into<String>)/set_group_arn(Option<String>):The Amazon Resource Name (ARN) of a group based on which you want to generate a graph.
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetServiceGraphOutputwith field(s):start_time(Option<DateTime>):The start of the time frame for which the graph was generated.
end_time(Option<DateTime>):The end of the time frame for which the graph was generated.
services(Option<Vec<Service>>):The services that have processed a traced request during the specified time frame.
contains_old_group_versions(bool):A flag indicating whether the group’s filter expression has been consistent, or if the returned service graph may show traces from an older version of the group’s filter expression.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetServiceGraphError>
source§impl Client
impl Client
sourcepub fn get_time_series_service_statistics(
&self
) -> GetTimeSeriesServiceStatisticsFluentBuilder
pub fn get_time_series_service_statistics( &self ) -> GetTimeSeriesServiceStatisticsFluentBuilder
Constructs a fluent builder for the GetTimeSeriesServiceStatistics operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
start_time(DateTime)/set_start_time(Option<DateTime>):The start of the time frame for which to aggregate statistics.
end_time(DateTime)/set_end_time(Option<DateTime>):The end of the time frame for which to aggregate statistics.
group_name(impl Into<String>)/set_group_name(Option<String>):The case-sensitive name of the group for which to pull statistics from.
group_arn(impl Into<String>)/set_group_arn(Option<String>):The Amazon Resource Name (ARN) of the group for which to pull statistics from.
entity_selector_expression(impl Into<String>)/set_entity_selector_expression(Option<String>):A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned.
period(i32)/set_period(Option<i32>):Aggregation period in seconds.
forecast_statistics(bool)/set_forecast_statistics(Option<bool>):The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetTimeSeriesServiceStatisticsOutputwith field(s):time_series_service_statistics(Option<Vec<TimeSeriesServiceStatistics>>):The collection of statistics.
contains_old_group_versions(bool):A flag indicating whether or not a group’s filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group’s filter expression.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetTimeSeriesServiceStatisticsError>
source§impl Client
impl Client
sourcepub fn get_trace_graph(&self) -> GetTraceGraphFluentBuilder
pub fn get_trace_graph(&self) -> GetTraceGraphFluentBuilder
Constructs a fluent builder for the GetTraceGraph operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
trace_ids(impl Into<String>)/set_trace_ids(Option<Vec<String>>):Trace IDs of requests for which to generate a service graph.
next_token(impl Into<String>)/set_next_token(Option<String>):Pagination token.
- On success, responds with
GetTraceGraphOutputwith field(s):services(Option<Vec<Service>>):The services that have processed one of the specified requests.
next_token(Option<String>):Pagination token.
- On failure, responds with
SdkError<GetTraceGraphError>
source§impl Client
impl Client
sourcepub fn get_trace_summaries(&self) -> GetTraceSummariesFluentBuilder
pub fn get_trace_summaries(&self) -> GetTraceSummariesFluentBuilder
Constructs a fluent builder for the GetTraceSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
start_time(DateTime)/set_start_time(Option<DateTime>):The start of the time frame for which to retrieve traces.
end_time(DateTime)/set_end_time(Option<DateTime>):The end of the time frame for which to retrieve traces.
time_range_type(TimeRangeType)/set_time_range_type(Option<TimeRangeType>):A parameter to indicate whether to query trace summaries by TraceId or Event time.
sampling(bool)/set_sampling(Option<bool>):Set to
trueto get summaries for only a subset of available traces.sampling_strategy(SamplingStrategy)/set_sampling_strategy(Option<SamplingStrategy>):A parameter to indicate whether to enable sampling on trace summaries. Input parameters are Name and Value.
filter_expression(impl Into<String>)/set_filter_expression(Option<String>):Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.
next_token(impl Into<String>)/set_next_token(Option<String>):Specify the pagination token returned by a previous request to retrieve the next page of results.
- On success, responds with
GetTraceSummariesOutputwith field(s):trace_summaries(Option<Vec<TraceSummary>>):Trace IDs and annotations for traces that were found in the specified time frame.
approximate_time(Option<DateTime>):The start time of this page of results.
traces_processed_count(Option<i64>):The total number of traces processed, including traces that did not match the specified filter expression.
next_token(Option<String>):If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.
- On failure, responds with
SdkError<GetTraceSummariesError>
source§impl Client
impl Client
sourcepub fn list_resource_policies(&self) -> ListResourcePoliciesFluentBuilder
pub fn list_resource_policies(&self) -> ListResourcePoliciesFluentBuilder
Constructs a fluent builder for the ListResourcePolicies operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):Not currently supported.
- On success, responds with
ListResourcePoliciesOutputwith field(s):resource_policies(Option<Vec<ResourcePolicy>>):The list of resource policies in the target Amazon Web Services account.
next_token(Option<String>):Pagination token. Not currently supported.
- On failure, responds with
SdkError<ListResourcePoliciesError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.
next_token(impl Into<String>)/set_next_token(Option<String>):A pagination token. If multiple pages of results are returned, use the
NextTokenvalue returned with the current page of results as the value of this parameter to get the next page of results.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<Vec<Tag>>):A list of tags, as key and value pairs, that is associated with the specified X-Ray group or sampling rule.
next_token(Option<String>):A pagination token. If multiple pages of results are returned, use the
NextTokenvalue returned with the current page of results to get the next page of results.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn put_encryption_config(&self) -> PutEncryptionConfigFluentBuilder
pub fn put_encryption_config(&self) -> PutEncryptionConfigFluentBuilder
Constructs a fluent builder for the PutEncryptionConfig operation.
- The fluent builder is configurable:
key_id(impl Into<String>)/set_key_id(Option<String>):An Amazon Web Services KMS key in one of the following formats:
-
Alias - The name of the key. For example,
alias/MyKey. -
Key ID - The KMS key ID of the key. For example,
ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. Amazon Web Services X-Ray does not support asymmetric KMS keys. -
ARN - The full Amazon Resource Name of the key ID or alias. For example,
arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. Use this format to specify a key in a different account.
Omit this key if you set
TypetoNONE.-
r#type(EncryptionType)/set_type(Option<EncryptionType>):The type of encryption. Set to
KMSto use your own key for encryption. Set toNONEfor default encryption.
- On success, responds with
PutEncryptionConfigOutputwith field(s):encryption_config(Option<EncryptionConfig>):The new encryption configuration.
- On failure, responds with
SdkError<PutEncryptionConfigError>
source§impl Client
impl Client
sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy operation.
- The fluent builder is configurable:
policy_name(impl Into<String>)/set_policy_name(Option<String>):The name of the resource policy. Must be unique within a specific Amazon Web Services account.
policy_document(impl Into<String>)/set_policy_document(Option<String>):The resource policy document, which can be up to 5kb in size.
policy_revision_id(impl Into<String>)/set_policy_revision_id(Option<String>):Specifies a specific policy revision, to ensure an atomic create operation. By default the resource policy is created if it does not exist, or updated with an incremented revision id. The revision id is unique to each policy in the account.
If the policy revision id does not match the latest revision id, the operation will fail with an
InvalidPolicyRevisionIdExceptionexception. You can also provide aPolicyRevisionIdof 0. In this case, the operation will fail with anInvalidPolicyRevisionIdExceptionexception if a resource policy with the same name already exists.bypass_policy_lockout_check(bool)/set_bypass_policy_lockout_check(Option<bool>):A flag to indicate whether to bypass the resource policy lockout safety check.
Setting this value to true increases the risk that the policy becomes unmanageable. Do not set this value to true indiscriminately.
Use this parameter only when you include a policy in the request and you intend to prevent the principal that is making the request from making a subsequent
PutResourcePolicyrequest.The default value is false.
- On success, responds with
PutResourcePolicyOutputwith field(s):resource_policy(Option<ResourcePolicy>):The resource policy document, as provided in the
PutResourcePolicyRequest.
- On failure, responds with
SdkError<PutResourcePolicyError>
source§impl Client
impl Client
sourcepub fn put_telemetry_records(&self) -> PutTelemetryRecordsFluentBuilder
pub fn put_telemetry_records(&self) -> PutTelemetryRecordsFluentBuilder
Constructs a fluent builder for the PutTelemetryRecords operation.
- The fluent builder is configurable:
- On success, responds with
PutTelemetryRecordsOutput - On failure, responds with
SdkError<PutTelemetryRecordsError>
source§impl Client
impl Client
sourcepub fn put_trace_segments(&self) -> PutTraceSegmentsFluentBuilder
pub fn put_trace_segments(&self) -> PutTraceSegmentsFluentBuilder
Constructs a fluent builder for the PutTraceSegments operation.
- The fluent builder is configurable:
trace_segment_documents(impl Into<String>)/set_trace_segment_documents(Option<Vec<String>>):A string containing a JSON document defining one or more segments or subsegments.
- On success, responds with
PutTraceSegmentsOutputwith field(s):unprocessed_trace_segments(Option<Vec<UnprocessedTraceSegment>>):Segments that failed processing.
- On failure, responds with
SdkError<PutTraceSegmentsError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.
tags(Tag)/set_tags(Option<Vec<Tag>>):A map that contains one or more tag keys and tag values to attach to an X-Ray group or sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services 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 Amazon Web Services use. You cannot edit or delete system tags.
-
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec<String>>):Keys for one or more tags that you want to remove from an X-Ray group or sampling rule.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_group(&self) -> UpdateGroupFluentBuilder
pub fn update_group(&self) -> UpdateGroupFluentBuilder
Constructs a fluent builder for the UpdateGroup operation.
- The fluent builder is configurable:
group_name(impl Into<String>)/set_group_name(Option<String>):The case-sensitive name of the group.
group_arn(impl Into<String>)/set_group_arn(Option<String>):The ARN that was generated upon creation.
filter_expression(impl Into<String>)/set_filter_expression(Option<String>):The updated filter expression defining criteria by which to group traces.
insights_configuration(InsightsConfiguration)/set_insights_configuration(Option<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 for the group. Notifications can only be enabled on a group with InsightsEnabled set to true.
-
- On success, responds with
UpdateGroupOutputwith field(s):group(Option<Group>):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.
- On failure, responds with
SdkError<UpdateGroupError>
source§impl Client
impl Client
sourcepub fn update_sampling_rule(&self) -> UpdateSamplingRuleFluentBuilder
pub fn update_sampling_rule(&self) -> UpdateSamplingRuleFluentBuilder
Constructs a fluent builder for the UpdateSamplingRule operation.
- The fluent builder is configurable:
sampling_rule_update(SamplingRuleUpdate)/set_sampling_rule_update(Option<SamplingRuleUpdate>):The rule and fields to change.
- On success, responds with
UpdateSamplingRuleOutputwith field(s):sampling_rule_record(Option<SamplingRuleRecord>):The updated rule definition and metadata.
- On failure, responds with
SdkError<UpdateSamplingRuleError>
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it.