# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common get_config new_operation new_request send_request
#' @include xray_service.R
NULL

#' You cannot find traces through this API if Transaction Search is enabled
#' since trace is not indexed in X-Ray
#'
#' @description
#' You cannot find traces through this API if Transaction Search is enabled since trace is not indexed in X-Ray.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_batch_get_traces/](https://www.paws-r-sdk.com/docs/xray_batch_get_traces/) for full documentation.
#'
#' @param TraceIds &#91;required&#93; Specify the trace IDs of requests for which to retrieve segments.
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_batch_get_traces
xray_batch_get_traces <- function(TraceIds, NextToken = NULL) {
  op <- new_operation(
    name = "BatchGetTraces",
    http_method = "POST",
    http_path = "/Traces",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "Traces", non_aggregate_keys = list("UnprocessedTraceIds")),
    stream_api = FALSE
  )
  input <- .xray$batch_get_traces_input(TraceIds = TraceIds, NextToken = NextToken)
  output <- .xray$batch_get_traces_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$batch_get_traces <- xray_batch_get_traces

#' Cancels an ongoing trace retrieval job initiated by StartTraceRetrieval
#' using the provided RetrievalToken
#'
#' @description
#' Cancels an ongoing trace retrieval job initiated by [`start_trace_retrieval`][xray_start_trace_retrieval] using the provided `RetrievalToken`. A successful cancellation will return an HTTP 200 response.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_cancel_trace_retrieval/](https://www.paws-r-sdk.com/docs/xray_cancel_trace_retrieval/) for full documentation.
#'
#' @param RetrievalToken &#91;required&#93; Retrieval token.
#'
#' @keywords internal
#'
#' @rdname xray_cancel_trace_retrieval
xray_cancel_trace_retrieval <- function(RetrievalToken) {
  op <- new_operation(
    name = "CancelTraceRetrieval",
    http_method = "POST",
    http_path = "/CancelTraceRetrieval",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$cancel_trace_retrieval_input(RetrievalToken = RetrievalToken)
  output <- .xray$cancel_trace_retrieval_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$cancel_trace_retrieval <- xray_cancel_trace_retrieval

#' Creates a group resource with a name and a filter expression
#'
#' @description
#' Creates a group resource with a name and a filter expression.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_create_group/](https://www.paws-r-sdk.com/docs/xray_create_group/) for full documentation.
#'
#' @param GroupName &#91;required&#93; The case-sensitive name of the new group. Default is a reserved name and names must be unique.
#' @param FilterExpression The filter expression defining criteria by which to group traces.
#' @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 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.
#' @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 Amazon Web Services resources](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html) 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.
#'
#' @keywords internal
#'
#' @rdname xray_create_group
xray_create_group <- function(GroupName, FilterExpression = NULL, InsightsConfiguration = NULL, Tags = NULL) {
  op <- new_operation(
    name = "CreateGroup",
    http_method = "POST",
    http_path = "/CreateGroup",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$create_group_input(GroupName = GroupName, FilterExpression = FilterExpression, InsightsConfiguration = InsightsConfiguration, Tags = Tags)
  output <- .xray$create_group_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$create_group <- xray_create_group

#' Creates a rule to control sampling behavior for instrumented
#' applications
#'
#' @description
#' Creates a rule to control sampling behavior for instrumented applications. Services retrieve rules with [`get_sampling_rules`][xray_get_sampling_rules], and evaluate each rule in ascending order of *priority* for each request. If a rule matches, the service records a trace, borrowing it from the reservoir size. After 10 seconds, the service reports back to X-Ray with [`get_sampling_targets`][xray_get_sampling_targets] to get updated versions of each in-use rule. The updated rule contains a trace quota that the service can use instead of borrowing from the reservoir.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_create_sampling_rule/](https://www.paws-r-sdk.com/docs/xray_create_sampling_rule/) for full documentation.
#'
#' @param SamplingRule &#91;required&#93; The rule definition.
#' @param Tags 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](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html) 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.
#'
#' @keywords internal
#'
#' @rdname xray_create_sampling_rule
xray_create_sampling_rule <- function(SamplingRule, Tags = NULL) {
  op <- new_operation(
    name = "CreateSamplingRule",
    http_method = "POST",
    http_path = "/CreateSamplingRule",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$create_sampling_rule_input(SamplingRule = SamplingRule, Tags = Tags)
  output <- .xray$create_sampling_rule_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$create_sampling_rule <- xray_create_sampling_rule

#' Deletes a group resource
#'
#' @description
#' Deletes a group resource.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_delete_group/](https://www.paws-r-sdk.com/docs/xray_delete_group/) for full documentation.
#'
#' @param GroupName The case-sensitive name of the group.
#' @param GroupARN The ARN of the group that was generated on creation.
#'
#' @keywords internal
#'
#' @rdname xray_delete_group
xray_delete_group <- function(GroupName = NULL, GroupARN = NULL) {
  op <- new_operation(
    name = "DeleteGroup",
    http_method = "POST",
    http_path = "/DeleteGroup",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$delete_group_input(GroupName = GroupName, GroupARN = GroupARN)
  output <- .xray$delete_group_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$delete_group <- xray_delete_group

#' Deletes a resource policy from the target Amazon Web Services account
#'
#' @description
#' Deletes a resource policy from the target Amazon Web Services account.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_delete_resource_policy/](https://www.paws-r-sdk.com/docs/xray_delete_resource_policy/) for full documentation.
#'
#' @param PolicyName &#91;required&#93; The name of the resource policy to delete.
#' @param PolicyRevisionId Specifies a specific policy revision to delete. Provide a `PolicyRevisionId` to ensure an atomic delete operation. If the provided revision id does not match the latest policy revision id, an `InvalidPolicyRevisionIdException` exception is returned.
#'
#' @keywords internal
#'
#' @rdname xray_delete_resource_policy
xray_delete_resource_policy <- function(PolicyName, PolicyRevisionId = NULL) {
  op <- new_operation(
    name = "DeleteResourcePolicy",
    http_method = "POST",
    http_path = "/DeleteResourcePolicy",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$delete_resource_policy_input(PolicyName = PolicyName, PolicyRevisionId = PolicyRevisionId)
  output <- .xray$delete_resource_policy_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$delete_resource_policy <- xray_delete_resource_policy

#' Deletes a sampling rule
#'
#' @description
#' Deletes a sampling rule.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_delete_sampling_rule/](https://www.paws-r-sdk.com/docs/xray_delete_sampling_rule/) for full documentation.
#'
#' @param RuleName The name of the sampling rule. Specify a rule by either name or ARN, but not both.
#' @param RuleARN The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
#'
#' @keywords internal
#'
#' @rdname xray_delete_sampling_rule
xray_delete_sampling_rule <- function(RuleName = NULL, RuleARN = NULL) {
  op <- new_operation(
    name = "DeleteSamplingRule",
    http_method = "POST",
    http_path = "/DeleteSamplingRule",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$delete_sampling_rule_input(RuleName = RuleName, RuleARN = RuleARN)
  output <- .xray$delete_sampling_rule_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$delete_sampling_rule <- xray_delete_sampling_rule

#' Retrieves the current encryption configuration for X-Ray data
#'
#' @description
#' Retrieves the current encryption configuration for X-Ray data.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_encryption_config/](https://www.paws-r-sdk.com/docs/xray_get_encryption_config/) for full documentation.
#'

#'
#' @keywords internal
#'
#' @rdname xray_get_encryption_config
xray_get_encryption_config <- function() {
  op <- new_operation(
    name = "GetEncryptionConfig",
    http_method = "POST",
    http_path = "/EncryptionConfig",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_encryption_config_input()
  output <- .xray$get_encryption_config_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_encryption_config <- xray_get_encryption_config

#' Retrieves group resource details
#'
#' @description
#' Retrieves group resource details.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_group/](https://www.paws-r-sdk.com/docs/xray_get_group/) for full documentation.
#'
#' @param GroupName The case-sensitive name of the group.
#' @param GroupARN The ARN of the group that was generated on creation.
#'
#' @keywords internal
#'
#' @rdname xray_get_group
xray_get_group <- function(GroupName = NULL, GroupARN = NULL) {
  op <- new_operation(
    name = "GetGroup",
    http_method = "POST",
    http_path = "/GetGroup",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_group_input(GroupName = GroupName, GroupARN = GroupARN)
  output <- .xray$get_group_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_group <- xray_get_group

#' Retrieves all active group details
#'
#' @description
#' Retrieves all active group details.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_groups/](https://www.paws-r-sdk.com/docs/xray_get_groups/) for full documentation.
#'
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_groups
xray_get_groups <- function(NextToken = NULL) {
  op <- new_operation(
    name = "GetGroups",
    http_method = "POST",
    http_path = "/Groups",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "Groups"),
    stream_api = FALSE
  )
  input <- .xray$get_groups_input(NextToken = NextToken)
  output <- .xray$get_groups_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_groups <- xray_get_groups

#' Retrieves all indexing rules
#'
#' @description
#' Retrieves all indexing rules.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_indexing_rules/](https://www.paws-r-sdk.com/docs/xray_get_indexing_rules/) for full documentation.
#'
#' @param NextToken Specify the pagination token returned by a previous request to retrieve the next page of indexes.
#'
#' @keywords internal
#'
#' @rdname xray_get_indexing_rules
xray_get_indexing_rules <- function(NextToken = NULL) {
  op <- new_operation(
    name = "GetIndexingRules",
    http_method = "POST",
    http_path = "/GetIndexingRules",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_indexing_rules_input(NextToken = NextToken)
  output <- .xray$get_indexing_rules_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_indexing_rules <- xray_get_indexing_rules

#' Retrieves the summary information of an insight
#'
#' @description
#' Retrieves the summary information of an insight. This includes impact to clients and root cause services, the top anomalous services, the category, the state of the insight, and the start and end time of the insight.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_insight/](https://www.paws-r-sdk.com/docs/xray_get_insight/) for full documentation.
#'
#' @param InsightId &#91;required&#93; The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
#'
#' @keywords internal
#'
#' @rdname xray_get_insight
xray_get_insight <- function(InsightId) {
  op <- new_operation(
    name = "GetInsight",
    http_method = "POST",
    http_path = "/Insight",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_insight_input(InsightId = InsightId)
  output <- .xray$get_insight_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_insight <- xray_get_insight

#' X-Ray reevaluates insights periodically until they're resolved, and
#' records each intermediate state as an event
#'
#' @description
#' X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event. You can review an insight's events in the Impact Timeline on the Inspect page in the X-Ray console.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_insight_events/](https://www.paws-r-sdk.com/docs/xray_get_insight_events/) for full documentation.
#'
#' @param InsightId &#91;required&#93; The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
#' @param MaxResults Used to retrieve at most the specified value of events.
#' @param NextToken Specify the pagination token returned by a previous request to retrieve the next page of events.
#'
#' @keywords internal
#'
#' @rdname xray_get_insight_events
xray_get_insight_events <- function(InsightId, MaxResults = NULL, NextToken = NULL) {
  op <- new_operation(
    name = "GetInsightEvents",
    http_method = "POST",
    http_path = "/InsightEvents",
    host_prefix = "",
    paginator = list(input_token = "NextToken", limit_key = "MaxResults", output_token = "NextToken"),
    stream_api = FALSE
  )
  input <- .xray$get_insight_events_input(InsightId = InsightId, MaxResults = MaxResults, NextToken = NextToken)
  output <- .xray$get_insight_events_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_insight_events <- xray_get_insight_events

#' Retrieves a service graph structure filtered by the specified insight
#'
#' @description
#' Retrieves a service graph structure filtered by the specified insight. The service graph is limited to only structural information. For a complete service graph, use this API with the GetServiceGraph API.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_insight_impact_graph/](https://www.paws-r-sdk.com/docs/xray_get_insight_impact_graph/) for full documentation.
#'
#' @param InsightId &#91;required&#93; The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
#' @param StartTime &#91;required&#93; 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.
#' @param EndTime &#91;required&#93; 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.
#' @param NextToken Specify the pagination token returned by a previous request to retrieve the next page of results.
#'
#' @keywords internal
#'
#' @rdname xray_get_insight_impact_graph
xray_get_insight_impact_graph <- function(InsightId, StartTime, EndTime, NextToken = NULL) {
  op <- new_operation(
    name = "GetInsightImpactGraph",
    http_method = "POST",
    http_path = "/InsightImpactGraph",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_insight_impact_graph_input(InsightId = InsightId, StartTime = StartTime, EndTime = EndTime, NextToken = NextToken)
  output <- .xray$get_insight_impact_graph_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_insight_impact_graph <- xray_get_insight_impact_graph

#' Retrieves the summaries of all insights in the specified group matching
#' the provided filter values
#'
#' @description
#' Retrieves the summaries of all insights in the specified group matching the provided filter values.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_insight_summaries/](https://www.paws-r-sdk.com/docs/xray_get_insight_summaries/) for full documentation.
#'
#' @param States The list of insight states.
#' @param GroupARN The Amazon Resource Name (ARN) of the group. Required if the GroupName isn't provided.
#' @param GroupName The name of the group. Required if the GroupARN isn't provided.
#' @param StartTime &#91;required&#93; The beginning of the time frame in which the insights started. The start time can't be more than 30 days old.
#' @param EndTime &#91;required&#93; The end of the time frame in which the insights ended. The end time can't be more than 30 days old.
#' @param MaxResults The maximum number of results to display.
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_insight_summaries
xray_get_insight_summaries <- function(States = NULL, GroupARN = NULL, GroupName = NULL, StartTime, EndTime, MaxResults = NULL, NextToken = NULL) {
  op <- new_operation(
    name = "GetInsightSummaries",
    http_method = "POST",
    http_path = "/InsightSummaries",
    host_prefix = "",
    paginator = list(input_token = "NextToken", limit_key = "MaxResults", output_token = "NextToken"),
    stream_api = FALSE
  )
  input <- .xray$get_insight_summaries_input(States = States, GroupARN = GroupARN, GroupName = GroupName, StartTime = StartTime, EndTime = EndTime, MaxResults = MaxResults, NextToken = NextToken)
  output <- .xray$get_insight_summaries_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_insight_summaries <- xray_get_insight_summaries

#' Retrieves a service graph for traces based on the specified
#' RetrievalToken from the CloudWatch log group generated by Transaction
#' Search
#'
#' @description
#' Retrieves a service graph for traces based on the specified `RetrievalToken` from the CloudWatch log group generated by Transaction Search. This API does not initiate a retrieval job. You must first execute [`start_trace_retrieval`][xray_start_trace_retrieval] to obtain the required `RetrievalToken`.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_retrieved_traces_graph/](https://www.paws-r-sdk.com/docs/xray_get_retrieved_traces_graph/) for full documentation.
#'
#' @param RetrievalToken &#91;required&#93; Retrieval token.
#' @param NextToken Specify the pagination token returned by a previous request to retrieve the next page of indexes.
#'
#' @keywords internal
#'
#' @rdname xray_get_retrieved_traces_graph
xray_get_retrieved_traces_graph <- function(RetrievalToken, NextToken = NULL) {
  op <- new_operation(
    name = "GetRetrievedTracesGraph",
    http_method = "POST",
    http_path = "/GetRetrievedTracesGraph",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_retrieved_traces_graph_input(RetrievalToken = RetrievalToken, NextToken = NextToken)
  output <- .xray$get_retrieved_traces_graph_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_retrieved_traces_graph <- xray_get_retrieved_traces_graph

#' Retrieves all sampling rules
#'
#' @description
#' Retrieves all sampling rules.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_sampling_rules/](https://www.paws-r-sdk.com/docs/xray_get_sampling_rules/) for full documentation.
#'
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_sampling_rules
xray_get_sampling_rules <- function(NextToken = NULL) {
  op <- new_operation(
    name = "GetSamplingRules",
    http_method = "POST",
    http_path = "/GetSamplingRules",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "SamplingRuleRecords"),
    stream_api = FALSE
  )
  input <- .xray$get_sampling_rules_input(NextToken = NextToken)
  output <- .xray$get_sampling_rules_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_sampling_rules <- xray_get_sampling_rules

#' Retrieves information about recent sampling results for all sampling
#' rules
#'
#' @description
#' Retrieves information about recent sampling results for all sampling rules.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_sampling_statistic_summaries/](https://www.paws-r-sdk.com/docs/xray_get_sampling_statistic_summaries/) for full documentation.
#'
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_sampling_statistic_summaries
xray_get_sampling_statistic_summaries <- function(NextToken = NULL) {
  op <- new_operation(
    name = "GetSamplingStatisticSummaries",
    http_method = "POST",
    http_path = "/SamplingStatisticSummaries",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "SamplingStatisticSummaries"),
    stream_api = FALSE
  )
  input <- .xray$get_sampling_statistic_summaries_input(NextToken = NextToken)
  output <- .xray$get_sampling_statistic_summaries_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_sampling_statistic_summaries <- xray_get_sampling_statistic_summaries

#' Requests a sampling quota for rules that the service is using to sample
#' requests
#'
#' @description
#' Requests a sampling quota for rules that the service is using to sample requests.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_sampling_targets/](https://www.paws-r-sdk.com/docs/xray_get_sampling_targets/) for full documentation.
#'
#' @param SamplingStatisticsDocuments &#91;required&#93; Information about rules that the service is using to sample requests.
#' @param SamplingBoostStatisticsDocuments Information about rules that the service is using to boost sampling rate.
#'
#' @keywords internal
#'
#' @rdname xray_get_sampling_targets
xray_get_sampling_targets <- function(SamplingStatisticsDocuments, SamplingBoostStatisticsDocuments = NULL) {
  op <- new_operation(
    name = "GetSamplingTargets",
    http_method = "POST",
    http_path = "/SamplingTargets",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_sampling_targets_input(SamplingStatisticsDocuments = SamplingStatisticsDocuments, SamplingBoostStatisticsDocuments = SamplingBoostStatisticsDocuments)
  output <- .xray$get_sampling_targets_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_sampling_targets <- xray_get_sampling_targets

#' Retrieves a document that describes services that process incoming
#' requests, and downstream services that they call as a result
#'
#' @description
#' Retrieves a document that describes services that process incoming requests, and downstream services that they call as a result. Root services process incoming requests and make calls to downstream services. Root services are applications that use the [Amazon Web Services X-Ray SDK](https://docs.aws.amazon.com/xray/). Downstream services can be other applications, Amazon Web Services resources, HTTP web APIs, or SQL databases.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_service_graph/](https://www.paws-r-sdk.com/docs/xray_get_service_graph/) for full documentation.
#'
#' @param StartTime &#91;required&#93; The start of the time frame for which to generate a graph.
#' @param EndTime &#91;required&#93; The end of the timeframe for which to generate a graph.
#' @param GroupName The name of a group based on which you want to generate a graph.
#' @param GroupARN The Amazon Resource Name (ARN) of a group based on which you want to generate a graph.
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_service_graph
xray_get_service_graph <- function(StartTime, EndTime, GroupName = NULL, GroupARN = NULL, NextToken = NULL) {
  op <- new_operation(
    name = "GetServiceGraph",
    http_method = "POST",
    http_path = "/ServiceGraph",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "Services", non_aggregate_keys = list("StartTime", "EndTime", "ContainsOldGroupVersions")),
    stream_api = FALSE
  )
  input <- .xray$get_service_graph_input(StartTime = StartTime, EndTime = EndTime, GroupName = GroupName, GroupARN = GroupARN, NextToken = NextToken)
  output <- .xray$get_service_graph_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_service_graph <- xray_get_service_graph

#' Get an aggregation of service statistics defined by a specific time
#' range
#'
#' @description
#' Get an aggregation of service statistics defined by a specific time range.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_time_series_service_statistics/](https://www.paws-r-sdk.com/docs/xray_get_time_series_service_statistics/) for full documentation.
#'
#' @param StartTime &#91;required&#93; The start of the time frame for which to aggregate statistics.
#' @param EndTime &#91;required&#93; The end of the time frame for which to aggregate statistics.
#' @param GroupName The case-sensitive name of the group for which to pull statistics from.
#' @param GroupARN The Amazon Resource Name (ARN) of the group for which to pull statistics from.
#' @param EntitySelectorExpression 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.
#' @param Period Aggregation period in seconds.
#' @param ForecastStatistics The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_time_series_service_statistics
xray_get_time_series_service_statistics <- function(StartTime, EndTime, GroupName = NULL, GroupARN = NULL, EntitySelectorExpression = NULL, Period = NULL, ForecastStatistics = NULL, NextToken = NULL) {
  op <- new_operation(
    name = "GetTimeSeriesServiceStatistics",
    http_method = "POST",
    http_path = "/TimeSeriesServiceStatistics",
    host_prefix = "",
    paginator = list(input_token = "NextToken", non_aggregate_keys = list("ContainsOldGroupVersions"), output_token = "NextToken", result_key = "TimeSeriesServiceStatistics"),
    stream_api = FALSE
  )
  input <- .xray$get_time_series_service_statistics_input(StartTime = StartTime, EndTime = EndTime, GroupName = GroupName, GroupARN = GroupARN, EntitySelectorExpression = EntitySelectorExpression, Period = Period, ForecastStatistics = ForecastStatistics, NextToken = NextToken)
  output <- .xray$get_time_series_service_statistics_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_time_series_service_statistics <- xray_get_time_series_service_statistics

#' Retrieves a service graph for one or more specific trace IDs
#'
#' @description
#' Retrieves a service graph for one or more specific trace IDs.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_trace_graph/](https://www.paws-r-sdk.com/docs/xray_get_trace_graph/) for full documentation.
#'
#' @param TraceIds &#91;required&#93; Trace IDs of requests for which to generate a service graph.
#' @param NextToken Pagination token.
#'
#' @keywords internal
#'
#' @rdname xray_get_trace_graph
xray_get_trace_graph <- function(TraceIds, NextToken = NULL) {
  op <- new_operation(
    name = "GetTraceGraph",
    http_method = "POST",
    http_path = "/TraceGraph",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "Services"),
    stream_api = FALSE
  )
  input <- .xray$get_trace_graph_input(TraceIds = TraceIds, NextToken = NextToken)
  output <- .xray$get_trace_graph_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_trace_graph <- xray_get_trace_graph

#' Retrieves the current destination of data sent to PutTraceSegments and
#' OpenTelemetry protocol (OTLP) endpoint
#'
#' @description
#' Retrieves the current destination of data sent to [`put_trace_segments`][xray_put_trace_segments] and *OpenTelemetry protocol (OTLP)* endpoint. The Transaction Search feature requires a CloudWatchLogs destination. For more information, see [Transaction Search](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html) and [OpenTelemetry](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OpenTelemetry-Sections.html).
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_trace_segment_destination/](https://www.paws-r-sdk.com/docs/xray_get_trace_segment_destination/) for full documentation.
#'

#'
#' @keywords internal
#'
#' @rdname xray_get_trace_segment_destination
xray_get_trace_segment_destination <- function() {
  op <- new_operation(
    name = "GetTraceSegmentDestination",
    http_method = "POST",
    http_path = "/GetTraceSegmentDestination",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$get_trace_segment_destination_input()
  output <- .xray$get_trace_segment_destination_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_trace_segment_destination <- xray_get_trace_segment_destination

#' Retrieves IDs and annotations for traces available for a specified time
#' frame using an optional filter
#'
#' @description
#' Retrieves IDs and annotations for traces available for a specified time frame using an optional filter. To get the full traces, pass the trace IDs to [`batch_get_traces`][xray_batch_get_traces].
#'
#' See [https://www.paws-r-sdk.com/docs/xray_get_trace_summaries/](https://www.paws-r-sdk.com/docs/xray_get_trace_summaries/) for full documentation.
#'
#' @param StartTime &#91;required&#93; The start of the time frame for which to retrieve traces.
#' @param EndTime &#91;required&#93; The end of the time frame for which to retrieve traces.
#' @param TimeRangeType Query trace summaries by TraceId (trace start time), Event (trace update time), or Service (trace segment end time).
#' @param Sampling Set to `true` to get summaries for only a subset of available traces.
#' @param SamplingStrategy A parameter to indicate whether to enable sampling on trace summaries. Input parameters are Name and Value.
#' @param FilterExpression Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.
#' @param NextToken Specify the pagination token returned by a previous request to retrieve the next page of results.
#'
#' @keywords internal
#'
#' @rdname xray_get_trace_summaries
xray_get_trace_summaries <- function(StartTime, EndTime, TimeRangeType = NULL, Sampling = NULL, SamplingStrategy = NULL, FilterExpression = NULL, NextToken = NULL) {
  op <- new_operation(
    name = "GetTraceSummaries",
    http_method = "POST",
    http_path = "/TraceSummaries",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "TraceSummaries", non_aggregate_keys = list("TracesProcessedCount", "ApproximateTime")),
    stream_api = FALSE
  )
  input <- .xray$get_trace_summaries_input(StartTime = StartTime, EndTime = EndTime, TimeRangeType = TimeRangeType, Sampling = Sampling, SamplingStrategy = SamplingStrategy, FilterExpression = FilterExpression, NextToken = NextToken)
  output <- .xray$get_trace_summaries_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$get_trace_summaries <- xray_get_trace_summaries

#' Returns the list of resource policies in the target Amazon Web Services
#' account
#'
#' @description
#' Returns the list of resource policies in the target Amazon Web Services account.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_list_resource_policies/](https://www.paws-r-sdk.com/docs/xray_list_resource_policies/) for full documentation.
#'
#' @param NextToken Not currently supported.
#'
#' @keywords internal
#'
#' @rdname xray_list_resource_policies
xray_list_resource_policies <- function(NextToken = NULL) {
  op <- new_operation(
    name = "ListResourcePolicies",
    http_method = "POST",
    http_path = "/ListResourcePolicies",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "ResourcePolicies"),
    stream_api = FALSE
  )
  input <- .xray$list_resource_policies_input(NextToken = NextToken)
  output <- .xray$list_resource_policies_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$list_resource_policies <- xray_list_resource_policies

#' Retrieves a list of traces for a given RetrievalToken from the
#' CloudWatch log group generated by Transaction Search
#'
#' @description
#' Retrieves a list of traces for a given `RetrievalToken` from the CloudWatch log group generated by Transaction Search. For information on what each trace returns, see [`batch_get_traces`][xray_batch_get_traces].
#'
#' See [https://www.paws-r-sdk.com/docs/xray_list_retrieved_traces/](https://www.paws-r-sdk.com/docs/xray_list_retrieved_traces/) for full documentation.
#'
#' @param RetrievalToken &#91;required&#93; Retrieval token.
#' @param TraceFormat Format of the requested traces.
#' @param NextToken Specify the pagination token returned by a previous request to retrieve the next page of indexes.
#'
#' @keywords internal
#'
#' @rdname xray_list_retrieved_traces
xray_list_retrieved_traces <- function(RetrievalToken, TraceFormat = NULL, NextToken = NULL) {
  op <- new_operation(
    name = "ListRetrievedTraces",
    http_method = "POST",
    http_path = "/ListRetrievedTraces",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$list_retrieved_traces_input(RetrievalToken = RetrievalToken, TraceFormat = TraceFormat, NextToken = NextToken)
  output <- .xray$list_retrieved_traces_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$list_retrieved_traces <- xray_list_retrieved_traces

#' Returns a list of tags that are applied to the specified Amazon Web
#' Services X-Ray group or sampling rule
#'
#' @description
#' Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_list_tags_for_resource/](https://www.paws-r-sdk.com/docs/xray_list_tags_for_resource/) for full documentation.
#'
#' @param ResourceARN &#91;required&#93; The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.
#' @param NextToken A pagination token. If multiple pages of results are returned, use the `NextToken` value returned with the current page of results as the value of this parameter to get the next page of results.
#'
#' @keywords internal
#'
#' @rdname xray_list_tags_for_resource
xray_list_tags_for_resource <- function(ResourceARN, NextToken = NULL) {
  op <- new_operation(
    name = "ListTagsForResource",
    http_method = "POST",
    http_path = "/ListTagsForResource",
    host_prefix = "",
    paginator = list(input_token = "NextToken", output_token = "NextToken", result_key = "Tags"),
    stream_api = FALSE
  )
  input <- .xray$list_tags_for_resource_input(ResourceARN = ResourceARN, NextToken = NextToken)
  output <- .xray$list_tags_for_resource_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$list_tags_for_resource <- xray_list_tags_for_resource

#' Updates the encryption configuration for X-Ray data
#'
#' @description
#' Updates the encryption configuration for X-Ray data.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_put_encryption_config/](https://www.paws-r-sdk.com/docs/xray_put_encryption_config/) for full documentation.
#'
#' @param KeyId 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 `Type` to `NONE`.
#' @param Type &#91;required&#93; The type of encryption. Set to `KMS` to use your own key for encryption. Set to `NONE` for default encryption.
#'
#' @keywords internal
#'
#' @rdname xray_put_encryption_config
xray_put_encryption_config <- function(KeyId = NULL, Type) {
  op <- new_operation(
    name = "PutEncryptionConfig",
    http_method = "POST",
    http_path = "/PutEncryptionConfig",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$put_encryption_config_input(KeyId = KeyId, Type = Type)
  output <- .xray$put_encryption_config_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$put_encryption_config <- xray_put_encryption_config

#' Sets the resource policy to grant one or more Amazon Web Services
#' services and accounts permissions to access X-Ray
#'
#' @description
#' Sets the resource policy to grant one or more Amazon Web Services services and accounts permissions to access X-Ray. Each resource policy will be associated with a specific Amazon Web Services account. Each Amazon Web Services account can have a maximum of 5 resource policies, and each policy name must be unique within that account. The maximum size of each resource policy is 5KB.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_put_resource_policy/](https://www.paws-r-sdk.com/docs/xray_put_resource_policy/) for full documentation.
#'
#' @param PolicyName &#91;required&#93; The name of the resource policy. Must be unique within a specific Amazon Web Services account.
#' @param PolicyDocument &#91;required&#93; The resource policy document, which can be up to 5kb in size.
#' @param PolicyRevisionId 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 `InvalidPolicyRevisionIdException` exception. You can also provide a `PolicyRevisionId` of 0. In this case, the operation will fail with an `InvalidPolicyRevisionIdException` exception if a resource policy with the same name already exists.
#' @param BypassPolicyLockoutCheck 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 [`put_resource_policy`][xray_put_resource_policy] request.
#' 
#' The default value is false.
#'
#' @keywords internal
#'
#' @rdname xray_put_resource_policy
xray_put_resource_policy <- function(PolicyName, PolicyDocument, PolicyRevisionId = NULL, BypassPolicyLockoutCheck = NULL) {
  op <- new_operation(
    name = "PutResourcePolicy",
    http_method = "POST",
    http_path = "/PutResourcePolicy",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$put_resource_policy_input(PolicyName = PolicyName, PolicyDocument = PolicyDocument, PolicyRevisionId = PolicyRevisionId, BypassPolicyLockoutCheck = BypassPolicyLockoutCheck)
  output <- .xray$put_resource_policy_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$put_resource_policy <- xray_put_resource_policy

#' Used by the Amazon Web Services X-Ray daemon to upload telemetry
#'
#' @description
#' Used by the Amazon Web Services X-Ray daemon to upload telemetry.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_put_telemetry_records/](https://www.paws-r-sdk.com/docs/xray_put_telemetry_records/) for full documentation.
#'
#' @param TelemetryRecords &#91;required&#93; 
#' @param EC2InstanceId 
#' @param Hostname 
#' @param ResourceARN 
#'
#' @keywords internal
#'
#' @rdname xray_put_telemetry_records
xray_put_telemetry_records <- function(TelemetryRecords, EC2InstanceId = NULL, Hostname = NULL, ResourceARN = NULL) {
  op <- new_operation(
    name = "PutTelemetryRecords",
    http_method = "POST",
    http_path = "/TelemetryRecords",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$put_telemetry_records_input(TelemetryRecords = TelemetryRecords, EC2InstanceId = EC2InstanceId, Hostname = Hostname, ResourceARN = ResourceARN)
  output <- .xray$put_telemetry_records_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$put_telemetry_records <- xray_put_telemetry_records

#' Uploads segment documents to Amazon Web Services X-Ray
#'
#' @description
#' Uploads segment documents to Amazon Web Services X-Ray. A segment document can be a completed segment, an in-progress segment, or an array of subsegments.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_put_trace_segments/](https://www.paws-r-sdk.com/docs/xray_put_trace_segments/) for full documentation.
#'
#' @param TraceSegmentDocuments &#91;required&#93; A string containing a JSON document defining one or more segments or subsegments.
#'
#' @keywords internal
#'
#' @rdname xray_put_trace_segments
xray_put_trace_segments <- function(TraceSegmentDocuments) {
  op <- new_operation(
    name = "PutTraceSegments",
    http_method = "POST",
    http_path = "/TraceSegments",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$put_trace_segments_input(TraceSegmentDocuments = TraceSegmentDocuments)
  output <- .xray$put_trace_segments_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$put_trace_segments <- xray_put_trace_segments

#' Initiates a trace retrieval process using the specified time range and
#' for the given trace IDs in the Transaction Search generated CloudWatch
#' log group
#'
#' @description
#' Initiates a trace retrieval process using the specified time range and for the given trace IDs in the Transaction Search generated CloudWatch log group. For more information, see [Transaction Search](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html).
#'
#' See [https://www.paws-r-sdk.com/docs/xray_start_trace_retrieval/](https://www.paws-r-sdk.com/docs/xray_start_trace_retrieval/) for full documentation.
#'
#' @param TraceIds &#91;required&#93; Specify the trace IDs of the traces to be retrieved.
#' @param StartTime &#91;required&#93; The start of the time range to retrieve traces. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
#' @param EndTime &#91;required&#93; The end of the time range to retrieve traces. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
#'
#' @keywords internal
#'
#' @rdname xray_start_trace_retrieval
xray_start_trace_retrieval <- function(TraceIds, StartTime, EndTime) {
  op <- new_operation(
    name = "StartTraceRetrieval",
    http_method = "POST",
    http_path = "/StartTraceRetrieval",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$start_trace_retrieval_input(TraceIds = TraceIds, StartTime = StartTime, EndTime = EndTime)
  output <- .xray$start_trace_retrieval_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$start_trace_retrieval <- xray_start_trace_retrieval

#' Applies tags to an existing Amazon Web Services X-Ray group or sampling
#' rule
#'
#' @description
#' Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_tag_resource/](https://www.paws-r-sdk.com/docs/xray_tag_resource/) for full documentation.
#'
#' @param ResourceARN &#91;required&#93; The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.
#' @param Tags &#91;required&#93; 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](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html) 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.
#'
#' @keywords internal
#'
#' @rdname xray_tag_resource
xray_tag_resource <- function(ResourceARN, Tags) {
  op <- new_operation(
    name = "TagResource",
    http_method = "POST",
    http_path = "/TagResource",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$tag_resource_input(ResourceARN = ResourceARN, Tags = Tags)
  output <- .xray$tag_resource_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$tag_resource <- xray_tag_resource

#' Removes tags from an Amazon Web Services X-Ray group or sampling rule
#'
#' @description
#' Removes tags from an Amazon Web Services X-Ray group or sampling rule. You cannot edit or delete system tags (those with an `aws:` prefix).
#'
#' See [https://www.paws-r-sdk.com/docs/xray_untag_resource/](https://www.paws-r-sdk.com/docs/xray_untag_resource/) for full documentation.
#'
#' @param ResourceARN &#91;required&#93; The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.
#' @param TagKeys &#91;required&#93; Keys for one or more tags that you want to remove from an X-Ray group or sampling rule.
#'
#' @keywords internal
#'
#' @rdname xray_untag_resource
xray_untag_resource <- function(ResourceARN, TagKeys) {
  op <- new_operation(
    name = "UntagResource",
    http_method = "POST",
    http_path = "/UntagResource",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$untag_resource_input(ResourceARN = ResourceARN, TagKeys = TagKeys)
  output <- .xray$untag_resource_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$untag_resource <- xray_untag_resource

#' Updates a group resource
#'
#' @description
#' Updates a group resource.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_update_group/](https://www.paws-r-sdk.com/docs/xray_update_group/) for full documentation.
#'
#' @param GroupName The case-sensitive name of the group.
#' @param GroupARN The ARN that was generated upon creation.
#' @param FilterExpression The updated filter expression defining criteria by which to group traces.
#' @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 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.
#'
#' @keywords internal
#'
#' @rdname xray_update_group
xray_update_group <- function(GroupName = NULL, GroupARN = NULL, FilterExpression = NULL, InsightsConfiguration = NULL) {
  op <- new_operation(
    name = "UpdateGroup",
    http_method = "POST",
    http_path = "/UpdateGroup",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$update_group_input(GroupName = GroupName, GroupARN = GroupARN, FilterExpression = FilterExpression, InsightsConfiguration = InsightsConfiguration)
  output <- .xray$update_group_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$update_group <- xray_update_group

#' Modifies an indexing rule’s configuration
#'
#' @description
#' Modifies an indexing rule’s configuration.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_update_indexing_rule/](https://www.paws-r-sdk.com/docs/xray_update_indexing_rule/) for full documentation.
#'
#' @param Name &#91;required&#93; Name of the indexing rule to be updated.
#' @param Rule &#91;required&#93; Rule configuration to be updated.
#'
#' @keywords internal
#'
#' @rdname xray_update_indexing_rule
xray_update_indexing_rule <- function(Name, Rule) {
  op <- new_operation(
    name = "UpdateIndexingRule",
    http_method = "POST",
    http_path = "/UpdateIndexingRule",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$update_indexing_rule_input(Name = Name, Rule = Rule)
  output <- .xray$update_indexing_rule_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$update_indexing_rule <- xray_update_indexing_rule

#' Modifies a sampling rule's configuration
#'
#' @description
#' Modifies a sampling rule's configuration.
#'
#' See [https://www.paws-r-sdk.com/docs/xray_update_sampling_rule/](https://www.paws-r-sdk.com/docs/xray_update_sampling_rule/) for full documentation.
#'
#' @param SamplingRuleUpdate &#91;required&#93; The rule and fields to change.
#'
#' @keywords internal
#'
#' @rdname xray_update_sampling_rule
xray_update_sampling_rule <- function(SamplingRuleUpdate) {
  op <- new_operation(
    name = "UpdateSamplingRule",
    http_method = "POST",
    http_path = "/UpdateSamplingRule",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$update_sampling_rule_input(SamplingRuleUpdate = SamplingRuleUpdate)
  output <- .xray$update_sampling_rule_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$update_sampling_rule <- xray_update_sampling_rule

#' Modifies the destination of data sent to PutTraceSegments
#'
#' @description
#' Modifies the destination of data sent to [`put_trace_segments`][xray_put_trace_segments]. The Transaction Search feature requires the CloudWatchLogs destination. For more information, see [Transaction Search](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html).
#'
#' See [https://www.paws-r-sdk.com/docs/xray_update_trace_segment_destination/](https://www.paws-r-sdk.com/docs/xray_update_trace_segment_destination/) for full documentation.
#'
#' @param Destination The configured destination of trace segments.
#'
#' @keywords internal
#'
#' @rdname xray_update_trace_segment_destination
xray_update_trace_segment_destination <- function(Destination = NULL) {
  op <- new_operation(
    name = "UpdateTraceSegmentDestination",
    http_method = "POST",
    http_path = "/UpdateTraceSegmentDestination",
    host_prefix = "",
    paginator = list(),
    stream_api = FALSE
  )
  input <- .xray$update_trace_segment_destination_input(Destination = Destination)
  output <- .xray$update_trace_segment_destination_output()
  config <- get_config()
  svc <- .xray$service(config, op)
  request <- new_request(svc, op, input, output)
  response <- send_request(request)
  return(response)
}
.xray$operations$update_trace_segment_destination <- xray_update_trace_segment_destination
