1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package xray 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12) 13 14const opBatchGetTraces = "BatchGetTraces" 15 16// BatchGetTracesRequest generates a "aws/request.Request" representing the 17// client's request for the BatchGetTraces operation. The "output" return 18// value will be populated with the request's response once the request completes 19// successfuly. 20// 21// Use "Send" method on the returned Request to send the API call to the service. 22// the "output" return value is not valid until after Send returns without error. 23// 24// See BatchGetTraces for more information on using the BatchGetTraces 25// API call, and error handling. 26// 27// This method is useful when you want to inject custom logic or configuration 28// into the SDK's request lifecycle. Such as custom headers, or retry logic. 29// 30// 31// // Example sending a request using the BatchGetTracesRequest method. 32// req, resp := client.BatchGetTracesRequest(params) 33// 34// err := req.Send() 35// if err == nil { // resp is now filled 36// fmt.Println(resp) 37// } 38// 39// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTraces 40func (c *XRay) BatchGetTracesRequest(input *BatchGetTracesInput) (req *request.Request, output *BatchGetTracesOutput) { 41 op := &request.Operation{ 42 Name: opBatchGetTraces, 43 HTTPMethod: "POST", 44 HTTPPath: "/Traces", 45 Paginator: &request.Paginator{ 46 InputTokens: []string{"NextToken"}, 47 OutputTokens: []string{"NextToken"}, 48 LimitToken: "", 49 TruncationToken: "", 50 }, 51 } 52 53 if input == nil { 54 input = &BatchGetTracesInput{} 55 } 56 57 output = &BatchGetTracesOutput{} 58 req = c.newRequest(op, input, output) 59 return 60} 61 62// BatchGetTraces API operation for AWS X-Ray. 63// 64// Retrieves a list of traces specified by ID. Each trace is a collection of 65// segment documents that originates from a single request. Use GetTraceSummaries 66// to get a list of trace IDs. 67// 68// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 69// with awserr.Error's Code and Message methods to get detailed information about 70// the error. 71// 72// See the AWS API reference guide for AWS X-Ray's 73// API operation BatchGetTraces for usage and error information. 74// 75// Returned Error Codes: 76// * ErrCodeInvalidRequestException "InvalidRequestException" 77// The request is missing required parameters or has invalid parameters. 78// 79// * ErrCodeThrottledException "ThrottledException" 80// The request exceeds the maximum number of requests per second. 81// 82// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTraces 83func (c *XRay) BatchGetTraces(input *BatchGetTracesInput) (*BatchGetTracesOutput, error) { 84 req, out := c.BatchGetTracesRequest(input) 85 return out, req.Send() 86} 87 88// BatchGetTracesWithContext is the same as BatchGetTraces with the addition of 89// the ability to pass a context and additional request options. 90// 91// See BatchGetTraces for details on how to use this API operation. 92// 93// The context must be non-nil and will be used for request cancellation. If 94// the context is nil a panic will occur. In the future the SDK may create 95// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 96// for more information on using Contexts. 97func (c *XRay) BatchGetTracesWithContext(ctx aws.Context, input *BatchGetTracesInput, opts ...request.Option) (*BatchGetTracesOutput, error) { 98 req, out := c.BatchGetTracesRequest(input) 99 req.SetContext(ctx) 100 req.ApplyOptions(opts...) 101 return out, req.Send() 102} 103 104// BatchGetTracesPages iterates over the pages of a BatchGetTraces operation, 105// calling the "fn" function with the response data for each page. To stop 106// iterating, return false from the fn function. 107// 108// See BatchGetTraces method for more information on how to use this operation. 109// 110// Note: This operation can generate multiple requests to a service. 111// 112// // Example iterating over at most 3 pages of a BatchGetTraces operation. 113// pageNum := 0 114// err := client.BatchGetTracesPages(params, 115// func(page *BatchGetTracesOutput, lastPage bool) bool { 116// pageNum++ 117// fmt.Println(page) 118// return pageNum <= 3 119// }) 120// 121func (c *XRay) BatchGetTracesPages(input *BatchGetTracesInput, fn func(*BatchGetTracesOutput, bool) bool) error { 122 return c.BatchGetTracesPagesWithContext(aws.BackgroundContext(), input, fn) 123} 124 125// BatchGetTracesPagesWithContext same as BatchGetTracesPages except 126// it takes a Context and allows setting request options on the pages. 127// 128// The context must be non-nil and will be used for request cancellation. If 129// the context is nil a panic will occur. In the future the SDK may create 130// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 131// for more information on using Contexts. 132func (c *XRay) BatchGetTracesPagesWithContext(ctx aws.Context, input *BatchGetTracesInput, fn func(*BatchGetTracesOutput, bool) bool, opts ...request.Option) error { 133 p := request.Pagination{ 134 NewRequest: func() (*request.Request, error) { 135 var inCpy *BatchGetTracesInput 136 if input != nil { 137 tmp := *input 138 inCpy = &tmp 139 } 140 req, _ := c.BatchGetTracesRequest(inCpy) 141 req.SetContext(ctx) 142 req.ApplyOptions(opts...) 143 return req, nil 144 }, 145 } 146 147 cont := true 148 for p.Next() && cont { 149 cont = fn(p.Page().(*BatchGetTracesOutput), !p.HasNextPage()) 150 } 151 return p.Err() 152} 153 154const opGetEncryptionConfig = "GetEncryptionConfig" 155 156// GetEncryptionConfigRequest generates a "aws/request.Request" representing the 157// client's request for the GetEncryptionConfig operation. The "output" return 158// value will be populated with the request's response once the request completes 159// successfuly. 160// 161// Use "Send" method on the returned Request to send the API call to the service. 162// the "output" return value is not valid until after Send returns without error. 163// 164// See GetEncryptionConfig for more information on using the GetEncryptionConfig 165// API call, and error handling. 166// 167// This method is useful when you want to inject custom logic or configuration 168// into the SDK's request lifecycle. Such as custom headers, or retry logic. 169// 170// 171// // Example sending a request using the GetEncryptionConfigRequest method. 172// req, resp := client.GetEncryptionConfigRequest(params) 173// 174// err := req.Send() 175// if err == nil { // resp is now filled 176// fmt.Println(resp) 177// } 178// 179// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetEncryptionConfig 180func (c *XRay) GetEncryptionConfigRequest(input *GetEncryptionConfigInput) (req *request.Request, output *GetEncryptionConfigOutput) { 181 op := &request.Operation{ 182 Name: opGetEncryptionConfig, 183 HTTPMethod: "POST", 184 HTTPPath: "/EncryptionConfig", 185 } 186 187 if input == nil { 188 input = &GetEncryptionConfigInput{} 189 } 190 191 output = &GetEncryptionConfigOutput{} 192 req = c.newRequest(op, input, output) 193 return 194} 195 196// GetEncryptionConfig API operation for AWS X-Ray. 197// 198// Retrieves the current encryption configuration for X-Ray data. 199// 200// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 201// with awserr.Error's Code and Message methods to get detailed information about 202// the error. 203// 204// See the AWS API reference guide for AWS X-Ray's 205// API operation GetEncryptionConfig for usage and error information. 206// 207// Returned Error Codes: 208// * ErrCodeInvalidRequestException "InvalidRequestException" 209// The request is missing required parameters or has invalid parameters. 210// 211// * ErrCodeThrottledException "ThrottledException" 212// The request exceeds the maximum number of requests per second. 213// 214// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetEncryptionConfig 215func (c *XRay) GetEncryptionConfig(input *GetEncryptionConfigInput) (*GetEncryptionConfigOutput, error) { 216 req, out := c.GetEncryptionConfigRequest(input) 217 return out, req.Send() 218} 219 220// GetEncryptionConfigWithContext is the same as GetEncryptionConfig with the addition of 221// the ability to pass a context and additional request options. 222// 223// See GetEncryptionConfig for details on how to use this API operation. 224// 225// The context must be non-nil and will be used for request cancellation. If 226// the context is nil a panic will occur. In the future the SDK may create 227// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 228// for more information on using Contexts. 229func (c *XRay) GetEncryptionConfigWithContext(ctx aws.Context, input *GetEncryptionConfigInput, opts ...request.Option) (*GetEncryptionConfigOutput, error) { 230 req, out := c.GetEncryptionConfigRequest(input) 231 req.SetContext(ctx) 232 req.ApplyOptions(opts...) 233 return out, req.Send() 234} 235 236const opGetServiceGraph = "GetServiceGraph" 237 238// GetServiceGraphRequest generates a "aws/request.Request" representing the 239// client's request for the GetServiceGraph operation. The "output" return 240// value will be populated with the request's response once the request completes 241// successfuly. 242// 243// Use "Send" method on the returned Request to send the API call to the service. 244// the "output" return value is not valid until after Send returns without error. 245// 246// See GetServiceGraph for more information on using the GetServiceGraph 247// API call, and error handling. 248// 249// This method is useful when you want to inject custom logic or configuration 250// into the SDK's request lifecycle. Such as custom headers, or retry logic. 251// 252// 253// // Example sending a request using the GetServiceGraphRequest method. 254// req, resp := client.GetServiceGraphRequest(params) 255// 256// err := req.Send() 257// if err == nil { // resp is now filled 258// fmt.Println(resp) 259// } 260// 261// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraph 262func (c *XRay) GetServiceGraphRequest(input *GetServiceGraphInput) (req *request.Request, output *GetServiceGraphOutput) { 263 op := &request.Operation{ 264 Name: opGetServiceGraph, 265 HTTPMethod: "POST", 266 HTTPPath: "/ServiceGraph", 267 Paginator: &request.Paginator{ 268 InputTokens: []string{"NextToken"}, 269 OutputTokens: []string{"NextToken"}, 270 LimitToken: "", 271 TruncationToken: "", 272 }, 273 } 274 275 if input == nil { 276 input = &GetServiceGraphInput{} 277 } 278 279 output = &GetServiceGraphOutput{} 280 req = c.newRequest(op, input, output) 281 return 282} 283 284// GetServiceGraph API operation for AWS X-Ray. 285// 286// Retrieves a document that describes services that process incoming requests, 287// and downstream services that they call as a result. Root services process 288// incoming requests and make calls to downstream services. Root services are 289// applications that use the AWS X-Ray SDK. Downstream services can be other 290// applications, AWS resources, HTTP web APIs, or SQL databases. 291// 292// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 293// with awserr.Error's Code and Message methods to get detailed information about 294// the error. 295// 296// See the AWS API reference guide for AWS X-Ray's 297// API operation GetServiceGraph for usage and error information. 298// 299// Returned Error Codes: 300// * ErrCodeInvalidRequestException "InvalidRequestException" 301// The request is missing required parameters or has invalid parameters. 302// 303// * ErrCodeThrottledException "ThrottledException" 304// The request exceeds the maximum number of requests per second. 305// 306// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraph 307func (c *XRay) GetServiceGraph(input *GetServiceGraphInput) (*GetServiceGraphOutput, error) { 308 req, out := c.GetServiceGraphRequest(input) 309 return out, req.Send() 310} 311 312// GetServiceGraphWithContext is the same as GetServiceGraph with the addition of 313// the ability to pass a context and additional request options. 314// 315// See GetServiceGraph for details on how to use this API operation. 316// 317// The context must be non-nil and will be used for request cancellation. If 318// the context is nil a panic will occur. In the future the SDK may create 319// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 320// for more information on using Contexts. 321func (c *XRay) GetServiceGraphWithContext(ctx aws.Context, input *GetServiceGraphInput, opts ...request.Option) (*GetServiceGraphOutput, error) { 322 req, out := c.GetServiceGraphRequest(input) 323 req.SetContext(ctx) 324 req.ApplyOptions(opts...) 325 return out, req.Send() 326} 327 328// GetServiceGraphPages iterates over the pages of a GetServiceGraph operation, 329// calling the "fn" function with the response data for each page. To stop 330// iterating, return false from the fn function. 331// 332// See GetServiceGraph method for more information on how to use this operation. 333// 334// Note: This operation can generate multiple requests to a service. 335// 336// // Example iterating over at most 3 pages of a GetServiceGraph operation. 337// pageNum := 0 338// err := client.GetServiceGraphPages(params, 339// func(page *GetServiceGraphOutput, lastPage bool) bool { 340// pageNum++ 341// fmt.Println(page) 342// return pageNum <= 3 343// }) 344// 345func (c *XRay) GetServiceGraphPages(input *GetServiceGraphInput, fn func(*GetServiceGraphOutput, bool) bool) error { 346 return c.GetServiceGraphPagesWithContext(aws.BackgroundContext(), input, fn) 347} 348 349// GetServiceGraphPagesWithContext same as GetServiceGraphPages except 350// it takes a Context and allows setting request options on the pages. 351// 352// The context must be non-nil and will be used for request cancellation. If 353// the context is nil a panic will occur. In the future the SDK may create 354// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 355// for more information on using Contexts. 356func (c *XRay) GetServiceGraphPagesWithContext(ctx aws.Context, input *GetServiceGraphInput, fn func(*GetServiceGraphOutput, bool) bool, opts ...request.Option) error { 357 p := request.Pagination{ 358 NewRequest: func() (*request.Request, error) { 359 var inCpy *GetServiceGraphInput 360 if input != nil { 361 tmp := *input 362 inCpy = &tmp 363 } 364 req, _ := c.GetServiceGraphRequest(inCpy) 365 req.SetContext(ctx) 366 req.ApplyOptions(opts...) 367 return req, nil 368 }, 369 } 370 371 cont := true 372 for p.Next() && cont { 373 cont = fn(p.Page().(*GetServiceGraphOutput), !p.HasNextPage()) 374 } 375 return p.Err() 376} 377 378const opGetTraceGraph = "GetTraceGraph" 379 380// GetTraceGraphRequest generates a "aws/request.Request" representing the 381// client's request for the GetTraceGraph operation. The "output" return 382// value will be populated with the request's response once the request completes 383// successfuly. 384// 385// Use "Send" method on the returned Request to send the API call to the service. 386// the "output" return value is not valid until after Send returns without error. 387// 388// See GetTraceGraph for more information on using the GetTraceGraph 389// API call, and error handling. 390// 391// This method is useful when you want to inject custom logic or configuration 392// into the SDK's request lifecycle. Such as custom headers, or retry logic. 393// 394// 395// // Example sending a request using the GetTraceGraphRequest method. 396// req, resp := client.GetTraceGraphRequest(params) 397// 398// err := req.Send() 399// if err == nil { // resp is now filled 400// fmt.Println(resp) 401// } 402// 403// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraph 404func (c *XRay) GetTraceGraphRequest(input *GetTraceGraphInput) (req *request.Request, output *GetTraceGraphOutput) { 405 op := &request.Operation{ 406 Name: opGetTraceGraph, 407 HTTPMethod: "POST", 408 HTTPPath: "/TraceGraph", 409 Paginator: &request.Paginator{ 410 InputTokens: []string{"NextToken"}, 411 OutputTokens: []string{"NextToken"}, 412 LimitToken: "", 413 TruncationToken: "", 414 }, 415 } 416 417 if input == nil { 418 input = &GetTraceGraphInput{} 419 } 420 421 output = &GetTraceGraphOutput{} 422 req = c.newRequest(op, input, output) 423 return 424} 425 426// GetTraceGraph API operation for AWS X-Ray. 427// 428// Retrieves a service graph for one or more specific trace IDs. 429// 430// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 431// with awserr.Error's Code and Message methods to get detailed information about 432// the error. 433// 434// See the AWS API reference guide for AWS X-Ray's 435// API operation GetTraceGraph for usage and error information. 436// 437// Returned Error Codes: 438// * ErrCodeInvalidRequestException "InvalidRequestException" 439// The request is missing required parameters or has invalid parameters. 440// 441// * ErrCodeThrottledException "ThrottledException" 442// The request exceeds the maximum number of requests per second. 443// 444// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraph 445func (c *XRay) GetTraceGraph(input *GetTraceGraphInput) (*GetTraceGraphOutput, error) { 446 req, out := c.GetTraceGraphRequest(input) 447 return out, req.Send() 448} 449 450// GetTraceGraphWithContext is the same as GetTraceGraph with the addition of 451// the ability to pass a context and additional request options. 452// 453// See GetTraceGraph for details on how to use this API operation. 454// 455// The context must be non-nil and will be used for request cancellation. If 456// the context is nil a panic will occur. In the future the SDK may create 457// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 458// for more information on using Contexts. 459func (c *XRay) GetTraceGraphWithContext(ctx aws.Context, input *GetTraceGraphInput, opts ...request.Option) (*GetTraceGraphOutput, error) { 460 req, out := c.GetTraceGraphRequest(input) 461 req.SetContext(ctx) 462 req.ApplyOptions(opts...) 463 return out, req.Send() 464} 465 466// GetTraceGraphPages iterates over the pages of a GetTraceGraph operation, 467// calling the "fn" function with the response data for each page. To stop 468// iterating, return false from the fn function. 469// 470// See GetTraceGraph method for more information on how to use this operation. 471// 472// Note: This operation can generate multiple requests to a service. 473// 474// // Example iterating over at most 3 pages of a GetTraceGraph operation. 475// pageNum := 0 476// err := client.GetTraceGraphPages(params, 477// func(page *GetTraceGraphOutput, lastPage bool) bool { 478// pageNum++ 479// fmt.Println(page) 480// return pageNum <= 3 481// }) 482// 483func (c *XRay) GetTraceGraphPages(input *GetTraceGraphInput, fn func(*GetTraceGraphOutput, bool) bool) error { 484 return c.GetTraceGraphPagesWithContext(aws.BackgroundContext(), input, fn) 485} 486 487// GetTraceGraphPagesWithContext same as GetTraceGraphPages except 488// it takes a Context and allows setting request options on the pages. 489// 490// The context must be non-nil and will be used for request cancellation. If 491// the context is nil a panic will occur. In the future the SDK may create 492// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 493// for more information on using Contexts. 494func (c *XRay) GetTraceGraphPagesWithContext(ctx aws.Context, input *GetTraceGraphInput, fn func(*GetTraceGraphOutput, bool) bool, opts ...request.Option) error { 495 p := request.Pagination{ 496 NewRequest: func() (*request.Request, error) { 497 var inCpy *GetTraceGraphInput 498 if input != nil { 499 tmp := *input 500 inCpy = &tmp 501 } 502 req, _ := c.GetTraceGraphRequest(inCpy) 503 req.SetContext(ctx) 504 req.ApplyOptions(opts...) 505 return req, nil 506 }, 507 } 508 509 cont := true 510 for p.Next() && cont { 511 cont = fn(p.Page().(*GetTraceGraphOutput), !p.HasNextPage()) 512 } 513 return p.Err() 514} 515 516const opGetTraceSummaries = "GetTraceSummaries" 517 518// GetTraceSummariesRequest generates a "aws/request.Request" representing the 519// client's request for the GetTraceSummaries operation. The "output" return 520// value will be populated with the request's response once the request completes 521// successfuly. 522// 523// Use "Send" method on the returned Request to send the API call to the service. 524// the "output" return value is not valid until after Send returns without error. 525// 526// See GetTraceSummaries for more information on using the GetTraceSummaries 527// API call, and error handling. 528// 529// This method is useful when you want to inject custom logic or configuration 530// into the SDK's request lifecycle. Such as custom headers, or retry logic. 531// 532// 533// // Example sending a request using the GetTraceSummariesRequest method. 534// req, resp := client.GetTraceSummariesRequest(params) 535// 536// err := req.Send() 537// if err == nil { // resp is now filled 538// fmt.Println(resp) 539// } 540// 541// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummaries 542func (c *XRay) GetTraceSummariesRequest(input *GetTraceSummariesInput) (req *request.Request, output *GetTraceSummariesOutput) { 543 op := &request.Operation{ 544 Name: opGetTraceSummaries, 545 HTTPMethod: "POST", 546 HTTPPath: "/TraceSummaries", 547 Paginator: &request.Paginator{ 548 InputTokens: []string{"NextToken"}, 549 OutputTokens: []string{"NextToken"}, 550 LimitToken: "", 551 TruncationToken: "", 552 }, 553 } 554 555 if input == nil { 556 input = &GetTraceSummariesInput{} 557 } 558 559 output = &GetTraceSummariesOutput{} 560 req = c.newRequest(op, input, output) 561 return 562} 563 564// GetTraceSummaries API operation for AWS X-Ray. 565// 566// Retrieves IDs and metadata for traces available for a specified time frame 567// using an optional filter. To get the full traces, pass the trace IDs to BatchGetTraces. 568// 569// A filter expression can target traced requests that hit specific service 570// nodes or edges, have errors, or come from a known user. For example, the 571// following filter expression targets traces that pass through api.example.com: 572// 573// service("api.example.com") 574// 575// This filter expression finds traces that have an annotation named account 576// with the value 12345: 577// 578// annotation.account = "12345" 579// 580// For a full list of indexed fields and keywords that you can use in filter 581// expressions, see Using Filter Expressions (http://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html) 582// in the AWS X-Ray Developer Guide. 583// 584// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 585// with awserr.Error's Code and Message methods to get detailed information about 586// the error. 587// 588// See the AWS API reference guide for AWS X-Ray's 589// API operation GetTraceSummaries for usage and error information. 590// 591// Returned Error Codes: 592// * ErrCodeInvalidRequestException "InvalidRequestException" 593// The request is missing required parameters or has invalid parameters. 594// 595// * ErrCodeThrottledException "ThrottledException" 596// The request exceeds the maximum number of requests per second. 597// 598// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummaries 599func (c *XRay) GetTraceSummaries(input *GetTraceSummariesInput) (*GetTraceSummariesOutput, error) { 600 req, out := c.GetTraceSummariesRequest(input) 601 return out, req.Send() 602} 603 604// GetTraceSummariesWithContext is the same as GetTraceSummaries with the addition of 605// the ability to pass a context and additional request options. 606// 607// See GetTraceSummaries for details on how to use this API operation. 608// 609// The context must be non-nil and will be used for request cancellation. If 610// the context is nil a panic will occur. In the future the SDK may create 611// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 612// for more information on using Contexts. 613func (c *XRay) GetTraceSummariesWithContext(ctx aws.Context, input *GetTraceSummariesInput, opts ...request.Option) (*GetTraceSummariesOutput, error) { 614 req, out := c.GetTraceSummariesRequest(input) 615 req.SetContext(ctx) 616 req.ApplyOptions(opts...) 617 return out, req.Send() 618} 619 620// GetTraceSummariesPages iterates over the pages of a GetTraceSummaries operation, 621// calling the "fn" function with the response data for each page. To stop 622// iterating, return false from the fn function. 623// 624// See GetTraceSummaries method for more information on how to use this operation. 625// 626// Note: This operation can generate multiple requests to a service. 627// 628// // Example iterating over at most 3 pages of a GetTraceSummaries operation. 629// pageNum := 0 630// err := client.GetTraceSummariesPages(params, 631// func(page *GetTraceSummariesOutput, lastPage bool) bool { 632// pageNum++ 633// fmt.Println(page) 634// return pageNum <= 3 635// }) 636// 637func (c *XRay) GetTraceSummariesPages(input *GetTraceSummariesInput, fn func(*GetTraceSummariesOutput, bool) bool) error { 638 return c.GetTraceSummariesPagesWithContext(aws.BackgroundContext(), input, fn) 639} 640 641// GetTraceSummariesPagesWithContext same as GetTraceSummariesPages except 642// it takes a Context and allows setting request options on the pages. 643// 644// The context must be non-nil and will be used for request cancellation. If 645// the context is nil a panic will occur. In the future the SDK may create 646// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 647// for more information on using Contexts. 648func (c *XRay) GetTraceSummariesPagesWithContext(ctx aws.Context, input *GetTraceSummariesInput, fn func(*GetTraceSummariesOutput, bool) bool, opts ...request.Option) error { 649 p := request.Pagination{ 650 NewRequest: func() (*request.Request, error) { 651 var inCpy *GetTraceSummariesInput 652 if input != nil { 653 tmp := *input 654 inCpy = &tmp 655 } 656 req, _ := c.GetTraceSummariesRequest(inCpy) 657 req.SetContext(ctx) 658 req.ApplyOptions(opts...) 659 return req, nil 660 }, 661 } 662 663 cont := true 664 for p.Next() && cont { 665 cont = fn(p.Page().(*GetTraceSummariesOutput), !p.HasNextPage()) 666 } 667 return p.Err() 668} 669 670const opPutEncryptionConfig = "PutEncryptionConfig" 671 672// PutEncryptionConfigRequest generates a "aws/request.Request" representing the 673// client's request for the PutEncryptionConfig operation. The "output" return 674// value will be populated with the request's response once the request completes 675// successfuly. 676// 677// Use "Send" method on the returned Request to send the API call to the service. 678// the "output" return value is not valid until after Send returns without error. 679// 680// See PutEncryptionConfig for more information on using the PutEncryptionConfig 681// API call, and error handling. 682// 683// This method is useful when you want to inject custom logic or configuration 684// into the SDK's request lifecycle. Such as custom headers, or retry logic. 685// 686// 687// // Example sending a request using the PutEncryptionConfigRequest method. 688// req, resp := client.PutEncryptionConfigRequest(params) 689// 690// err := req.Send() 691// if err == nil { // resp is now filled 692// fmt.Println(resp) 693// } 694// 695// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutEncryptionConfig 696func (c *XRay) PutEncryptionConfigRequest(input *PutEncryptionConfigInput) (req *request.Request, output *PutEncryptionConfigOutput) { 697 op := &request.Operation{ 698 Name: opPutEncryptionConfig, 699 HTTPMethod: "POST", 700 HTTPPath: "/PutEncryptionConfig", 701 } 702 703 if input == nil { 704 input = &PutEncryptionConfigInput{} 705 } 706 707 output = &PutEncryptionConfigOutput{} 708 req = c.newRequest(op, input, output) 709 return 710} 711 712// PutEncryptionConfig API operation for AWS X-Ray. 713// 714// Updates the encryption configuration for X-Ray data. 715// 716// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 717// with awserr.Error's Code and Message methods to get detailed information about 718// the error. 719// 720// See the AWS API reference guide for AWS X-Ray's 721// API operation PutEncryptionConfig for usage and error information. 722// 723// Returned Error Codes: 724// * ErrCodeInvalidRequestException "InvalidRequestException" 725// The request is missing required parameters or has invalid parameters. 726// 727// * ErrCodeThrottledException "ThrottledException" 728// The request exceeds the maximum number of requests per second. 729// 730// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutEncryptionConfig 731func (c *XRay) PutEncryptionConfig(input *PutEncryptionConfigInput) (*PutEncryptionConfigOutput, error) { 732 req, out := c.PutEncryptionConfigRequest(input) 733 return out, req.Send() 734} 735 736// PutEncryptionConfigWithContext is the same as PutEncryptionConfig with the addition of 737// the ability to pass a context and additional request options. 738// 739// See PutEncryptionConfig for details on how to use this API operation. 740// 741// The context must be non-nil and will be used for request cancellation. If 742// the context is nil a panic will occur. In the future the SDK may create 743// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 744// for more information on using Contexts. 745func (c *XRay) PutEncryptionConfigWithContext(ctx aws.Context, input *PutEncryptionConfigInput, opts ...request.Option) (*PutEncryptionConfigOutput, error) { 746 req, out := c.PutEncryptionConfigRequest(input) 747 req.SetContext(ctx) 748 req.ApplyOptions(opts...) 749 return out, req.Send() 750} 751 752const opPutTelemetryRecords = "PutTelemetryRecords" 753 754// PutTelemetryRecordsRequest generates a "aws/request.Request" representing the 755// client's request for the PutTelemetryRecords operation. The "output" return 756// value will be populated with the request's response once the request completes 757// successfuly. 758// 759// Use "Send" method on the returned Request to send the API call to the service. 760// the "output" return value is not valid until after Send returns without error. 761// 762// See PutTelemetryRecords for more information on using the PutTelemetryRecords 763// API call, and error handling. 764// 765// This method is useful when you want to inject custom logic or configuration 766// into the SDK's request lifecycle. Such as custom headers, or retry logic. 767// 768// 769// // Example sending a request using the PutTelemetryRecordsRequest method. 770// req, resp := client.PutTelemetryRecordsRequest(params) 771// 772// err := req.Send() 773// if err == nil { // resp is now filled 774// fmt.Println(resp) 775// } 776// 777// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecords 778func (c *XRay) PutTelemetryRecordsRequest(input *PutTelemetryRecordsInput) (req *request.Request, output *PutTelemetryRecordsOutput) { 779 op := &request.Operation{ 780 Name: opPutTelemetryRecords, 781 HTTPMethod: "POST", 782 HTTPPath: "/TelemetryRecords", 783 } 784 785 if input == nil { 786 input = &PutTelemetryRecordsInput{} 787 } 788 789 output = &PutTelemetryRecordsOutput{} 790 req = c.newRequest(op, input, output) 791 return 792} 793 794// PutTelemetryRecords API operation for AWS X-Ray. 795// 796// Used by the AWS X-Ray daemon to upload telemetry. 797// 798// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 799// with awserr.Error's Code and Message methods to get detailed information about 800// the error. 801// 802// See the AWS API reference guide for AWS X-Ray's 803// API operation PutTelemetryRecords for usage and error information. 804// 805// Returned Error Codes: 806// * ErrCodeInvalidRequestException "InvalidRequestException" 807// The request is missing required parameters or has invalid parameters. 808// 809// * ErrCodeThrottledException "ThrottledException" 810// The request exceeds the maximum number of requests per second. 811// 812// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecords 813func (c *XRay) PutTelemetryRecords(input *PutTelemetryRecordsInput) (*PutTelemetryRecordsOutput, error) { 814 req, out := c.PutTelemetryRecordsRequest(input) 815 return out, req.Send() 816} 817 818// PutTelemetryRecordsWithContext is the same as PutTelemetryRecords with the addition of 819// the ability to pass a context and additional request options. 820// 821// See PutTelemetryRecords for details on how to use this API operation. 822// 823// The context must be non-nil and will be used for request cancellation. If 824// the context is nil a panic will occur. In the future the SDK may create 825// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 826// for more information on using Contexts. 827func (c *XRay) PutTelemetryRecordsWithContext(ctx aws.Context, input *PutTelemetryRecordsInput, opts ...request.Option) (*PutTelemetryRecordsOutput, error) { 828 req, out := c.PutTelemetryRecordsRequest(input) 829 req.SetContext(ctx) 830 req.ApplyOptions(opts...) 831 return out, req.Send() 832} 833 834const opPutTraceSegments = "PutTraceSegments" 835 836// PutTraceSegmentsRequest generates a "aws/request.Request" representing the 837// client's request for the PutTraceSegments operation. The "output" return 838// value will be populated with the request's response once the request completes 839// successfuly. 840// 841// Use "Send" method on the returned Request to send the API call to the service. 842// the "output" return value is not valid until after Send returns without error. 843// 844// See PutTraceSegments for more information on using the PutTraceSegments 845// API call, and error handling. 846// 847// This method is useful when you want to inject custom logic or configuration 848// into the SDK's request lifecycle. Such as custom headers, or retry logic. 849// 850// 851// // Example sending a request using the PutTraceSegmentsRequest method. 852// req, resp := client.PutTraceSegmentsRequest(params) 853// 854// err := req.Send() 855// if err == nil { // resp is now filled 856// fmt.Println(resp) 857// } 858// 859// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegments 860func (c *XRay) PutTraceSegmentsRequest(input *PutTraceSegmentsInput) (req *request.Request, output *PutTraceSegmentsOutput) { 861 op := &request.Operation{ 862 Name: opPutTraceSegments, 863 HTTPMethod: "POST", 864 HTTPPath: "/TraceSegments", 865 } 866 867 if input == nil { 868 input = &PutTraceSegmentsInput{} 869 } 870 871 output = &PutTraceSegmentsOutput{} 872 req = c.newRequest(op, input, output) 873 return 874} 875 876// PutTraceSegments API operation for AWS X-Ray. 877// 878// Uploads segment documents to AWS X-Ray. The X-Ray SDK generates segment documents 879// and sends them to the X-Ray daemon, which uploads them in batches. A segment 880// document can be a completed segment, an in-progress segment, or an array 881// of subsegments. 882// 883// Segments must include the following fields. For the full segment document 884// schema, see AWS X-Ray Segment Documents (https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) 885// in the AWS X-Ray Developer Guide. 886// 887// Required Segment Document Fields 888// 889// * name - The name of the service that handled the request. 890// 891// * id - A 64-bit identifier for the segment, unique among segments in the 892// same trace, in 16 hexadecimal digits. 893// 894// * trace_id - A unique identifier that connects all segments and subsegments 895// originating from a single client request. 896// 897// * start_time - Time the segment or subsegment was created, in floating 898// point seconds in epoch time, accurate to milliseconds. For example, 1480615200.010 899// or 1.480615200010E9. 900// 901// * end_time - Time the segment or subsegment was closed. For example, 1480615200.090 902// or 1.480615200090E9. Specify either an end_time or in_progress. 903// 904// * in_progress - Set to true instead of specifying an end_time to record 905// that a segment has been started, but is not complete. Send an in progress 906// segment when your application receives a request that will take a long 907// time to serve, to trace the fact that the request was received. When the 908// response is sent, send the complete segment to overwrite the in-progress 909// segment. 910// 911// A trace_id consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. 912// This includes: 913// 914// Trace ID Format 915// 916// * The version number, i.e. 1. 917// 918// * The time of the original request, in Unix epoch time, in 8 hexadecimal 919// digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is 1480615200 920// seconds, or 58406520 in hexadecimal. 921// 922// * A 96-bit identifier for the trace, globally unique, in 24 hexadecimal 923// digits. 924// 925// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 926// with awserr.Error's Code and Message methods to get detailed information about 927// the error. 928// 929// See the AWS API reference guide for AWS X-Ray's 930// API operation PutTraceSegments for usage and error information. 931// 932// Returned Error Codes: 933// * ErrCodeInvalidRequestException "InvalidRequestException" 934// The request is missing required parameters or has invalid parameters. 935// 936// * ErrCodeThrottledException "ThrottledException" 937// The request exceeds the maximum number of requests per second. 938// 939// See also, https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegments 940func (c *XRay) PutTraceSegments(input *PutTraceSegmentsInput) (*PutTraceSegmentsOutput, error) { 941 req, out := c.PutTraceSegmentsRequest(input) 942 return out, req.Send() 943} 944 945// PutTraceSegmentsWithContext is the same as PutTraceSegments with the addition of 946// the ability to pass a context and additional request options. 947// 948// See PutTraceSegments for details on how to use this API operation. 949// 950// The context must be non-nil and will be used for request cancellation. If 951// the context is nil a panic will occur. In the future the SDK may create 952// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 953// for more information on using Contexts. 954func (c *XRay) PutTraceSegmentsWithContext(ctx aws.Context, input *PutTraceSegmentsInput, opts ...request.Option) (*PutTraceSegmentsOutput, error) { 955 req, out := c.PutTraceSegmentsRequest(input) 956 req.SetContext(ctx) 957 req.ApplyOptions(opts...) 958 return out, req.Send() 959} 960 961// An alias for an edge. 962type Alias struct { 963 _ struct{} `type:"structure"` 964 965 // The canonical name of the alias. 966 Name *string `type:"string"` 967 968 // A list of names for the alias, including the canonical name. 969 Names []*string `type:"list"` 970 971 // The type of the alias. 972 Type *string `type:"string"` 973} 974 975// String returns the string representation 976func (s Alias) String() string { 977 return awsutil.Prettify(s) 978} 979 980// GoString returns the string representation 981func (s Alias) GoString() string { 982 return s.String() 983} 984 985// SetName sets the Name field's value. 986func (s *Alias) SetName(v string) *Alias { 987 s.Name = &v 988 return s 989} 990 991// SetNames sets the Names field's value. 992func (s *Alias) SetNames(v []*string) *Alias { 993 s.Names = v 994 return s 995} 996 997// SetType sets the Type field's value. 998func (s *Alias) SetType(v string) *Alias { 999 s.Type = &v 1000 return s 1001} 1002 1003// Value of a segment annotation. Has one of three value types: Number, Boolean 1004// or String. 1005type AnnotationValue struct { 1006 _ struct{} `type:"structure"` 1007 1008 // Value for a Boolean annotation. 1009 BooleanValue *bool `type:"boolean"` 1010 1011 // Value for a Number annotation. 1012 NumberValue *float64 `type:"double"` 1013 1014 // Value for a String annotation. 1015 StringValue *string `type:"string"` 1016} 1017 1018// String returns the string representation 1019func (s AnnotationValue) String() string { 1020 return awsutil.Prettify(s) 1021} 1022 1023// GoString returns the string representation 1024func (s AnnotationValue) GoString() string { 1025 return s.String() 1026} 1027 1028// SetBooleanValue sets the BooleanValue field's value. 1029func (s *AnnotationValue) SetBooleanValue(v bool) *AnnotationValue { 1030 s.BooleanValue = &v 1031 return s 1032} 1033 1034// SetNumberValue sets the NumberValue field's value. 1035func (s *AnnotationValue) SetNumberValue(v float64) *AnnotationValue { 1036 s.NumberValue = &v 1037 return s 1038} 1039 1040// SetStringValue sets the StringValue field's value. 1041func (s *AnnotationValue) SetStringValue(v string) *AnnotationValue { 1042 s.StringValue = &v 1043 return s 1044} 1045 1046type BackendConnectionErrors struct { 1047 _ struct{} `type:"structure"` 1048 1049 ConnectionRefusedCount *int64 `type:"integer"` 1050 1051 HTTPCode4XXCount *int64 `type:"integer"` 1052 1053 HTTPCode5XXCount *int64 `type:"integer"` 1054 1055 OtherCount *int64 `type:"integer"` 1056 1057 TimeoutCount *int64 `type:"integer"` 1058 1059 UnknownHostCount *int64 `type:"integer"` 1060} 1061 1062// String returns the string representation 1063func (s BackendConnectionErrors) String() string { 1064 return awsutil.Prettify(s) 1065} 1066 1067// GoString returns the string representation 1068func (s BackendConnectionErrors) GoString() string { 1069 return s.String() 1070} 1071 1072// SetConnectionRefusedCount sets the ConnectionRefusedCount field's value. 1073func (s *BackendConnectionErrors) SetConnectionRefusedCount(v int64) *BackendConnectionErrors { 1074 s.ConnectionRefusedCount = &v 1075 return s 1076} 1077 1078// SetHTTPCode4XXCount sets the HTTPCode4XXCount field's value. 1079func (s *BackendConnectionErrors) SetHTTPCode4XXCount(v int64) *BackendConnectionErrors { 1080 s.HTTPCode4XXCount = &v 1081 return s 1082} 1083 1084// SetHTTPCode5XXCount sets the HTTPCode5XXCount field's value. 1085func (s *BackendConnectionErrors) SetHTTPCode5XXCount(v int64) *BackendConnectionErrors { 1086 s.HTTPCode5XXCount = &v 1087 return s 1088} 1089 1090// SetOtherCount sets the OtherCount field's value. 1091func (s *BackendConnectionErrors) SetOtherCount(v int64) *BackendConnectionErrors { 1092 s.OtherCount = &v 1093 return s 1094} 1095 1096// SetTimeoutCount sets the TimeoutCount field's value. 1097func (s *BackendConnectionErrors) SetTimeoutCount(v int64) *BackendConnectionErrors { 1098 s.TimeoutCount = &v 1099 return s 1100} 1101 1102// SetUnknownHostCount sets the UnknownHostCount field's value. 1103func (s *BackendConnectionErrors) SetUnknownHostCount(v int64) *BackendConnectionErrors { 1104 s.UnknownHostCount = &v 1105 return s 1106} 1107 1108type BatchGetTracesInput struct { 1109 _ struct{} `type:"structure"` 1110 1111 // Pagination token. Not used. 1112 NextToken *string `type:"string"` 1113 1114 // Specify the trace IDs of requests for which to retrieve segments. 1115 // 1116 // TraceIds is a required field 1117 TraceIds []*string `type:"list" required:"true"` 1118} 1119 1120// String returns the string representation 1121func (s BatchGetTracesInput) String() string { 1122 return awsutil.Prettify(s) 1123} 1124 1125// GoString returns the string representation 1126func (s BatchGetTracesInput) GoString() string { 1127 return s.String() 1128} 1129 1130// Validate inspects the fields of the type to determine if they are valid. 1131func (s *BatchGetTracesInput) Validate() error { 1132 invalidParams := request.ErrInvalidParams{Context: "BatchGetTracesInput"} 1133 if s.TraceIds == nil { 1134 invalidParams.Add(request.NewErrParamRequired("TraceIds")) 1135 } 1136 1137 if invalidParams.Len() > 0 { 1138 return invalidParams 1139 } 1140 return nil 1141} 1142 1143// SetNextToken sets the NextToken field's value. 1144func (s *BatchGetTracesInput) SetNextToken(v string) *BatchGetTracesInput { 1145 s.NextToken = &v 1146 return s 1147} 1148 1149// SetTraceIds sets the TraceIds field's value. 1150func (s *BatchGetTracesInput) SetTraceIds(v []*string) *BatchGetTracesInput { 1151 s.TraceIds = v 1152 return s 1153} 1154 1155type BatchGetTracesOutput struct { 1156 _ struct{} `type:"structure"` 1157 1158 // Pagination token. Not used. 1159 NextToken *string `type:"string"` 1160 1161 // Full traces for the specified requests. 1162 Traces []*Trace `type:"list"` 1163 1164 // Trace IDs of requests that haven't been processed. 1165 UnprocessedTraceIds []*string `type:"list"` 1166} 1167 1168// String returns the string representation 1169func (s BatchGetTracesOutput) String() string { 1170 return awsutil.Prettify(s) 1171} 1172 1173// GoString returns the string representation 1174func (s BatchGetTracesOutput) GoString() string { 1175 return s.String() 1176} 1177 1178// SetNextToken sets the NextToken field's value. 1179func (s *BatchGetTracesOutput) SetNextToken(v string) *BatchGetTracesOutput { 1180 s.NextToken = &v 1181 return s 1182} 1183 1184// SetTraces sets the Traces field's value. 1185func (s *BatchGetTracesOutput) SetTraces(v []*Trace) *BatchGetTracesOutput { 1186 s.Traces = v 1187 return s 1188} 1189 1190// SetUnprocessedTraceIds sets the UnprocessedTraceIds field's value. 1191func (s *BatchGetTracesOutput) SetUnprocessedTraceIds(v []*string) *BatchGetTracesOutput { 1192 s.UnprocessedTraceIds = v 1193 return s 1194} 1195 1196// Information about a connection between two services. 1197type Edge struct { 1198 _ struct{} `type:"structure"` 1199 1200 // Aliases for the edge. 1201 Aliases []*Alias `type:"list"` 1202 1203 // The end time of the last segment on the edge. 1204 EndTime *time.Time `type:"timestamp"` 1205 1206 // Identifier of the edge. Unique within a service map. 1207 ReferenceId *int64 `type:"integer"` 1208 1209 // A histogram that maps the spread of client response times on an edge. 1210 ResponseTimeHistogram []*HistogramEntry `type:"list"` 1211 1212 // The start time of the first segment on the edge. 1213 StartTime *time.Time `type:"timestamp"` 1214 1215 // Response statistics for segments on the edge. 1216 SummaryStatistics *EdgeStatistics `type:"structure"` 1217} 1218 1219// String returns the string representation 1220func (s Edge) String() string { 1221 return awsutil.Prettify(s) 1222} 1223 1224// GoString returns the string representation 1225func (s Edge) GoString() string { 1226 return s.String() 1227} 1228 1229// SetAliases sets the Aliases field's value. 1230func (s *Edge) SetAliases(v []*Alias) *Edge { 1231 s.Aliases = v 1232 return s 1233} 1234 1235// SetEndTime sets the EndTime field's value. 1236func (s *Edge) SetEndTime(v time.Time) *Edge { 1237 s.EndTime = &v 1238 return s 1239} 1240 1241// SetReferenceId sets the ReferenceId field's value. 1242func (s *Edge) SetReferenceId(v int64) *Edge { 1243 s.ReferenceId = &v 1244 return s 1245} 1246 1247// SetResponseTimeHistogram sets the ResponseTimeHistogram field's value. 1248func (s *Edge) SetResponseTimeHistogram(v []*HistogramEntry) *Edge { 1249 s.ResponseTimeHistogram = v 1250 return s 1251} 1252 1253// SetStartTime sets the StartTime field's value. 1254func (s *Edge) SetStartTime(v time.Time) *Edge { 1255 s.StartTime = &v 1256 return s 1257} 1258 1259// SetSummaryStatistics sets the SummaryStatistics field's value. 1260func (s *Edge) SetSummaryStatistics(v *EdgeStatistics) *Edge { 1261 s.SummaryStatistics = v 1262 return s 1263} 1264 1265// Response statistics for an edge. 1266type EdgeStatistics struct { 1267 _ struct{} `type:"structure"` 1268 1269 // Information about requests that failed with a 4xx Client Error status code. 1270 ErrorStatistics *ErrorStatistics `type:"structure"` 1271 1272 // Information about requests that failed with a 5xx Server Error status code. 1273 FaultStatistics *FaultStatistics `type:"structure"` 1274 1275 // The number of requests that completed with a 2xx Success status code. 1276 OkCount *int64 `type:"long"` 1277 1278 // The total number of completed requests. 1279 TotalCount *int64 `type:"long"` 1280 1281 // The aggregate response time of completed requests. 1282 TotalResponseTime *float64 `type:"double"` 1283} 1284 1285// String returns the string representation 1286func (s EdgeStatistics) String() string { 1287 return awsutil.Prettify(s) 1288} 1289 1290// GoString returns the string representation 1291func (s EdgeStatistics) GoString() string { 1292 return s.String() 1293} 1294 1295// SetErrorStatistics sets the ErrorStatistics field's value. 1296func (s *EdgeStatistics) SetErrorStatistics(v *ErrorStatistics) *EdgeStatistics { 1297 s.ErrorStatistics = v 1298 return s 1299} 1300 1301// SetFaultStatistics sets the FaultStatistics field's value. 1302func (s *EdgeStatistics) SetFaultStatistics(v *FaultStatistics) *EdgeStatistics { 1303 s.FaultStatistics = v 1304 return s 1305} 1306 1307// SetOkCount sets the OkCount field's value. 1308func (s *EdgeStatistics) SetOkCount(v int64) *EdgeStatistics { 1309 s.OkCount = &v 1310 return s 1311} 1312 1313// SetTotalCount sets the TotalCount field's value. 1314func (s *EdgeStatistics) SetTotalCount(v int64) *EdgeStatistics { 1315 s.TotalCount = &v 1316 return s 1317} 1318 1319// SetTotalResponseTime sets the TotalResponseTime field's value. 1320func (s *EdgeStatistics) SetTotalResponseTime(v float64) *EdgeStatistics { 1321 s.TotalResponseTime = &v 1322 return s 1323} 1324 1325// A configuration document that specifies encryption configuration settings. 1326type EncryptionConfig struct { 1327 _ struct{} `type:"structure"` 1328 1329 // The ID of the customer master key (CMK) used for encryption, if applicable. 1330 KeyId *string `type:"string"` 1331 1332 // The encryption status. After modifying encryption configuration with PutEncryptionConfig, 1333 // the status can be UPDATING for up to one hour before X-Ray starts encrypting 1334 // data with the new key. 1335 Status *string `type:"string" enum:"EncryptionStatus"` 1336 1337 // The type of encryption. Set to KMS for encryption with CMKs. Set to NONE 1338 // for default encryption. 1339 Type *string `type:"string" enum:"EncryptionType"` 1340} 1341 1342// String returns the string representation 1343func (s EncryptionConfig) String() string { 1344 return awsutil.Prettify(s) 1345} 1346 1347// GoString returns the string representation 1348func (s EncryptionConfig) GoString() string { 1349 return s.String() 1350} 1351 1352// SetKeyId sets the KeyId field's value. 1353func (s *EncryptionConfig) SetKeyId(v string) *EncryptionConfig { 1354 s.KeyId = &v 1355 return s 1356} 1357 1358// SetStatus sets the Status field's value. 1359func (s *EncryptionConfig) SetStatus(v string) *EncryptionConfig { 1360 s.Status = &v 1361 return s 1362} 1363 1364// SetType sets the Type field's value. 1365func (s *EncryptionConfig) SetType(v string) *EncryptionConfig { 1366 s.Type = &v 1367 return s 1368} 1369 1370// Information about requests that failed with a 4xx Client Error status code. 1371type ErrorStatistics struct { 1372 _ struct{} `type:"structure"` 1373 1374 // The number of requests that failed with untracked 4xx Client Error status 1375 // codes. 1376 OtherCount *int64 `type:"long"` 1377 1378 // The number of requests that failed with a 419 throttling status code. 1379 ThrottleCount *int64 `type:"long"` 1380 1381 // The total number of requests that failed with a 4xx Client Error status code. 1382 TotalCount *int64 `type:"long"` 1383} 1384 1385// String returns the string representation 1386func (s ErrorStatistics) String() string { 1387 return awsutil.Prettify(s) 1388} 1389 1390// GoString returns the string representation 1391func (s ErrorStatistics) GoString() string { 1392 return s.String() 1393} 1394 1395// SetOtherCount sets the OtherCount field's value. 1396func (s *ErrorStatistics) SetOtherCount(v int64) *ErrorStatistics { 1397 s.OtherCount = &v 1398 return s 1399} 1400 1401// SetThrottleCount sets the ThrottleCount field's value. 1402func (s *ErrorStatistics) SetThrottleCount(v int64) *ErrorStatistics { 1403 s.ThrottleCount = &v 1404 return s 1405} 1406 1407// SetTotalCount sets the TotalCount field's value. 1408func (s *ErrorStatistics) SetTotalCount(v int64) *ErrorStatistics { 1409 s.TotalCount = &v 1410 return s 1411} 1412 1413// Information about requests that failed with a 5xx Server Error status code. 1414type FaultStatistics struct { 1415 _ struct{} `type:"structure"` 1416 1417 // The number of requests that failed with untracked 5xx Server Error status 1418 // codes. 1419 OtherCount *int64 `type:"long"` 1420 1421 // The total number of requests that failed with a 5xx Server Error status code. 1422 TotalCount *int64 `type:"long"` 1423} 1424 1425// String returns the string representation 1426func (s FaultStatistics) String() string { 1427 return awsutil.Prettify(s) 1428} 1429 1430// GoString returns the string representation 1431func (s FaultStatistics) GoString() string { 1432 return s.String() 1433} 1434 1435// SetOtherCount sets the OtherCount field's value. 1436func (s *FaultStatistics) SetOtherCount(v int64) *FaultStatistics { 1437 s.OtherCount = &v 1438 return s 1439} 1440 1441// SetTotalCount sets the TotalCount field's value. 1442func (s *FaultStatistics) SetTotalCount(v int64) *FaultStatistics { 1443 s.TotalCount = &v 1444 return s 1445} 1446 1447type GetEncryptionConfigInput struct { 1448 _ struct{} `type:"structure"` 1449} 1450 1451// String returns the string representation 1452func (s GetEncryptionConfigInput) String() string { 1453 return awsutil.Prettify(s) 1454} 1455 1456// GoString returns the string representation 1457func (s GetEncryptionConfigInput) GoString() string { 1458 return s.String() 1459} 1460 1461type GetEncryptionConfigOutput struct { 1462 _ struct{} `type:"structure"` 1463 1464 // The encryption configuration document. 1465 EncryptionConfig *EncryptionConfig `type:"structure"` 1466} 1467 1468// String returns the string representation 1469func (s GetEncryptionConfigOutput) String() string { 1470 return awsutil.Prettify(s) 1471} 1472 1473// GoString returns the string representation 1474func (s GetEncryptionConfigOutput) GoString() string { 1475 return s.String() 1476} 1477 1478// SetEncryptionConfig sets the EncryptionConfig field's value. 1479func (s *GetEncryptionConfigOutput) SetEncryptionConfig(v *EncryptionConfig) *GetEncryptionConfigOutput { 1480 s.EncryptionConfig = v 1481 return s 1482} 1483 1484type GetServiceGraphInput struct { 1485 _ struct{} `type:"structure"` 1486 1487 // The end of the time frame for which to generate a graph. 1488 // 1489 // EndTime is a required field 1490 EndTime *time.Time `type:"timestamp" required:"true"` 1491 1492 // Pagination token. Not used. 1493 NextToken *string `type:"string"` 1494 1495 // The start of the time frame for which to generate a graph. 1496 // 1497 // StartTime is a required field 1498 StartTime *time.Time `type:"timestamp" required:"true"` 1499} 1500 1501// String returns the string representation 1502func (s GetServiceGraphInput) String() string { 1503 return awsutil.Prettify(s) 1504} 1505 1506// GoString returns the string representation 1507func (s GetServiceGraphInput) GoString() string { 1508 return s.String() 1509} 1510 1511// Validate inspects the fields of the type to determine if they are valid. 1512func (s *GetServiceGraphInput) Validate() error { 1513 invalidParams := request.ErrInvalidParams{Context: "GetServiceGraphInput"} 1514 if s.EndTime == nil { 1515 invalidParams.Add(request.NewErrParamRequired("EndTime")) 1516 } 1517 if s.StartTime == nil { 1518 invalidParams.Add(request.NewErrParamRequired("StartTime")) 1519 } 1520 1521 if invalidParams.Len() > 0 { 1522 return invalidParams 1523 } 1524 return nil 1525} 1526 1527// SetEndTime sets the EndTime field's value. 1528func (s *GetServiceGraphInput) SetEndTime(v time.Time) *GetServiceGraphInput { 1529 s.EndTime = &v 1530 return s 1531} 1532 1533// SetNextToken sets the NextToken field's value. 1534func (s *GetServiceGraphInput) SetNextToken(v string) *GetServiceGraphInput { 1535 s.NextToken = &v 1536 return s 1537} 1538 1539// SetStartTime sets the StartTime field's value. 1540func (s *GetServiceGraphInput) SetStartTime(v time.Time) *GetServiceGraphInput { 1541 s.StartTime = &v 1542 return s 1543} 1544 1545type GetServiceGraphOutput struct { 1546 _ struct{} `type:"structure"` 1547 1548 // The end of the time frame for which the graph was generated. 1549 EndTime *time.Time `type:"timestamp"` 1550 1551 // Pagination token. Not used. 1552 NextToken *string `type:"string"` 1553 1554 // The services that have processed a traced request during the specified time 1555 // frame. 1556 Services []*Service `type:"list"` 1557 1558 // The start of the time frame for which the graph was generated. 1559 StartTime *time.Time `type:"timestamp"` 1560} 1561 1562// String returns the string representation 1563func (s GetServiceGraphOutput) String() string { 1564 return awsutil.Prettify(s) 1565} 1566 1567// GoString returns the string representation 1568func (s GetServiceGraphOutput) GoString() string { 1569 return s.String() 1570} 1571 1572// SetEndTime sets the EndTime field's value. 1573func (s *GetServiceGraphOutput) SetEndTime(v time.Time) *GetServiceGraphOutput { 1574 s.EndTime = &v 1575 return s 1576} 1577 1578// SetNextToken sets the NextToken field's value. 1579func (s *GetServiceGraphOutput) SetNextToken(v string) *GetServiceGraphOutput { 1580 s.NextToken = &v 1581 return s 1582} 1583 1584// SetServices sets the Services field's value. 1585func (s *GetServiceGraphOutput) SetServices(v []*Service) *GetServiceGraphOutput { 1586 s.Services = v 1587 return s 1588} 1589 1590// SetStartTime sets the StartTime field's value. 1591func (s *GetServiceGraphOutput) SetStartTime(v time.Time) *GetServiceGraphOutput { 1592 s.StartTime = &v 1593 return s 1594} 1595 1596type GetTraceGraphInput struct { 1597 _ struct{} `type:"structure"` 1598 1599 // Pagination token. Not used. 1600 NextToken *string `type:"string"` 1601 1602 // Trace IDs of requests for which to generate a service graph. 1603 // 1604 // TraceIds is a required field 1605 TraceIds []*string `type:"list" required:"true"` 1606} 1607 1608// String returns the string representation 1609func (s GetTraceGraphInput) String() string { 1610 return awsutil.Prettify(s) 1611} 1612 1613// GoString returns the string representation 1614func (s GetTraceGraphInput) GoString() string { 1615 return s.String() 1616} 1617 1618// Validate inspects the fields of the type to determine if they are valid. 1619func (s *GetTraceGraphInput) Validate() error { 1620 invalidParams := request.ErrInvalidParams{Context: "GetTraceGraphInput"} 1621 if s.TraceIds == nil { 1622 invalidParams.Add(request.NewErrParamRequired("TraceIds")) 1623 } 1624 1625 if invalidParams.Len() > 0 { 1626 return invalidParams 1627 } 1628 return nil 1629} 1630 1631// SetNextToken sets the NextToken field's value. 1632func (s *GetTraceGraphInput) SetNextToken(v string) *GetTraceGraphInput { 1633 s.NextToken = &v 1634 return s 1635} 1636 1637// SetTraceIds sets the TraceIds field's value. 1638func (s *GetTraceGraphInput) SetTraceIds(v []*string) *GetTraceGraphInput { 1639 s.TraceIds = v 1640 return s 1641} 1642 1643type GetTraceGraphOutput struct { 1644 _ struct{} `type:"structure"` 1645 1646 // Pagination token. Not used. 1647 NextToken *string `type:"string"` 1648 1649 // The services that have processed one of the specified requests. 1650 Services []*Service `type:"list"` 1651} 1652 1653// String returns the string representation 1654func (s GetTraceGraphOutput) String() string { 1655 return awsutil.Prettify(s) 1656} 1657 1658// GoString returns the string representation 1659func (s GetTraceGraphOutput) GoString() string { 1660 return s.String() 1661} 1662 1663// SetNextToken sets the NextToken field's value. 1664func (s *GetTraceGraphOutput) SetNextToken(v string) *GetTraceGraphOutput { 1665 s.NextToken = &v 1666 return s 1667} 1668 1669// SetServices sets the Services field's value. 1670func (s *GetTraceGraphOutput) SetServices(v []*Service) *GetTraceGraphOutput { 1671 s.Services = v 1672 return s 1673} 1674 1675type GetTraceSummariesInput struct { 1676 _ struct{} `type:"structure"` 1677 1678 // The end of the time frame for which to retrieve traces. 1679 // 1680 // EndTime is a required field 1681 EndTime *time.Time `type:"timestamp" required:"true"` 1682 1683 // Specify a filter expression to retrieve trace summaries for services or requests 1684 // that meet certain requirements. 1685 FilterExpression *string `min:"1" type:"string"` 1686 1687 // Specify the pagination token returned by a previous request to retrieve the 1688 // next page of results. 1689 NextToken *string `type:"string"` 1690 1691 // Set to true to get summaries for only a subset of available traces. 1692 Sampling *bool `type:"boolean"` 1693 1694 // The start of the time frame for which to retrieve traces. 1695 // 1696 // StartTime is a required field 1697 StartTime *time.Time `type:"timestamp" required:"true"` 1698} 1699 1700// String returns the string representation 1701func (s GetTraceSummariesInput) String() string { 1702 return awsutil.Prettify(s) 1703} 1704 1705// GoString returns the string representation 1706func (s GetTraceSummariesInput) GoString() string { 1707 return s.String() 1708} 1709 1710// Validate inspects the fields of the type to determine if they are valid. 1711func (s *GetTraceSummariesInput) Validate() error { 1712 invalidParams := request.ErrInvalidParams{Context: "GetTraceSummariesInput"} 1713 if s.EndTime == nil { 1714 invalidParams.Add(request.NewErrParamRequired("EndTime")) 1715 } 1716 if s.FilterExpression != nil && len(*s.FilterExpression) < 1 { 1717 invalidParams.Add(request.NewErrParamMinLen("FilterExpression", 1)) 1718 } 1719 if s.StartTime == nil { 1720 invalidParams.Add(request.NewErrParamRequired("StartTime")) 1721 } 1722 1723 if invalidParams.Len() > 0 { 1724 return invalidParams 1725 } 1726 return nil 1727} 1728 1729// SetEndTime sets the EndTime field's value. 1730func (s *GetTraceSummariesInput) SetEndTime(v time.Time) *GetTraceSummariesInput { 1731 s.EndTime = &v 1732 return s 1733} 1734 1735// SetFilterExpression sets the FilterExpression field's value. 1736func (s *GetTraceSummariesInput) SetFilterExpression(v string) *GetTraceSummariesInput { 1737 s.FilterExpression = &v 1738 return s 1739} 1740 1741// SetNextToken sets the NextToken field's value. 1742func (s *GetTraceSummariesInput) SetNextToken(v string) *GetTraceSummariesInput { 1743 s.NextToken = &v 1744 return s 1745} 1746 1747// SetSampling sets the Sampling field's value. 1748func (s *GetTraceSummariesInput) SetSampling(v bool) *GetTraceSummariesInput { 1749 s.Sampling = &v 1750 return s 1751} 1752 1753// SetStartTime sets the StartTime field's value. 1754func (s *GetTraceSummariesInput) SetStartTime(v time.Time) *GetTraceSummariesInput { 1755 s.StartTime = &v 1756 return s 1757} 1758 1759type GetTraceSummariesOutput struct { 1760 _ struct{} `type:"structure"` 1761 1762 // The start time of this page of results. 1763 ApproximateTime *time.Time `type:"timestamp"` 1764 1765 // If the requested time frame contained more than one page of results, you 1766 // can use this token to retrieve the next page. The first page contains the 1767 // most most recent results, closest to the end of the time frame. 1768 NextToken *string `type:"string"` 1769 1770 // Trace IDs and metadata for traces that were found in the specified time frame. 1771 TraceSummaries []*TraceSummary `type:"list"` 1772 1773 // The total number of traces processed, including traces that did not match 1774 // the specified filter expression. 1775 TracesProcessedCount *int64 `type:"long"` 1776} 1777 1778// String returns the string representation 1779func (s GetTraceSummariesOutput) String() string { 1780 return awsutil.Prettify(s) 1781} 1782 1783// GoString returns the string representation 1784func (s GetTraceSummariesOutput) GoString() string { 1785 return s.String() 1786} 1787 1788// SetApproximateTime sets the ApproximateTime field's value. 1789func (s *GetTraceSummariesOutput) SetApproximateTime(v time.Time) *GetTraceSummariesOutput { 1790 s.ApproximateTime = &v 1791 return s 1792} 1793 1794// SetNextToken sets the NextToken field's value. 1795func (s *GetTraceSummariesOutput) SetNextToken(v string) *GetTraceSummariesOutput { 1796 s.NextToken = &v 1797 return s 1798} 1799 1800// SetTraceSummaries sets the TraceSummaries field's value. 1801func (s *GetTraceSummariesOutput) SetTraceSummaries(v []*TraceSummary) *GetTraceSummariesOutput { 1802 s.TraceSummaries = v 1803 return s 1804} 1805 1806// SetTracesProcessedCount sets the TracesProcessedCount field's value. 1807func (s *GetTraceSummariesOutput) SetTracesProcessedCount(v int64) *GetTraceSummariesOutput { 1808 s.TracesProcessedCount = &v 1809 return s 1810} 1811 1812// An entry in a histogram for a statistic. A histogram maps the range of observed 1813// values on the X axis, and the prevalence of each value on the Y axis. 1814type HistogramEntry struct { 1815 _ struct{} `type:"structure"` 1816 1817 // The prevalence of the entry. 1818 Count *int64 `type:"integer"` 1819 1820 // The value of the entry. 1821 Value *float64 `type:"double"` 1822} 1823 1824// String returns the string representation 1825func (s HistogramEntry) String() string { 1826 return awsutil.Prettify(s) 1827} 1828 1829// GoString returns the string representation 1830func (s HistogramEntry) GoString() string { 1831 return s.String() 1832} 1833 1834// SetCount sets the Count field's value. 1835func (s *HistogramEntry) SetCount(v int64) *HistogramEntry { 1836 s.Count = &v 1837 return s 1838} 1839 1840// SetValue sets the Value field's value. 1841func (s *HistogramEntry) SetValue(v float64) *HistogramEntry { 1842 s.Value = &v 1843 return s 1844} 1845 1846// Information about an HTTP request. 1847type Http struct { 1848 _ struct{} `type:"structure"` 1849 1850 // The IP address of the requestor. 1851 ClientIp *string `type:"string"` 1852 1853 // The request method. 1854 HttpMethod *string `type:"string"` 1855 1856 // The response status. 1857 HttpStatus *int64 `type:"integer"` 1858 1859 // The request URL. 1860 HttpURL *string `type:"string"` 1861 1862 // The request's user agent string. 1863 UserAgent *string `type:"string"` 1864} 1865 1866// String returns the string representation 1867func (s Http) String() string { 1868 return awsutil.Prettify(s) 1869} 1870 1871// GoString returns the string representation 1872func (s Http) GoString() string { 1873 return s.String() 1874} 1875 1876// SetClientIp sets the ClientIp field's value. 1877func (s *Http) SetClientIp(v string) *Http { 1878 s.ClientIp = &v 1879 return s 1880} 1881 1882// SetHttpMethod sets the HttpMethod field's value. 1883func (s *Http) SetHttpMethod(v string) *Http { 1884 s.HttpMethod = &v 1885 return s 1886} 1887 1888// SetHttpStatus sets the HttpStatus field's value. 1889func (s *Http) SetHttpStatus(v int64) *Http { 1890 s.HttpStatus = &v 1891 return s 1892} 1893 1894// SetHttpURL sets the HttpURL field's value. 1895func (s *Http) SetHttpURL(v string) *Http { 1896 s.HttpURL = &v 1897 return s 1898} 1899 1900// SetUserAgent sets the UserAgent field's value. 1901func (s *Http) SetUserAgent(v string) *Http { 1902 s.UserAgent = &v 1903 return s 1904} 1905 1906type PutEncryptionConfigInput struct { 1907 _ struct{} `type:"structure"` 1908 1909 // An AWS KMS customer master key (CMK) in one of the following formats: 1910 // 1911 // * Alias - The name of the key. For example, alias/MyKey. 1912 // 1913 // * Key ID - The KMS key ID of the key. For example, ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. 1914 // 1915 // * ARN - The full Amazon Resource Name of the key ID or alias. For example, 1916 // arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. 1917 // Use this format to specify a key in a different account. 1918 // 1919 // Omit this key if you set Type to NONE. 1920 KeyId *string `min:"1" type:"string"` 1921 1922 // The type of encryption. Set to KMS to use your own key for encryption. Set 1923 // to NONE for default encryption. 1924 // 1925 // Type is a required field 1926 Type *string `type:"string" required:"true" enum:"EncryptionType"` 1927} 1928 1929// String returns the string representation 1930func (s PutEncryptionConfigInput) String() string { 1931 return awsutil.Prettify(s) 1932} 1933 1934// GoString returns the string representation 1935func (s PutEncryptionConfigInput) GoString() string { 1936 return s.String() 1937} 1938 1939// Validate inspects the fields of the type to determine if they are valid. 1940func (s *PutEncryptionConfigInput) Validate() error { 1941 invalidParams := request.ErrInvalidParams{Context: "PutEncryptionConfigInput"} 1942 if s.KeyId != nil && len(*s.KeyId) < 1 { 1943 invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) 1944 } 1945 if s.Type == nil { 1946 invalidParams.Add(request.NewErrParamRequired("Type")) 1947 } 1948 1949 if invalidParams.Len() > 0 { 1950 return invalidParams 1951 } 1952 return nil 1953} 1954 1955// SetKeyId sets the KeyId field's value. 1956func (s *PutEncryptionConfigInput) SetKeyId(v string) *PutEncryptionConfigInput { 1957 s.KeyId = &v 1958 return s 1959} 1960 1961// SetType sets the Type field's value. 1962func (s *PutEncryptionConfigInput) SetType(v string) *PutEncryptionConfigInput { 1963 s.Type = &v 1964 return s 1965} 1966 1967type PutEncryptionConfigOutput struct { 1968 _ struct{} `type:"structure"` 1969 1970 // The new encryption configuration. 1971 EncryptionConfig *EncryptionConfig `type:"structure"` 1972} 1973 1974// String returns the string representation 1975func (s PutEncryptionConfigOutput) String() string { 1976 return awsutil.Prettify(s) 1977} 1978 1979// GoString returns the string representation 1980func (s PutEncryptionConfigOutput) GoString() string { 1981 return s.String() 1982} 1983 1984// SetEncryptionConfig sets the EncryptionConfig field's value. 1985func (s *PutEncryptionConfigOutput) SetEncryptionConfig(v *EncryptionConfig) *PutEncryptionConfigOutput { 1986 s.EncryptionConfig = v 1987 return s 1988} 1989 1990type PutTelemetryRecordsInput struct { 1991 _ struct{} `type:"structure"` 1992 1993 EC2InstanceId *string `type:"string"` 1994 1995 Hostname *string `type:"string"` 1996 1997 ResourceARN *string `type:"string"` 1998 1999 // TelemetryRecords is a required field 2000 TelemetryRecords []*TelemetryRecord `type:"list" required:"true"` 2001} 2002 2003// String returns the string representation 2004func (s PutTelemetryRecordsInput) String() string { 2005 return awsutil.Prettify(s) 2006} 2007 2008// GoString returns the string representation 2009func (s PutTelemetryRecordsInput) GoString() string { 2010 return s.String() 2011} 2012 2013// Validate inspects the fields of the type to determine if they are valid. 2014func (s *PutTelemetryRecordsInput) Validate() error { 2015 invalidParams := request.ErrInvalidParams{Context: "PutTelemetryRecordsInput"} 2016 if s.TelemetryRecords == nil { 2017 invalidParams.Add(request.NewErrParamRequired("TelemetryRecords")) 2018 } 2019 if s.TelemetryRecords != nil { 2020 for i, v := range s.TelemetryRecords { 2021 if v == nil { 2022 continue 2023 } 2024 if err := v.Validate(); err != nil { 2025 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TelemetryRecords", i), err.(request.ErrInvalidParams)) 2026 } 2027 } 2028 } 2029 2030 if invalidParams.Len() > 0 { 2031 return invalidParams 2032 } 2033 return nil 2034} 2035 2036// SetEC2InstanceId sets the EC2InstanceId field's value. 2037func (s *PutTelemetryRecordsInput) SetEC2InstanceId(v string) *PutTelemetryRecordsInput { 2038 s.EC2InstanceId = &v 2039 return s 2040} 2041 2042// SetHostname sets the Hostname field's value. 2043func (s *PutTelemetryRecordsInput) SetHostname(v string) *PutTelemetryRecordsInput { 2044 s.Hostname = &v 2045 return s 2046} 2047 2048// SetResourceARN sets the ResourceARN field's value. 2049func (s *PutTelemetryRecordsInput) SetResourceARN(v string) *PutTelemetryRecordsInput { 2050 s.ResourceARN = &v 2051 return s 2052} 2053 2054// SetTelemetryRecords sets the TelemetryRecords field's value. 2055func (s *PutTelemetryRecordsInput) SetTelemetryRecords(v []*TelemetryRecord) *PutTelemetryRecordsInput { 2056 s.TelemetryRecords = v 2057 return s 2058} 2059 2060type PutTelemetryRecordsOutput struct { 2061 _ struct{} `type:"structure"` 2062} 2063 2064// String returns the string representation 2065func (s PutTelemetryRecordsOutput) String() string { 2066 return awsutil.Prettify(s) 2067} 2068 2069// GoString returns the string representation 2070func (s PutTelemetryRecordsOutput) GoString() string { 2071 return s.String() 2072} 2073 2074type PutTraceSegmentsInput struct { 2075 _ struct{} `type:"structure"` 2076 2077 // A string containing a JSON document defining one or more segments or subsegments. 2078 // 2079 // TraceSegmentDocuments is a required field 2080 TraceSegmentDocuments []*string `type:"list" required:"true"` 2081} 2082 2083// String returns the string representation 2084func (s PutTraceSegmentsInput) String() string { 2085 return awsutil.Prettify(s) 2086} 2087 2088// GoString returns the string representation 2089func (s PutTraceSegmentsInput) GoString() string { 2090 return s.String() 2091} 2092 2093// Validate inspects the fields of the type to determine if they are valid. 2094func (s *PutTraceSegmentsInput) Validate() error { 2095 invalidParams := request.ErrInvalidParams{Context: "PutTraceSegmentsInput"} 2096 if s.TraceSegmentDocuments == nil { 2097 invalidParams.Add(request.NewErrParamRequired("TraceSegmentDocuments")) 2098 } 2099 2100 if invalidParams.Len() > 0 { 2101 return invalidParams 2102 } 2103 return nil 2104} 2105 2106// SetTraceSegmentDocuments sets the TraceSegmentDocuments field's value. 2107func (s *PutTraceSegmentsInput) SetTraceSegmentDocuments(v []*string) *PutTraceSegmentsInput { 2108 s.TraceSegmentDocuments = v 2109 return s 2110} 2111 2112type PutTraceSegmentsOutput struct { 2113 _ struct{} `type:"structure"` 2114 2115 // Segments that failed processing. 2116 UnprocessedTraceSegments []*UnprocessedTraceSegment `type:"list"` 2117} 2118 2119// String returns the string representation 2120func (s PutTraceSegmentsOutput) String() string { 2121 return awsutil.Prettify(s) 2122} 2123 2124// GoString returns the string representation 2125func (s PutTraceSegmentsOutput) GoString() string { 2126 return s.String() 2127} 2128 2129// SetUnprocessedTraceSegments sets the UnprocessedTraceSegments field's value. 2130func (s *PutTraceSegmentsOutput) SetUnprocessedTraceSegments(v []*UnprocessedTraceSegment) *PutTraceSegmentsOutput { 2131 s.UnprocessedTraceSegments = v 2132 return s 2133} 2134 2135// A segment from a trace that has been ingested by the X-Ray service. The segment 2136// can be compiled from documents uploaded with PutTraceSegments, or an inferred 2137// segment for a downstream service, generated from a subsegment sent by the 2138// service that called it. 2139// 2140// For the full segment document schema, see AWS X-Ray Segment Documents (https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) 2141// in the AWS X-Ray Developer Guide. 2142type Segment struct { 2143 _ struct{} `type:"structure"` 2144 2145 // The segment document. 2146 Document *string `min:"1" type:"string"` 2147 2148 // The segment's ID. 2149 Id *string `type:"string"` 2150} 2151 2152// String returns the string representation 2153func (s Segment) String() string { 2154 return awsutil.Prettify(s) 2155} 2156 2157// GoString returns the string representation 2158func (s Segment) GoString() string { 2159 return s.String() 2160} 2161 2162// SetDocument sets the Document field's value. 2163func (s *Segment) SetDocument(v string) *Segment { 2164 s.Document = &v 2165 return s 2166} 2167 2168// SetId sets the Id field's value. 2169func (s *Segment) SetId(v string) *Segment { 2170 s.Id = &v 2171 return s 2172} 2173 2174// Information about an application that processed requests, users that made 2175// requests, or downstream services, resources and applications that an application 2176// used. 2177type Service struct { 2178 _ struct{} `type:"structure"` 2179 2180 // Identifier of the AWS account in which the service runs. 2181 AccountId *string `type:"string"` 2182 2183 // A histogram that maps the spread of service durations. 2184 DurationHistogram []*HistogramEntry `type:"list"` 2185 2186 // Connections to downstream services. 2187 Edges []*Edge `type:"list"` 2188 2189 // The end time of the last segment that the service generated. 2190 EndTime *time.Time `type:"timestamp"` 2191 2192 // The canonical name of the service. 2193 Name *string `type:"string"` 2194 2195 // A list of names for the service, including the canonical name. 2196 Names []*string `type:"list"` 2197 2198 // Identifier for the service. Unique within the service map. 2199 ReferenceId *int64 `type:"integer"` 2200 2201 // A histogram that maps the spread of service response times. 2202 ResponseTimeHistogram []*HistogramEntry `type:"list"` 2203 2204 // Indicates that the service was the first service to process a request. 2205 Root *bool `type:"boolean"` 2206 2207 // The start time of the first segment that the service generated. 2208 StartTime *time.Time `type:"timestamp"` 2209 2210 // The service's state. 2211 State *string `type:"string"` 2212 2213 // Aggregated statistics for the service. 2214 SummaryStatistics *ServiceStatistics `type:"structure"` 2215 2216 // The type of service. 2217 // 2218 // * AWS Resource - The type of an AWS resource. For example, AWS::EC2::Instance 2219 // for a application running on Amazon EC2 or AWS::DynamoDB::Table for an 2220 // Amazon DynamoDB table that the application used. 2221 // 2222 // * AWS Service - The type of an AWS service. For example, AWS::DynamoDB 2223 // for downstream calls to Amazon DynamoDB that didn't target a specific 2224 // table. 2225 // 2226 // * client - Represents the clients that sent requests to a root service. 2227 // 2228 // * remote - A downstream service of indeterminate type. 2229 Type *string `type:"string"` 2230} 2231 2232// String returns the string representation 2233func (s Service) String() string { 2234 return awsutil.Prettify(s) 2235} 2236 2237// GoString returns the string representation 2238func (s Service) GoString() string { 2239 return s.String() 2240} 2241 2242// SetAccountId sets the AccountId field's value. 2243func (s *Service) SetAccountId(v string) *Service { 2244 s.AccountId = &v 2245 return s 2246} 2247 2248// SetDurationHistogram sets the DurationHistogram field's value. 2249func (s *Service) SetDurationHistogram(v []*HistogramEntry) *Service { 2250 s.DurationHistogram = v 2251 return s 2252} 2253 2254// SetEdges sets the Edges field's value. 2255func (s *Service) SetEdges(v []*Edge) *Service { 2256 s.Edges = v 2257 return s 2258} 2259 2260// SetEndTime sets the EndTime field's value. 2261func (s *Service) SetEndTime(v time.Time) *Service { 2262 s.EndTime = &v 2263 return s 2264} 2265 2266// SetName sets the Name field's value. 2267func (s *Service) SetName(v string) *Service { 2268 s.Name = &v 2269 return s 2270} 2271 2272// SetNames sets the Names field's value. 2273func (s *Service) SetNames(v []*string) *Service { 2274 s.Names = v 2275 return s 2276} 2277 2278// SetReferenceId sets the ReferenceId field's value. 2279func (s *Service) SetReferenceId(v int64) *Service { 2280 s.ReferenceId = &v 2281 return s 2282} 2283 2284// SetResponseTimeHistogram sets the ResponseTimeHistogram field's value. 2285func (s *Service) SetResponseTimeHistogram(v []*HistogramEntry) *Service { 2286 s.ResponseTimeHistogram = v 2287 return s 2288} 2289 2290// SetRoot sets the Root field's value. 2291func (s *Service) SetRoot(v bool) *Service { 2292 s.Root = &v 2293 return s 2294} 2295 2296// SetStartTime sets the StartTime field's value. 2297func (s *Service) SetStartTime(v time.Time) *Service { 2298 s.StartTime = &v 2299 return s 2300} 2301 2302// SetState sets the State field's value. 2303func (s *Service) SetState(v string) *Service { 2304 s.State = &v 2305 return s 2306} 2307 2308// SetSummaryStatistics sets the SummaryStatistics field's value. 2309func (s *Service) SetSummaryStatistics(v *ServiceStatistics) *Service { 2310 s.SummaryStatistics = v 2311 return s 2312} 2313 2314// SetType sets the Type field's value. 2315func (s *Service) SetType(v string) *Service { 2316 s.Type = &v 2317 return s 2318} 2319 2320type ServiceId struct { 2321 _ struct{} `type:"structure"` 2322 2323 AccountId *string `type:"string"` 2324 2325 Name *string `type:"string"` 2326 2327 Names []*string `type:"list"` 2328 2329 Type *string `type:"string"` 2330} 2331 2332// String returns the string representation 2333func (s ServiceId) String() string { 2334 return awsutil.Prettify(s) 2335} 2336 2337// GoString returns the string representation 2338func (s ServiceId) GoString() string { 2339 return s.String() 2340} 2341 2342// SetAccountId sets the AccountId field's value. 2343func (s *ServiceId) SetAccountId(v string) *ServiceId { 2344 s.AccountId = &v 2345 return s 2346} 2347 2348// SetName sets the Name field's value. 2349func (s *ServiceId) SetName(v string) *ServiceId { 2350 s.Name = &v 2351 return s 2352} 2353 2354// SetNames sets the Names field's value. 2355func (s *ServiceId) SetNames(v []*string) *ServiceId { 2356 s.Names = v 2357 return s 2358} 2359 2360// SetType sets the Type field's value. 2361func (s *ServiceId) SetType(v string) *ServiceId { 2362 s.Type = &v 2363 return s 2364} 2365 2366// Response statistics for a service. 2367type ServiceStatistics struct { 2368 _ struct{} `type:"structure"` 2369 2370 // Information about requests that failed with a 4xx Client Error status code. 2371 ErrorStatistics *ErrorStatistics `type:"structure"` 2372 2373 // Information about requests that failed with a 5xx Server Error status code. 2374 FaultStatistics *FaultStatistics `type:"structure"` 2375 2376 // The number of requests that completed with a 2xx Success status code. 2377 OkCount *int64 `type:"long"` 2378 2379 // The total number of completed requests. 2380 TotalCount *int64 `type:"long"` 2381 2382 // The aggregate response time of completed requests. 2383 TotalResponseTime *float64 `type:"double"` 2384} 2385 2386// String returns the string representation 2387func (s ServiceStatistics) String() string { 2388 return awsutil.Prettify(s) 2389} 2390 2391// GoString returns the string representation 2392func (s ServiceStatistics) GoString() string { 2393 return s.String() 2394} 2395 2396// SetErrorStatistics sets the ErrorStatistics field's value. 2397func (s *ServiceStatistics) SetErrorStatistics(v *ErrorStatistics) *ServiceStatistics { 2398 s.ErrorStatistics = v 2399 return s 2400} 2401 2402// SetFaultStatistics sets the FaultStatistics field's value. 2403func (s *ServiceStatistics) SetFaultStatistics(v *FaultStatistics) *ServiceStatistics { 2404 s.FaultStatistics = v 2405 return s 2406} 2407 2408// SetOkCount sets the OkCount field's value. 2409func (s *ServiceStatistics) SetOkCount(v int64) *ServiceStatistics { 2410 s.OkCount = &v 2411 return s 2412} 2413 2414// SetTotalCount sets the TotalCount field's value. 2415func (s *ServiceStatistics) SetTotalCount(v int64) *ServiceStatistics { 2416 s.TotalCount = &v 2417 return s 2418} 2419 2420// SetTotalResponseTime sets the TotalResponseTime field's value. 2421func (s *ServiceStatistics) SetTotalResponseTime(v float64) *ServiceStatistics { 2422 s.TotalResponseTime = &v 2423 return s 2424} 2425 2426type TelemetryRecord struct { 2427 _ struct{} `type:"structure"` 2428 2429 BackendConnectionErrors *BackendConnectionErrors `type:"structure"` 2430 2431 SegmentsReceivedCount *int64 `type:"integer"` 2432 2433 SegmentsRejectedCount *int64 `type:"integer"` 2434 2435 SegmentsSentCount *int64 `type:"integer"` 2436 2437 SegmentsSpilloverCount *int64 `type:"integer"` 2438 2439 // Timestamp is a required field 2440 Timestamp *time.Time `type:"timestamp" required:"true"` 2441} 2442 2443// String returns the string representation 2444func (s TelemetryRecord) String() string { 2445 return awsutil.Prettify(s) 2446} 2447 2448// GoString returns the string representation 2449func (s TelemetryRecord) GoString() string { 2450 return s.String() 2451} 2452 2453// Validate inspects the fields of the type to determine if they are valid. 2454func (s *TelemetryRecord) Validate() error { 2455 invalidParams := request.ErrInvalidParams{Context: "TelemetryRecord"} 2456 if s.Timestamp == nil { 2457 invalidParams.Add(request.NewErrParamRequired("Timestamp")) 2458 } 2459 2460 if invalidParams.Len() > 0 { 2461 return invalidParams 2462 } 2463 return nil 2464} 2465 2466// SetBackendConnectionErrors sets the BackendConnectionErrors field's value. 2467func (s *TelemetryRecord) SetBackendConnectionErrors(v *BackendConnectionErrors) *TelemetryRecord { 2468 s.BackendConnectionErrors = v 2469 return s 2470} 2471 2472// SetSegmentsReceivedCount sets the SegmentsReceivedCount field's value. 2473func (s *TelemetryRecord) SetSegmentsReceivedCount(v int64) *TelemetryRecord { 2474 s.SegmentsReceivedCount = &v 2475 return s 2476} 2477 2478// SetSegmentsRejectedCount sets the SegmentsRejectedCount field's value. 2479func (s *TelemetryRecord) SetSegmentsRejectedCount(v int64) *TelemetryRecord { 2480 s.SegmentsRejectedCount = &v 2481 return s 2482} 2483 2484// SetSegmentsSentCount sets the SegmentsSentCount field's value. 2485func (s *TelemetryRecord) SetSegmentsSentCount(v int64) *TelemetryRecord { 2486 s.SegmentsSentCount = &v 2487 return s 2488} 2489 2490// SetSegmentsSpilloverCount sets the SegmentsSpilloverCount field's value. 2491func (s *TelemetryRecord) SetSegmentsSpilloverCount(v int64) *TelemetryRecord { 2492 s.SegmentsSpilloverCount = &v 2493 return s 2494} 2495 2496// SetTimestamp sets the Timestamp field's value. 2497func (s *TelemetryRecord) SetTimestamp(v time.Time) *TelemetryRecord { 2498 s.Timestamp = &v 2499 return s 2500} 2501 2502// A collection of segment documents with matching trace IDs. 2503type Trace struct { 2504 _ struct{} `type:"structure"` 2505 2506 // The length of time in seconds between the start time of the root segment 2507 // and the end time of the last segment that completed. 2508 Duration *float64 `type:"double"` 2509 2510 // The unique identifier for the request that generated the trace's segments 2511 // and subsegments. 2512 Id *string `min:"1" type:"string"` 2513 2514 // Segment documents for the segments and subsegments that comprise the trace. 2515 Segments []*Segment `type:"list"` 2516} 2517 2518// String returns the string representation 2519func (s Trace) String() string { 2520 return awsutil.Prettify(s) 2521} 2522 2523// GoString returns the string representation 2524func (s Trace) GoString() string { 2525 return s.String() 2526} 2527 2528// SetDuration sets the Duration field's value. 2529func (s *Trace) SetDuration(v float64) *Trace { 2530 s.Duration = &v 2531 return s 2532} 2533 2534// SetId sets the Id field's value. 2535func (s *Trace) SetId(v string) *Trace { 2536 s.Id = &v 2537 return s 2538} 2539 2540// SetSegments sets the Segments field's value. 2541func (s *Trace) SetSegments(v []*Segment) *Trace { 2542 s.Segments = v 2543 return s 2544} 2545 2546// Metadata generated from the segment documents in a trace. 2547type TraceSummary struct { 2548 _ struct{} `type:"structure"` 2549 2550 // Annotations from the trace's segment documents. 2551 Annotations map[string][]*ValueWithServiceIds `type:"map"` 2552 2553 // The length of time in seconds between the start time of the root segment 2554 // and the end time of the last segment that completed. 2555 Duration *float64 `type:"double"` 2556 2557 // One or more of the segment documents has a 400 series error. 2558 HasError *bool `type:"boolean"` 2559 2560 // One or more of the segment documents has a 500 series error. 2561 HasFault *bool `type:"boolean"` 2562 2563 // One or more of the segment documents has a 429 throttling error. 2564 HasThrottle *bool `type:"boolean"` 2565 2566 // Information about the HTTP request served by the trace. 2567 Http *Http `type:"structure"` 2568 2569 // The unique identifier for the request that generated the trace's segments 2570 // and subsegments. 2571 Id *string `min:"1" type:"string"` 2572 2573 // One or more of the segment documents is in progress. 2574 IsPartial *bool `type:"boolean"` 2575 2576 // The length of time in seconds between the start and end times of the root 2577 // segment. If the service performs work asynchronously, the response time measures 2578 // the time before the response is sent to the user, while the duration measures 2579 // the amount of time before the last traced activity completes. 2580 ResponseTime *float64 `type:"double"` 2581 2582 // Service IDs from the trace's segment documents. 2583 ServiceIds []*ServiceId `type:"list"` 2584 2585 // Users from the trace's segment documents. 2586 Users []*TraceUser `type:"list"` 2587} 2588 2589// String returns the string representation 2590func (s TraceSummary) String() string { 2591 return awsutil.Prettify(s) 2592} 2593 2594// GoString returns the string representation 2595func (s TraceSummary) GoString() string { 2596 return s.String() 2597} 2598 2599// SetAnnotations sets the Annotations field's value. 2600func (s *TraceSummary) SetAnnotations(v map[string][]*ValueWithServiceIds) *TraceSummary { 2601 s.Annotations = v 2602 return s 2603} 2604 2605// SetDuration sets the Duration field's value. 2606func (s *TraceSummary) SetDuration(v float64) *TraceSummary { 2607 s.Duration = &v 2608 return s 2609} 2610 2611// SetHasError sets the HasError field's value. 2612func (s *TraceSummary) SetHasError(v bool) *TraceSummary { 2613 s.HasError = &v 2614 return s 2615} 2616 2617// SetHasFault sets the HasFault field's value. 2618func (s *TraceSummary) SetHasFault(v bool) *TraceSummary { 2619 s.HasFault = &v 2620 return s 2621} 2622 2623// SetHasThrottle sets the HasThrottle field's value. 2624func (s *TraceSummary) SetHasThrottle(v bool) *TraceSummary { 2625 s.HasThrottle = &v 2626 return s 2627} 2628 2629// SetHttp sets the Http field's value. 2630func (s *TraceSummary) SetHttp(v *Http) *TraceSummary { 2631 s.Http = v 2632 return s 2633} 2634 2635// SetId sets the Id field's value. 2636func (s *TraceSummary) SetId(v string) *TraceSummary { 2637 s.Id = &v 2638 return s 2639} 2640 2641// SetIsPartial sets the IsPartial field's value. 2642func (s *TraceSummary) SetIsPartial(v bool) *TraceSummary { 2643 s.IsPartial = &v 2644 return s 2645} 2646 2647// SetResponseTime sets the ResponseTime field's value. 2648func (s *TraceSummary) SetResponseTime(v float64) *TraceSummary { 2649 s.ResponseTime = &v 2650 return s 2651} 2652 2653// SetServiceIds sets the ServiceIds field's value. 2654func (s *TraceSummary) SetServiceIds(v []*ServiceId) *TraceSummary { 2655 s.ServiceIds = v 2656 return s 2657} 2658 2659// SetUsers sets the Users field's value. 2660func (s *TraceSummary) SetUsers(v []*TraceUser) *TraceSummary { 2661 s.Users = v 2662 return s 2663} 2664 2665// Information about a user recorded in segment documents. 2666type TraceUser struct { 2667 _ struct{} `type:"structure"` 2668 2669 // Services that the user's request hit. 2670 ServiceIds []*ServiceId `type:"list"` 2671 2672 // The user's name. 2673 UserName *string `type:"string"` 2674} 2675 2676// String returns the string representation 2677func (s TraceUser) String() string { 2678 return awsutil.Prettify(s) 2679} 2680 2681// GoString returns the string representation 2682func (s TraceUser) GoString() string { 2683 return s.String() 2684} 2685 2686// SetServiceIds sets the ServiceIds field's value. 2687func (s *TraceUser) SetServiceIds(v []*ServiceId) *TraceUser { 2688 s.ServiceIds = v 2689 return s 2690} 2691 2692// SetUserName sets the UserName field's value. 2693func (s *TraceUser) SetUserName(v string) *TraceUser { 2694 s.UserName = &v 2695 return s 2696} 2697 2698// Information about a segment that failed processing. 2699type UnprocessedTraceSegment struct { 2700 _ struct{} `type:"structure"` 2701 2702 // The error that caused processing to fail. 2703 ErrorCode *string `type:"string"` 2704 2705 // The segment's ID. 2706 Id *string `type:"string"` 2707 2708 // The error message. 2709 Message *string `type:"string"` 2710} 2711 2712// String returns the string representation 2713func (s UnprocessedTraceSegment) String() string { 2714 return awsutil.Prettify(s) 2715} 2716 2717// GoString returns the string representation 2718func (s UnprocessedTraceSegment) GoString() string { 2719 return s.String() 2720} 2721 2722// SetErrorCode sets the ErrorCode field's value. 2723func (s *UnprocessedTraceSegment) SetErrorCode(v string) *UnprocessedTraceSegment { 2724 s.ErrorCode = &v 2725 return s 2726} 2727 2728// SetId sets the Id field's value. 2729func (s *UnprocessedTraceSegment) SetId(v string) *UnprocessedTraceSegment { 2730 s.Id = &v 2731 return s 2732} 2733 2734// SetMessage sets the Message field's value. 2735func (s *UnprocessedTraceSegment) SetMessage(v string) *UnprocessedTraceSegment { 2736 s.Message = &v 2737 return s 2738} 2739 2740// Information about a segment annotation. 2741type ValueWithServiceIds struct { 2742 _ struct{} `type:"structure"` 2743 2744 // Values of the annotation. 2745 AnnotationValue *AnnotationValue `type:"structure"` 2746 2747 // Services to which the annotation applies. 2748 ServiceIds []*ServiceId `type:"list"` 2749} 2750 2751// String returns the string representation 2752func (s ValueWithServiceIds) String() string { 2753 return awsutil.Prettify(s) 2754} 2755 2756// GoString returns the string representation 2757func (s ValueWithServiceIds) GoString() string { 2758 return s.String() 2759} 2760 2761// SetAnnotationValue sets the AnnotationValue field's value. 2762func (s *ValueWithServiceIds) SetAnnotationValue(v *AnnotationValue) *ValueWithServiceIds { 2763 s.AnnotationValue = v 2764 return s 2765} 2766 2767// SetServiceIds sets the ServiceIds field's value. 2768func (s *ValueWithServiceIds) SetServiceIds(v []*ServiceId) *ValueWithServiceIds { 2769 s.ServiceIds = v 2770 return s 2771} 2772 2773const ( 2774 // EncryptionStatusUpdating is a EncryptionStatus enum value 2775 EncryptionStatusUpdating = "UPDATING" 2776 2777 // EncryptionStatusActive is a EncryptionStatus enum value 2778 EncryptionStatusActive = "ACTIVE" 2779) 2780 2781const ( 2782 // EncryptionTypeNone is a EncryptionType enum value 2783 EncryptionTypeNone = "NONE" 2784 2785 // EncryptionTypeKms is a EncryptionType enum value 2786 EncryptionTypeKms = "KMS" 2787) 2788