1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package codeguruprofiler 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 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/restjson" 14) 15 16const opConfigureAgent = "ConfigureAgent" 17 18// ConfigureAgentRequest generates a "aws/request.Request" representing the 19// client's request for the ConfigureAgent operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See ConfigureAgent for more information on using the ConfigureAgent 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the ConfigureAgentRequest method. 34// req, resp := client.ConfigureAgentRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ConfigureAgent 42func (c *CodeGuruProfiler) ConfigureAgentRequest(input *ConfigureAgentInput) (req *request.Request, output *ConfigureAgentOutput) { 43 op := &request.Operation{ 44 Name: opConfigureAgent, 45 HTTPMethod: "POST", 46 HTTPPath: "/profilingGroups/{profilingGroupName}/configureAgent", 47 } 48 49 if input == nil { 50 input = &ConfigureAgentInput{} 51 } 52 53 output = &ConfigureAgentOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// ConfigureAgent API operation for Amazon CodeGuru Profiler. 59// 60// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 61// with awserr.Error's Code and Message methods to get detailed information about 62// the error. 63// 64// See the AWS API reference guide for Amazon CodeGuru Profiler's 65// API operation ConfigureAgent for usage and error information. 66// 67// Returned Error Types: 68// * InternalServerException 69// The server encountered an internal error and is unable to complete the request. 70// 71// * ValidationException 72// The parameter is not valid. 73// 74// * ThrottlingException 75// The request was denied due to request throttling. 76// 77// * ResourceNotFoundException 78// The resource specified in the request does not exist. 79// 80// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ConfigureAgent 81func (c *CodeGuruProfiler) ConfigureAgent(input *ConfigureAgentInput) (*ConfigureAgentOutput, error) { 82 req, out := c.ConfigureAgentRequest(input) 83 return out, req.Send() 84} 85 86// ConfigureAgentWithContext is the same as ConfigureAgent with the addition of 87// the ability to pass a context and additional request options. 88// 89// See ConfigureAgent for details on how to use this API operation. 90// 91// The context must be non-nil and will be used for request cancellation. If 92// the context is nil a panic will occur. In the future the SDK may create 93// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 94// for more information on using Contexts. 95func (c *CodeGuruProfiler) ConfigureAgentWithContext(ctx aws.Context, input *ConfigureAgentInput, opts ...request.Option) (*ConfigureAgentOutput, error) { 96 req, out := c.ConfigureAgentRequest(input) 97 req.SetContext(ctx) 98 req.ApplyOptions(opts...) 99 return out, req.Send() 100} 101 102const opCreateProfilingGroup = "CreateProfilingGroup" 103 104// CreateProfilingGroupRequest generates a "aws/request.Request" representing the 105// client's request for the CreateProfilingGroup operation. The "output" return 106// value will be populated with the request's response once the request completes 107// successfully. 108// 109// Use "Send" method on the returned Request to send the API call to the service. 110// the "output" return value is not valid until after Send returns without error. 111// 112// See CreateProfilingGroup for more information on using the CreateProfilingGroup 113// API call, and error handling. 114// 115// This method is useful when you want to inject custom logic or configuration 116// into the SDK's request lifecycle. Such as custom headers, or retry logic. 117// 118// 119// // Example sending a request using the CreateProfilingGroupRequest method. 120// req, resp := client.CreateProfilingGroupRequest(params) 121// 122// err := req.Send() 123// if err == nil { // resp is now filled 124// fmt.Println(resp) 125// } 126// 127// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/CreateProfilingGroup 128func (c *CodeGuruProfiler) CreateProfilingGroupRequest(input *CreateProfilingGroupInput) (req *request.Request, output *CreateProfilingGroupOutput) { 129 op := &request.Operation{ 130 Name: opCreateProfilingGroup, 131 HTTPMethod: "POST", 132 HTTPPath: "/profilingGroups", 133 } 134 135 if input == nil { 136 input = &CreateProfilingGroupInput{} 137 } 138 139 output = &CreateProfilingGroupOutput{} 140 req = c.newRequest(op, input, output) 141 return 142} 143 144// CreateProfilingGroup API operation for Amazon CodeGuru Profiler. 145// 146// Creates a profiling group. 147// 148// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 149// with awserr.Error's Code and Message methods to get detailed information about 150// the error. 151// 152// See the AWS API reference guide for Amazon CodeGuru Profiler's 153// API operation CreateProfilingGroup for usage and error information. 154// 155// Returned Error Types: 156// * ServiceQuotaExceededException 157// You have exceeded your service quota. To perform the requested action, remove 158// some of the relevant resources, or use Service Quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) 159// to request a service quota increase. 160// 161// * InternalServerException 162// The server encountered an internal error and is unable to complete the request. 163// 164// * ConflictException 165// The requested operation would cause a conflict with the current state of 166// a service resource associated with the request. Resolve the conflict before 167// retrying this request. 168// 169// * ValidationException 170// The parameter is not valid. 171// 172// * ThrottlingException 173// The request was denied due to request throttling. 174// 175// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/CreateProfilingGroup 176func (c *CodeGuruProfiler) CreateProfilingGroup(input *CreateProfilingGroupInput) (*CreateProfilingGroupOutput, error) { 177 req, out := c.CreateProfilingGroupRequest(input) 178 return out, req.Send() 179} 180 181// CreateProfilingGroupWithContext is the same as CreateProfilingGroup with the addition of 182// the ability to pass a context and additional request options. 183// 184// See CreateProfilingGroup for details on how to use this API operation. 185// 186// The context must be non-nil and will be used for request cancellation. If 187// the context is nil a panic will occur. In the future the SDK may create 188// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 189// for more information on using Contexts. 190func (c *CodeGuruProfiler) CreateProfilingGroupWithContext(ctx aws.Context, input *CreateProfilingGroupInput, opts ...request.Option) (*CreateProfilingGroupOutput, error) { 191 req, out := c.CreateProfilingGroupRequest(input) 192 req.SetContext(ctx) 193 req.ApplyOptions(opts...) 194 return out, req.Send() 195} 196 197const opDeleteProfilingGroup = "DeleteProfilingGroup" 198 199// DeleteProfilingGroupRequest generates a "aws/request.Request" representing the 200// client's request for the DeleteProfilingGroup operation. The "output" return 201// value will be populated with the request's response once the request completes 202// successfully. 203// 204// Use "Send" method on the returned Request to send the API call to the service. 205// the "output" return value is not valid until after Send returns without error. 206// 207// See DeleteProfilingGroup for more information on using the DeleteProfilingGroup 208// API call, and error handling. 209// 210// This method is useful when you want to inject custom logic or configuration 211// into the SDK's request lifecycle. Such as custom headers, or retry logic. 212// 213// 214// // Example sending a request using the DeleteProfilingGroupRequest method. 215// req, resp := client.DeleteProfilingGroupRequest(params) 216// 217// err := req.Send() 218// if err == nil { // resp is now filled 219// fmt.Println(resp) 220// } 221// 222// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DeleteProfilingGroup 223func (c *CodeGuruProfiler) DeleteProfilingGroupRequest(input *DeleteProfilingGroupInput) (req *request.Request, output *DeleteProfilingGroupOutput) { 224 op := &request.Operation{ 225 Name: opDeleteProfilingGroup, 226 HTTPMethod: "DELETE", 227 HTTPPath: "/profilingGroups/{profilingGroupName}", 228 } 229 230 if input == nil { 231 input = &DeleteProfilingGroupInput{} 232 } 233 234 output = &DeleteProfilingGroupOutput{} 235 req = c.newRequest(op, input, output) 236 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 237 return 238} 239 240// DeleteProfilingGroup API operation for Amazon CodeGuru Profiler. 241// 242// Deletes a profiling group. 243// 244// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 245// with awserr.Error's Code and Message methods to get detailed information about 246// the error. 247// 248// See the AWS API reference guide for Amazon CodeGuru Profiler's 249// API operation DeleteProfilingGroup for usage and error information. 250// 251// Returned Error Types: 252// * InternalServerException 253// The server encountered an internal error and is unable to complete the request. 254// 255// * ValidationException 256// The parameter is not valid. 257// 258// * ThrottlingException 259// The request was denied due to request throttling. 260// 261// * ResourceNotFoundException 262// The resource specified in the request does not exist. 263// 264// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DeleteProfilingGroup 265func (c *CodeGuruProfiler) DeleteProfilingGroup(input *DeleteProfilingGroupInput) (*DeleteProfilingGroupOutput, error) { 266 req, out := c.DeleteProfilingGroupRequest(input) 267 return out, req.Send() 268} 269 270// DeleteProfilingGroupWithContext is the same as DeleteProfilingGroup with the addition of 271// the ability to pass a context and additional request options. 272// 273// See DeleteProfilingGroup for details on how to use this API operation. 274// 275// The context must be non-nil and will be used for request cancellation. If 276// the context is nil a panic will occur. In the future the SDK may create 277// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 278// for more information on using Contexts. 279func (c *CodeGuruProfiler) DeleteProfilingGroupWithContext(ctx aws.Context, input *DeleteProfilingGroupInput, opts ...request.Option) (*DeleteProfilingGroupOutput, error) { 280 req, out := c.DeleteProfilingGroupRequest(input) 281 req.SetContext(ctx) 282 req.ApplyOptions(opts...) 283 return out, req.Send() 284} 285 286const opDescribeProfilingGroup = "DescribeProfilingGroup" 287 288// DescribeProfilingGroupRequest generates a "aws/request.Request" representing the 289// client's request for the DescribeProfilingGroup operation. The "output" return 290// value will be populated with the request's response once the request completes 291// successfully. 292// 293// Use "Send" method on the returned Request to send the API call to the service. 294// the "output" return value is not valid until after Send returns without error. 295// 296// See DescribeProfilingGroup for more information on using the DescribeProfilingGroup 297// API call, and error handling. 298// 299// This method is useful when you want to inject custom logic or configuration 300// into the SDK's request lifecycle. Such as custom headers, or retry logic. 301// 302// 303// // Example sending a request using the DescribeProfilingGroupRequest method. 304// req, resp := client.DescribeProfilingGroupRequest(params) 305// 306// err := req.Send() 307// if err == nil { // resp is now filled 308// fmt.Println(resp) 309// } 310// 311// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DescribeProfilingGroup 312func (c *CodeGuruProfiler) DescribeProfilingGroupRequest(input *DescribeProfilingGroupInput) (req *request.Request, output *DescribeProfilingGroupOutput) { 313 op := &request.Operation{ 314 Name: opDescribeProfilingGroup, 315 HTTPMethod: "GET", 316 HTTPPath: "/profilingGroups/{profilingGroupName}", 317 } 318 319 if input == nil { 320 input = &DescribeProfilingGroupInput{} 321 } 322 323 output = &DescribeProfilingGroupOutput{} 324 req = c.newRequest(op, input, output) 325 return 326} 327 328// DescribeProfilingGroup API operation for Amazon CodeGuru Profiler. 329// 330// Describes a profiling group. 331// 332// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 333// with awserr.Error's Code and Message methods to get detailed information about 334// the error. 335// 336// See the AWS API reference guide for Amazon CodeGuru Profiler's 337// API operation DescribeProfilingGroup for usage and error information. 338// 339// Returned Error Types: 340// * InternalServerException 341// The server encountered an internal error and is unable to complete the request. 342// 343// * ValidationException 344// The parameter is not valid. 345// 346// * ThrottlingException 347// The request was denied due to request throttling. 348// 349// * ResourceNotFoundException 350// The resource specified in the request does not exist. 351// 352// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/DescribeProfilingGroup 353func (c *CodeGuruProfiler) DescribeProfilingGroup(input *DescribeProfilingGroupInput) (*DescribeProfilingGroupOutput, error) { 354 req, out := c.DescribeProfilingGroupRequest(input) 355 return out, req.Send() 356} 357 358// DescribeProfilingGroupWithContext is the same as DescribeProfilingGroup with the addition of 359// the ability to pass a context and additional request options. 360// 361// See DescribeProfilingGroup for details on how to use this API operation. 362// 363// The context must be non-nil and will be used for request cancellation. If 364// the context is nil a panic will occur. In the future the SDK may create 365// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 366// for more information on using Contexts. 367func (c *CodeGuruProfiler) DescribeProfilingGroupWithContext(ctx aws.Context, input *DescribeProfilingGroupInput, opts ...request.Option) (*DescribeProfilingGroupOutput, error) { 368 req, out := c.DescribeProfilingGroupRequest(input) 369 req.SetContext(ctx) 370 req.ApplyOptions(opts...) 371 return out, req.Send() 372} 373 374const opGetPolicy = "GetPolicy" 375 376// GetPolicyRequest generates a "aws/request.Request" representing the 377// client's request for the GetPolicy operation. The "output" return 378// value will be populated with the request's response once the request completes 379// successfully. 380// 381// Use "Send" method on the returned Request to send the API call to the service. 382// the "output" return value is not valid until after Send returns without error. 383// 384// See GetPolicy for more information on using the GetPolicy 385// API call, and error handling. 386// 387// This method is useful when you want to inject custom logic or configuration 388// into the SDK's request lifecycle. Such as custom headers, or retry logic. 389// 390// 391// // Example sending a request using the GetPolicyRequest method. 392// req, resp := client.GetPolicyRequest(params) 393// 394// err := req.Send() 395// if err == nil { // resp is now filled 396// fmt.Println(resp) 397// } 398// 399// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetPolicy 400func (c *CodeGuruProfiler) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { 401 op := &request.Operation{ 402 Name: opGetPolicy, 403 HTTPMethod: "GET", 404 HTTPPath: "/profilingGroups/{profilingGroupName}/policy", 405 } 406 407 if input == nil { 408 input = &GetPolicyInput{} 409 } 410 411 output = &GetPolicyOutput{} 412 req = c.newRequest(op, input, output) 413 return 414} 415 416// GetPolicy API operation for Amazon CodeGuru Profiler. 417// 418// Gets the profiling group policy. 419// 420// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 421// with awserr.Error's Code and Message methods to get detailed information about 422// the error. 423// 424// See the AWS API reference guide for Amazon CodeGuru Profiler's 425// API operation GetPolicy for usage and error information. 426// 427// Returned Error Types: 428// * InternalServerException 429// The server encountered an internal error and is unable to complete the request. 430// 431// * ThrottlingException 432// The request was denied due to request throttling. 433// 434// * ResourceNotFoundException 435// The resource specified in the request does not exist. 436// 437// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetPolicy 438func (c *CodeGuruProfiler) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { 439 req, out := c.GetPolicyRequest(input) 440 return out, req.Send() 441} 442 443// GetPolicyWithContext is the same as GetPolicy with the addition of 444// the ability to pass a context and additional request options. 445// 446// See GetPolicy for details on how to use this API operation. 447// 448// The context must be non-nil and will be used for request cancellation. If 449// the context is nil a panic will occur. In the future the SDK may create 450// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 451// for more information on using Contexts. 452func (c *CodeGuruProfiler) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { 453 req, out := c.GetPolicyRequest(input) 454 req.SetContext(ctx) 455 req.ApplyOptions(opts...) 456 return out, req.Send() 457} 458 459const opGetProfile = "GetProfile" 460 461// GetProfileRequest generates a "aws/request.Request" representing the 462// client's request for the GetProfile operation. The "output" return 463// value will be populated with the request's response once the request completes 464// successfully. 465// 466// Use "Send" method on the returned Request to send the API call to the service. 467// the "output" return value is not valid until after Send returns without error. 468// 469// See GetProfile for more information on using the GetProfile 470// API call, and error handling. 471// 472// This method is useful when you want to inject custom logic or configuration 473// into the SDK's request lifecycle. Such as custom headers, or retry logic. 474// 475// 476// // Example sending a request using the GetProfileRequest method. 477// req, resp := client.GetProfileRequest(params) 478// 479// err := req.Send() 480// if err == nil { // resp is now filled 481// fmt.Println(resp) 482// } 483// 484// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetProfile 485func (c *CodeGuruProfiler) GetProfileRequest(input *GetProfileInput) (req *request.Request, output *GetProfileOutput) { 486 op := &request.Operation{ 487 Name: opGetProfile, 488 HTTPMethod: "GET", 489 HTTPPath: "/profilingGroups/{profilingGroupName}/profile", 490 } 491 492 if input == nil { 493 input = &GetProfileInput{} 494 } 495 496 output = &GetProfileOutput{} 497 req = c.newRequest(op, input, output) 498 return 499} 500 501// GetProfile API operation for Amazon CodeGuru Profiler. 502// 503// Gets the aggregated profile of a profiling group for the specified time range. 504// If the requested time range does not align with the available aggregated 505// profiles, it is expanded to attain alignment. If aggregated profiles are 506// available only for part of the period requested, the profile is returned 507// from the earliest available to the latest within the requested time range. 508// 509// For example, if the requested time range is from 00:00 to 00:20 and the available 510// profiles are from 00:15 to 00:25, the returned profile will be from 00:15 511// to 00:20. 512// 513// You must specify exactly two of the following parameters: startTime, period, 514// and endTime. 515// 516// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 517// with awserr.Error's Code and Message methods to get detailed information about 518// the error. 519// 520// See the AWS API reference guide for Amazon CodeGuru Profiler's 521// API operation GetProfile for usage and error information. 522// 523// Returned Error Types: 524// * InternalServerException 525// The server encountered an internal error and is unable to complete the request. 526// 527// * ValidationException 528// The parameter is not valid. 529// 530// * ThrottlingException 531// The request was denied due to request throttling. 532// 533// * ResourceNotFoundException 534// The resource specified in the request does not exist. 535// 536// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/GetProfile 537func (c *CodeGuruProfiler) GetProfile(input *GetProfileInput) (*GetProfileOutput, error) { 538 req, out := c.GetProfileRequest(input) 539 return out, req.Send() 540} 541 542// GetProfileWithContext is the same as GetProfile with the addition of 543// the ability to pass a context and additional request options. 544// 545// See GetProfile for details on how to use this API operation. 546// 547// The context must be non-nil and will be used for request cancellation. If 548// the context is nil a panic will occur. In the future the SDK may create 549// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 550// for more information on using Contexts. 551func (c *CodeGuruProfiler) GetProfileWithContext(ctx aws.Context, input *GetProfileInput, opts ...request.Option) (*GetProfileOutput, error) { 552 req, out := c.GetProfileRequest(input) 553 req.SetContext(ctx) 554 req.ApplyOptions(opts...) 555 return out, req.Send() 556} 557 558const opListProfileTimes = "ListProfileTimes" 559 560// ListProfileTimesRequest generates a "aws/request.Request" representing the 561// client's request for the ListProfileTimes operation. The "output" return 562// value will be populated with the request's response once the request completes 563// successfully. 564// 565// Use "Send" method on the returned Request to send the API call to the service. 566// the "output" return value is not valid until after Send returns without error. 567// 568// See ListProfileTimes for more information on using the ListProfileTimes 569// API call, and error handling. 570// 571// This method is useful when you want to inject custom logic or configuration 572// into the SDK's request lifecycle. Such as custom headers, or retry logic. 573// 574// 575// // Example sending a request using the ListProfileTimesRequest method. 576// req, resp := client.ListProfileTimesRequest(params) 577// 578// err := req.Send() 579// if err == nil { // resp is now filled 580// fmt.Println(resp) 581// } 582// 583// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfileTimes 584func (c *CodeGuruProfiler) ListProfileTimesRequest(input *ListProfileTimesInput) (req *request.Request, output *ListProfileTimesOutput) { 585 op := &request.Operation{ 586 Name: opListProfileTimes, 587 HTTPMethod: "GET", 588 HTTPPath: "/profilingGroups/{profilingGroupName}/profileTimes", 589 Paginator: &request.Paginator{ 590 InputTokens: []string{"nextToken"}, 591 OutputTokens: []string{"nextToken"}, 592 LimitToken: "maxResults", 593 TruncationToken: "", 594 }, 595 } 596 597 if input == nil { 598 input = &ListProfileTimesInput{} 599 } 600 601 output = &ListProfileTimesOutput{} 602 req = c.newRequest(op, input, output) 603 return 604} 605 606// ListProfileTimes API operation for Amazon CodeGuru Profiler. 607// 608// List the start times of the available aggregated profiles of a profiling 609// group for an aggregation period within the specified time range. 610// 611// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 612// with awserr.Error's Code and Message methods to get detailed information about 613// the error. 614// 615// See the AWS API reference guide for Amazon CodeGuru Profiler's 616// API operation ListProfileTimes for usage and error information. 617// 618// Returned Error Types: 619// * InternalServerException 620// The server encountered an internal error and is unable to complete the request. 621// 622// * ValidationException 623// The parameter is not valid. 624// 625// * ThrottlingException 626// The request was denied due to request throttling. 627// 628// * ResourceNotFoundException 629// The resource specified in the request does not exist. 630// 631// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfileTimes 632func (c *CodeGuruProfiler) ListProfileTimes(input *ListProfileTimesInput) (*ListProfileTimesOutput, error) { 633 req, out := c.ListProfileTimesRequest(input) 634 return out, req.Send() 635} 636 637// ListProfileTimesWithContext is the same as ListProfileTimes with the addition of 638// the ability to pass a context and additional request options. 639// 640// See ListProfileTimes for details on how to use this API operation. 641// 642// The context must be non-nil and will be used for request cancellation. If 643// the context is nil a panic will occur. In the future the SDK may create 644// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 645// for more information on using Contexts. 646func (c *CodeGuruProfiler) ListProfileTimesWithContext(ctx aws.Context, input *ListProfileTimesInput, opts ...request.Option) (*ListProfileTimesOutput, error) { 647 req, out := c.ListProfileTimesRequest(input) 648 req.SetContext(ctx) 649 req.ApplyOptions(opts...) 650 return out, req.Send() 651} 652 653// ListProfileTimesPages iterates over the pages of a ListProfileTimes operation, 654// calling the "fn" function with the response data for each page. To stop 655// iterating, return false from the fn function. 656// 657// See ListProfileTimes method for more information on how to use this operation. 658// 659// Note: This operation can generate multiple requests to a service. 660// 661// // Example iterating over at most 3 pages of a ListProfileTimes operation. 662// pageNum := 0 663// err := client.ListProfileTimesPages(params, 664// func(page *codeguruprofiler.ListProfileTimesOutput, lastPage bool) bool { 665// pageNum++ 666// fmt.Println(page) 667// return pageNum <= 3 668// }) 669// 670func (c *CodeGuruProfiler) ListProfileTimesPages(input *ListProfileTimesInput, fn func(*ListProfileTimesOutput, bool) bool) error { 671 return c.ListProfileTimesPagesWithContext(aws.BackgroundContext(), input, fn) 672} 673 674// ListProfileTimesPagesWithContext same as ListProfileTimesPages except 675// it takes a Context and allows setting request options on the pages. 676// 677// The context must be non-nil and will be used for request cancellation. If 678// the context is nil a panic will occur. In the future the SDK may create 679// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 680// for more information on using Contexts. 681func (c *CodeGuruProfiler) ListProfileTimesPagesWithContext(ctx aws.Context, input *ListProfileTimesInput, fn func(*ListProfileTimesOutput, bool) bool, opts ...request.Option) error { 682 p := request.Pagination{ 683 NewRequest: func() (*request.Request, error) { 684 var inCpy *ListProfileTimesInput 685 if input != nil { 686 tmp := *input 687 inCpy = &tmp 688 } 689 req, _ := c.ListProfileTimesRequest(inCpy) 690 req.SetContext(ctx) 691 req.ApplyOptions(opts...) 692 return req, nil 693 }, 694 } 695 696 for p.Next() { 697 if !fn(p.Page().(*ListProfileTimesOutput), !p.HasNextPage()) { 698 break 699 } 700 } 701 702 return p.Err() 703} 704 705const opListProfilingGroups = "ListProfilingGroups" 706 707// ListProfilingGroupsRequest generates a "aws/request.Request" representing the 708// client's request for the ListProfilingGroups operation. The "output" return 709// value will be populated with the request's response once the request completes 710// successfully. 711// 712// Use "Send" method on the returned Request to send the API call to the service. 713// the "output" return value is not valid until after Send returns without error. 714// 715// See ListProfilingGroups for more information on using the ListProfilingGroups 716// API call, and error handling. 717// 718// This method is useful when you want to inject custom logic or configuration 719// into the SDK's request lifecycle. Such as custom headers, or retry logic. 720// 721// 722// // Example sending a request using the ListProfilingGroupsRequest method. 723// req, resp := client.ListProfilingGroupsRequest(params) 724// 725// err := req.Send() 726// if err == nil { // resp is now filled 727// fmt.Println(resp) 728// } 729// 730// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfilingGroups 731func (c *CodeGuruProfiler) ListProfilingGroupsRequest(input *ListProfilingGroupsInput) (req *request.Request, output *ListProfilingGroupsOutput) { 732 op := &request.Operation{ 733 Name: opListProfilingGroups, 734 HTTPMethod: "GET", 735 HTTPPath: "/profilingGroups", 736 Paginator: &request.Paginator{ 737 InputTokens: []string{"nextToken"}, 738 OutputTokens: []string{"nextToken"}, 739 LimitToken: "maxResults", 740 TruncationToken: "", 741 }, 742 } 743 744 if input == nil { 745 input = &ListProfilingGroupsInput{} 746 } 747 748 output = &ListProfilingGroupsOutput{} 749 req = c.newRequest(op, input, output) 750 return 751} 752 753// ListProfilingGroups API operation for Amazon CodeGuru Profiler. 754// 755// Lists profiling groups. 756// 757// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 758// with awserr.Error's Code and Message methods to get detailed information about 759// the error. 760// 761// See the AWS API reference guide for Amazon CodeGuru Profiler's 762// API operation ListProfilingGroups for usage and error information. 763// 764// Returned Error Types: 765// * InternalServerException 766// The server encountered an internal error and is unable to complete the request. 767// 768// * ThrottlingException 769// The request was denied due to request throttling. 770// 771// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListProfilingGroups 772func (c *CodeGuruProfiler) ListProfilingGroups(input *ListProfilingGroupsInput) (*ListProfilingGroupsOutput, error) { 773 req, out := c.ListProfilingGroupsRequest(input) 774 return out, req.Send() 775} 776 777// ListProfilingGroupsWithContext is the same as ListProfilingGroups with the addition of 778// the ability to pass a context and additional request options. 779// 780// See ListProfilingGroups for details on how to use this API operation. 781// 782// The context must be non-nil and will be used for request cancellation. If 783// the context is nil a panic will occur. In the future the SDK may create 784// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 785// for more information on using Contexts. 786func (c *CodeGuruProfiler) ListProfilingGroupsWithContext(ctx aws.Context, input *ListProfilingGroupsInput, opts ...request.Option) (*ListProfilingGroupsOutput, error) { 787 req, out := c.ListProfilingGroupsRequest(input) 788 req.SetContext(ctx) 789 req.ApplyOptions(opts...) 790 return out, req.Send() 791} 792 793// ListProfilingGroupsPages iterates over the pages of a ListProfilingGroups operation, 794// calling the "fn" function with the response data for each page. To stop 795// iterating, return false from the fn function. 796// 797// See ListProfilingGroups method for more information on how to use this operation. 798// 799// Note: This operation can generate multiple requests to a service. 800// 801// // Example iterating over at most 3 pages of a ListProfilingGroups operation. 802// pageNum := 0 803// err := client.ListProfilingGroupsPages(params, 804// func(page *codeguruprofiler.ListProfilingGroupsOutput, lastPage bool) bool { 805// pageNum++ 806// fmt.Println(page) 807// return pageNum <= 3 808// }) 809// 810func (c *CodeGuruProfiler) ListProfilingGroupsPages(input *ListProfilingGroupsInput, fn func(*ListProfilingGroupsOutput, bool) bool) error { 811 return c.ListProfilingGroupsPagesWithContext(aws.BackgroundContext(), input, fn) 812} 813 814// ListProfilingGroupsPagesWithContext same as ListProfilingGroupsPages except 815// it takes a Context and allows setting request options on the pages. 816// 817// The context must be non-nil and will be used for request cancellation. If 818// the context is nil a panic will occur. In the future the SDK may create 819// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 820// for more information on using Contexts. 821func (c *CodeGuruProfiler) ListProfilingGroupsPagesWithContext(ctx aws.Context, input *ListProfilingGroupsInput, fn func(*ListProfilingGroupsOutput, bool) bool, opts ...request.Option) error { 822 p := request.Pagination{ 823 NewRequest: func() (*request.Request, error) { 824 var inCpy *ListProfilingGroupsInput 825 if input != nil { 826 tmp := *input 827 inCpy = &tmp 828 } 829 req, _ := c.ListProfilingGroupsRequest(inCpy) 830 req.SetContext(ctx) 831 req.ApplyOptions(opts...) 832 return req, nil 833 }, 834 } 835 836 for p.Next() { 837 if !fn(p.Page().(*ListProfilingGroupsOutput), !p.HasNextPage()) { 838 break 839 } 840 } 841 842 return p.Err() 843} 844 845const opPostAgentProfile = "PostAgentProfile" 846 847// PostAgentProfileRequest generates a "aws/request.Request" representing the 848// client's request for the PostAgentProfile operation. The "output" return 849// value will be populated with the request's response once the request completes 850// successfully. 851// 852// Use "Send" method on the returned Request to send the API call to the service. 853// the "output" return value is not valid until after Send returns without error. 854// 855// See PostAgentProfile for more information on using the PostAgentProfile 856// API call, and error handling. 857// 858// This method is useful when you want to inject custom logic or configuration 859// into the SDK's request lifecycle. Such as custom headers, or retry logic. 860// 861// 862// // Example sending a request using the PostAgentProfileRequest method. 863// req, resp := client.PostAgentProfileRequest(params) 864// 865// err := req.Send() 866// if err == nil { // resp is now filled 867// fmt.Println(resp) 868// } 869// 870// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/PostAgentProfile 871func (c *CodeGuruProfiler) PostAgentProfileRequest(input *PostAgentProfileInput) (req *request.Request, output *PostAgentProfileOutput) { 872 op := &request.Operation{ 873 Name: opPostAgentProfile, 874 HTTPMethod: "POST", 875 HTTPPath: "/profilingGroups/{profilingGroupName}/agentProfile", 876 } 877 878 if input == nil { 879 input = &PostAgentProfileInput{} 880 } 881 882 output = &PostAgentProfileOutput{} 883 req = c.newRequest(op, input, output) 884 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 885 return 886} 887 888// PostAgentProfile API operation for Amazon CodeGuru Profiler. 889// 890// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 891// with awserr.Error's Code and Message methods to get detailed information about 892// the error. 893// 894// See the AWS API reference guide for Amazon CodeGuru Profiler's 895// API operation PostAgentProfile for usage and error information. 896// 897// Returned Error Types: 898// * InternalServerException 899// The server encountered an internal error and is unable to complete the request. 900// 901// * ValidationException 902// The parameter is not valid. 903// 904// * ThrottlingException 905// The request was denied due to request throttling. 906// 907// * ResourceNotFoundException 908// The resource specified in the request does not exist. 909// 910// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/PostAgentProfile 911func (c *CodeGuruProfiler) PostAgentProfile(input *PostAgentProfileInput) (*PostAgentProfileOutput, error) { 912 req, out := c.PostAgentProfileRequest(input) 913 return out, req.Send() 914} 915 916// PostAgentProfileWithContext is the same as PostAgentProfile with the addition of 917// the ability to pass a context and additional request options. 918// 919// See PostAgentProfile for details on how to use this API operation. 920// 921// The context must be non-nil and will be used for request cancellation. If 922// the context is nil a panic will occur. In the future the SDK may create 923// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 924// for more information on using Contexts. 925func (c *CodeGuruProfiler) PostAgentProfileWithContext(ctx aws.Context, input *PostAgentProfileInput, opts ...request.Option) (*PostAgentProfileOutput, error) { 926 req, out := c.PostAgentProfileRequest(input) 927 req.SetContext(ctx) 928 req.ApplyOptions(opts...) 929 return out, req.Send() 930} 931 932const opPutPermission = "PutPermission" 933 934// PutPermissionRequest generates a "aws/request.Request" representing the 935// client's request for the PutPermission operation. The "output" return 936// value will be populated with the request's response once the request completes 937// successfully. 938// 939// Use "Send" method on the returned Request to send the API call to the service. 940// the "output" return value is not valid until after Send returns without error. 941// 942// See PutPermission for more information on using the PutPermission 943// API call, and error handling. 944// 945// This method is useful when you want to inject custom logic or configuration 946// into the SDK's request lifecycle. Such as custom headers, or retry logic. 947// 948// 949// // Example sending a request using the PutPermissionRequest method. 950// req, resp := client.PutPermissionRequest(params) 951// 952// err := req.Send() 953// if err == nil { // resp is now filled 954// fmt.Println(resp) 955// } 956// 957// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/PutPermission 958func (c *CodeGuruProfiler) PutPermissionRequest(input *PutPermissionInput) (req *request.Request, output *PutPermissionOutput) { 959 op := &request.Operation{ 960 Name: opPutPermission, 961 HTTPMethod: "PUT", 962 HTTPPath: "/profilingGroups/{profilingGroupName}/policy/{actionGroup}", 963 } 964 965 if input == nil { 966 input = &PutPermissionInput{} 967 } 968 969 output = &PutPermissionOutput{} 970 req = c.newRequest(op, input, output) 971 return 972} 973 974// PutPermission API operation for Amazon CodeGuru Profiler. 975// 976// Provides permission to the principals. This overwrites the existing permissions, 977// and is not additive. 978// 979// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 980// with awserr.Error's Code and Message methods to get detailed information about 981// the error. 982// 983// See the AWS API reference guide for Amazon CodeGuru Profiler's 984// API operation PutPermission for usage and error information. 985// 986// Returned Error Types: 987// * InternalServerException 988// The server encountered an internal error and is unable to complete the request. 989// 990// * ConflictException 991// The requested operation would cause a conflict with the current state of 992// a service resource associated with the request. Resolve the conflict before 993// retrying this request. 994// 995// * ValidationException 996// The parameter is not valid. 997// 998// * ThrottlingException 999// The request was denied due to request throttling. 1000// 1001// * ResourceNotFoundException 1002// The resource specified in the request does not exist. 1003// 1004// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/PutPermission 1005func (c *CodeGuruProfiler) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { 1006 req, out := c.PutPermissionRequest(input) 1007 return out, req.Send() 1008} 1009 1010// PutPermissionWithContext is the same as PutPermission with the addition of 1011// the ability to pass a context and additional request options. 1012// 1013// See PutPermission for details on how to use this API operation. 1014// 1015// The context must be non-nil and will be used for request cancellation. If 1016// the context is nil a panic will occur. In the future the SDK may create 1017// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1018// for more information on using Contexts. 1019func (c *CodeGuruProfiler) PutPermissionWithContext(ctx aws.Context, input *PutPermissionInput, opts ...request.Option) (*PutPermissionOutput, error) { 1020 req, out := c.PutPermissionRequest(input) 1021 req.SetContext(ctx) 1022 req.ApplyOptions(opts...) 1023 return out, req.Send() 1024} 1025 1026const opRemovePermission = "RemovePermission" 1027 1028// RemovePermissionRequest generates a "aws/request.Request" representing the 1029// client's request for the RemovePermission operation. The "output" return 1030// value will be populated with the request's response once the request completes 1031// successfully. 1032// 1033// Use "Send" method on the returned Request to send the API call to the service. 1034// the "output" return value is not valid until after Send returns without error. 1035// 1036// See RemovePermission for more information on using the RemovePermission 1037// API call, and error handling. 1038// 1039// This method is useful when you want to inject custom logic or configuration 1040// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1041// 1042// 1043// // Example sending a request using the RemovePermissionRequest method. 1044// req, resp := client.RemovePermissionRequest(params) 1045// 1046// err := req.Send() 1047// if err == nil { // resp is now filled 1048// fmt.Println(resp) 1049// } 1050// 1051// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/RemovePermission 1052func (c *CodeGuruProfiler) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { 1053 op := &request.Operation{ 1054 Name: opRemovePermission, 1055 HTTPMethod: "DELETE", 1056 HTTPPath: "/profilingGroups/{profilingGroupName}/policy/{actionGroup}", 1057 } 1058 1059 if input == nil { 1060 input = &RemovePermissionInput{} 1061 } 1062 1063 output = &RemovePermissionOutput{} 1064 req = c.newRequest(op, input, output) 1065 return 1066} 1067 1068// RemovePermission API operation for Amazon CodeGuru Profiler. 1069// 1070// Removes statement for the provided action group from the policy. 1071// 1072// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1073// with awserr.Error's Code and Message methods to get detailed information about 1074// the error. 1075// 1076// See the AWS API reference guide for Amazon CodeGuru Profiler's 1077// API operation RemovePermission for usage and error information. 1078// 1079// Returned Error Types: 1080// * InternalServerException 1081// The server encountered an internal error and is unable to complete the request. 1082// 1083// * ConflictException 1084// The requested operation would cause a conflict with the current state of 1085// a service resource associated with the request. Resolve the conflict before 1086// retrying this request. 1087// 1088// * ValidationException 1089// The parameter is not valid. 1090// 1091// * ThrottlingException 1092// The request was denied due to request throttling. 1093// 1094// * ResourceNotFoundException 1095// The resource specified in the request does not exist. 1096// 1097// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/RemovePermission 1098func (c *CodeGuruProfiler) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { 1099 req, out := c.RemovePermissionRequest(input) 1100 return out, req.Send() 1101} 1102 1103// RemovePermissionWithContext is the same as RemovePermission with the addition of 1104// the ability to pass a context and additional request options. 1105// 1106// See RemovePermission for details on how to use this API operation. 1107// 1108// The context must be non-nil and will be used for request cancellation. If 1109// the context is nil a panic will occur. In the future the SDK may create 1110// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1111// for more information on using Contexts. 1112func (c *CodeGuruProfiler) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { 1113 req, out := c.RemovePermissionRequest(input) 1114 req.SetContext(ctx) 1115 req.ApplyOptions(opts...) 1116 return out, req.Send() 1117} 1118 1119const opUpdateProfilingGroup = "UpdateProfilingGroup" 1120 1121// UpdateProfilingGroupRequest generates a "aws/request.Request" representing the 1122// client's request for the UpdateProfilingGroup operation. The "output" return 1123// value will be populated with the request's response once the request completes 1124// successfully. 1125// 1126// Use "Send" method on the returned Request to send the API call to the service. 1127// the "output" return value is not valid until after Send returns without error. 1128// 1129// See UpdateProfilingGroup for more information on using the UpdateProfilingGroup 1130// API call, and error handling. 1131// 1132// This method is useful when you want to inject custom logic or configuration 1133// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1134// 1135// 1136// // Example sending a request using the UpdateProfilingGroupRequest method. 1137// req, resp := client.UpdateProfilingGroupRequest(params) 1138// 1139// err := req.Send() 1140// if err == nil { // resp is now filled 1141// fmt.Println(resp) 1142// } 1143// 1144// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/UpdateProfilingGroup 1145func (c *CodeGuruProfiler) UpdateProfilingGroupRequest(input *UpdateProfilingGroupInput) (req *request.Request, output *UpdateProfilingGroupOutput) { 1146 op := &request.Operation{ 1147 Name: opUpdateProfilingGroup, 1148 HTTPMethod: "PUT", 1149 HTTPPath: "/profilingGroups/{profilingGroupName}", 1150 } 1151 1152 if input == nil { 1153 input = &UpdateProfilingGroupInput{} 1154 } 1155 1156 output = &UpdateProfilingGroupOutput{} 1157 req = c.newRequest(op, input, output) 1158 return 1159} 1160 1161// UpdateProfilingGroup API operation for Amazon CodeGuru Profiler. 1162// 1163// Updates a profiling group. 1164// 1165// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1166// with awserr.Error's Code and Message methods to get detailed information about 1167// the error. 1168// 1169// See the AWS API reference guide for Amazon CodeGuru Profiler's 1170// API operation UpdateProfilingGroup for usage and error information. 1171// 1172// Returned Error Types: 1173// * InternalServerException 1174// The server encountered an internal error and is unable to complete the request. 1175// 1176// * ConflictException 1177// The requested operation would cause a conflict with the current state of 1178// a service resource associated with the request. Resolve the conflict before 1179// retrying this request. 1180// 1181// * ValidationException 1182// The parameter is not valid. 1183// 1184// * ThrottlingException 1185// The request was denied due to request throttling. 1186// 1187// * ResourceNotFoundException 1188// The resource specified in the request does not exist. 1189// 1190// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/UpdateProfilingGroup 1191func (c *CodeGuruProfiler) UpdateProfilingGroup(input *UpdateProfilingGroupInput) (*UpdateProfilingGroupOutput, error) { 1192 req, out := c.UpdateProfilingGroupRequest(input) 1193 return out, req.Send() 1194} 1195 1196// UpdateProfilingGroupWithContext is the same as UpdateProfilingGroup with the addition of 1197// the ability to pass a context and additional request options. 1198// 1199// See UpdateProfilingGroup for details on how to use this API operation. 1200// 1201// The context must be non-nil and will be used for request cancellation. If 1202// the context is nil a panic will occur. In the future the SDK may create 1203// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1204// for more information on using Contexts. 1205func (c *CodeGuruProfiler) UpdateProfilingGroupWithContext(ctx aws.Context, input *UpdateProfilingGroupInput, opts ...request.Option) (*UpdateProfilingGroupOutput, error) { 1206 req, out := c.UpdateProfilingGroupRequest(input) 1207 req.SetContext(ctx) 1208 req.ApplyOptions(opts...) 1209 return out, req.Send() 1210} 1211 1212type AgentConfiguration struct { 1213 _ struct{} `type:"structure"` 1214 1215 // PeriodInSeconds is a required field 1216 PeriodInSeconds *int64 `locationName:"periodInSeconds" type:"integer" required:"true"` 1217 1218 // ShouldProfile is a required field 1219 ShouldProfile *bool `locationName:"shouldProfile" type:"boolean" required:"true"` 1220} 1221 1222// String returns the string representation 1223func (s AgentConfiguration) String() string { 1224 return awsutil.Prettify(s) 1225} 1226 1227// GoString returns the string representation 1228func (s AgentConfiguration) GoString() string { 1229 return s.String() 1230} 1231 1232// SetPeriodInSeconds sets the PeriodInSeconds field's value. 1233func (s *AgentConfiguration) SetPeriodInSeconds(v int64) *AgentConfiguration { 1234 s.PeriodInSeconds = &v 1235 return s 1236} 1237 1238// SetShouldProfile sets the ShouldProfile field's value. 1239func (s *AgentConfiguration) SetShouldProfile(v bool) *AgentConfiguration { 1240 s.ShouldProfile = &v 1241 return s 1242} 1243 1244type AgentOrchestrationConfig struct { 1245 _ struct{} `type:"structure"` 1246 1247 // ProfilingEnabled is a required field 1248 ProfilingEnabled *bool `locationName:"profilingEnabled" type:"boolean" required:"true"` 1249} 1250 1251// String returns the string representation 1252func (s AgentOrchestrationConfig) String() string { 1253 return awsutil.Prettify(s) 1254} 1255 1256// GoString returns the string representation 1257func (s AgentOrchestrationConfig) GoString() string { 1258 return s.String() 1259} 1260 1261// Validate inspects the fields of the type to determine if they are valid. 1262func (s *AgentOrchestrationConfig) Validate() error { 1263 invalidParams := request.ErrInvalidParams{Context: "AgentOrchestrationConfig"} 1264 if s.ProfilingEnabled == nil { 1265 invalidParams.Add(request.NewErrParamRequired("ProfilingEnabled")) 1266 } 1267 1268 if invalidParams.Len() > 0 { 1269 return invalidParams 1270 } 1271 return nil 1272} 1273 1274// SetProfilingEnabled sets the ProfilingEnabled field's value. 1275func (s *AgentOrchestrationConfig) SetProfilingEnabled(v bool) *AgentOrchestrationConfig { 1276 s.ProfilingEnabled = &v 1277 return s 1278} 1279 1280// Information about the time range of the latest available aggregated profile. 1281type AggregatedProfileTime struct { 1282 _ struct{} `type:"structure"` 1283 1284 // The time period. 1285 Period *string `locationName:"period" type:"string" enum:"AggregationPeriod"` 1286 1287 // The start time. 1288 Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` 1289} 1290 1291// String returns the string representation 1292func (s AggregatedProfileTime) String() string { 1293 return awsutil.Prettify(s) 1294} 1295 1296// GoString returns the string representation 1297func (s AggregatedProfileTime) GoString() string { 1298 return s.String() 1299} 1300 1301// SetPeriod sets the Period field's value. 1302func (s *AggregatedProfileTime) SetPeriod(v string) *AggregatedProfileTime { 1303 s.Period = &v 1304 return s 1305} 1306 1307// SetStart sets the Start field's value. 1308func (s *AggregatedProfileTime) SetStart(v time.Time) *AggregatedProfileTime { 1309 s.Start = &v 1310 return s 1311} 1312 1313// The structure representing the configureAgentRequest. 1314type ConfigureAgentInput struct { 1315 _ struct{} `type:"structure"` 1316 1317 FleetInstanceId *string `locationName:"fleetInstanceId" min:"1" type:"string"` 1318 1319 // ProfilingGroupName is a required field 1320 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1321} 1322 1323// String returns the string representation 1324func (s ConfigureAgentInput) String() string { 1325 return awsutil.Prettify(s) 1326} 1327 1328// GoString returns the string representation 1329func (s ConfigureAgentInput) GoString() string { 1330 return s.String() 1331} 1332 1333// Validate inspects the fields of the type to determine if they are valid. 1334func (s *ConfigureAgentInput) Validate() error { 1335 invalidParams := request.ErrInvalidParams{Context: "ConfigureAgentInput"} 1336 if s.FleetInstanceId != nil && len(*s.FleetInstanceId) < 1 { 1337 invalidParams.Add(request.NewErrParamMinLen("FleetInstanceId", 1)) 1338 } 1339 if s.ProfilingGroupName == nil { 1340 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 1341 } 1342 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 1343 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 1344 } 1345 1346 if invalidParams.Len() > 0 { 1347 return invalidParams 1348 } 1349 return nil 1350} 1351 1352// SetFleetInstanceId sets the FleetInstanceId field's value. 1353func (s *ConfigureAgentInput) SetFleetInstanceId(v string) *ConfigureAgentInput { 1354 s.FleetInstanceId = &v 1355 return s 1356} 1357 1358// SetProfilingGroupName sets the ProfilingGroupName field's value. 1359func (s *ConfigureAgentInput) SetProfilingGroupName(v string) *ConfigureAgentInput { 1360 s.ProfilingGroupName = &v 1361 return s 1362} 1363 1364// The structure representing the configureAgentResponse. 1365type ConfigureAgentOutput struct { 1366 _ struct{} `type:"structure" payload:"Configuration"` 1367 1368 // Configuration is a required field 1369 Configuration *AgentConfiguration `locationName:"configuration" type:"structure" required:"true"` 1370} 1371 1372// String returns the string representation 1373func (s ConfigureAgentOutput) String() string { 1374 return awsutil.Prettify(s) 1375} 1376 1377// GoString returns the string representation 1378func (s ConfigureAgentOutput) GoString() string { 1379 return s.String() 1380} 1381 1382// SetConfiguration sets the Configuration field's value. 1383func (s *ConfigureAgentOutput) SetConfiguration(v *AgentConfiguration) *ConfigureAgentOutput { 1384 s.Configuration = v 1385 return s 1386} 1387 1388// The requested operation would cause a conflict with the current state of 1389// a service resource associated with the request. Resolve the conflict before 1390// retrying this request. 1391type ConflictException struct { 1392 _ struct{} `type:"structure"` 1393 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1394 1395 Message_ *string `locationName:"message" type:"string"` 1396} 1397 1398// String returns the string representation 1399func (s ConflictException) String() string { 1400 return awsutil.Prettify(s) 1401} 1402 1403// GoString returns the string representation 1404func (s ConflictException) GoString() string { 1405 return s.String() 1406} 1407 1408func newErrorConflictException(v protocol.ResponseMetadata) error { 1409 return &ConflictException{ 1410 RespMetadata: v, 1411 } 1412} 1413 1414// Code returns the exception type name. 1415func (s *ConflictException) Code() string { 1416 return "ConflictException" 1417} 1418 1419// Message returns the exception's message. 1420func (s *ConflictException) Message() string { 1421 if s.Message_ != nil { 1422 return *s.Message_ 1423 } 1424 return "" 1425} 1426 1427// OrigErr always returns nil, satisfies awserr.Error interface. 1428func (s *ConflictException) OrigErr() error { 1429 return nil 1430} 1431 1432func (s *ConflictException) Error() string { 1433 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1434} 1435 1436// Status code returns the HTTP status code for the request's response error. 1437func (s *ConflictException) StatusCode() int { 1438 return s.RespMetadata.StatusCode 1439} 1440 1441// RequestID returns the service's response RequestID for request. 1442func (s *ConflictException) RequestID() string { 1443 return s.RespMetadata.RequestID 1444} 1445 1446// The structure representing the createProfiliingGroupRequest. 1447type CreateProfilingGroupInput struct { 1448 _ struct{} `type:"structure"` 1449 1450 // The agent orchestration configuration. 1451 AgentOrchestrationConfig *AgentOrchestrationConfig `locationName:"agentOrchestrationConfig" type:"structure"` 1452 1453 // Unique, case-sensitive identifier that you provide to ensure the idempotency 1454 // of the request. 1455 // 1456 // This parameter specifies a unique identifier for the new profiling group 1457 // that helps ensure idempotency. 1458 ClientToken *string `location:"querystring" locationName:"clientToken" min:"1" type:"string" idempotencyToken:"true"` 1459 1460 // The name of the profiling group. 1461 // 1462 // ProfilingGroupName is a required field 1463 ProfilingGroupName *string `locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1464} 1465 1466// String returns the string representation 1467func (s CreateProfilingGroupInput) String() string { 1468 return awsutil.Prettify(s) 1469} 1470 1471// GoString returns the string representation 1472func (s CreateProfilingGroupInput) GoString() string { 1473 return s.String() 1474} 1475 1476// Validate inspects the fields of the type to determine if they are valid. 1477func (s *CreateProfilingGroupInput) Validate() error { 1478 invalidParams := request.ErrInvalidParams{Context: "CreateProfilingGroupInput"} 1479 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 1480 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 1481 } 1482 if s.ProfilingGroupName == nil { 1483 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 1484 } 1485 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 1486 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 1487 } 1488 if s.AgentOrchestrationConfig != nil { 1489 if err := s.AgentOrchestrationConfig.Validate(); err != nil { 1490 invalidParams.AddNested("AgentOrchestrationConfig", err.(request.ErrInvalidParams)) 1491 } 1492 } 1493 1494 if invalidParams.Len() > 0 { 1495 return invalidParams 1496 } 1497 return nil 1498} 1499 1500// SetAgentOrchestrationConfig sets the AgentOrchestrationConfig field's value. 1501func (s *CreateProfilingGroupInput) SetAgentOrchestrationConfig(v *AgentOrchestrationConfig) *CreateProfilingGroupInput { 1502 s.AgentOrchestrationConfig = v 1503 return s 1504} 1505 1506// SetClientToken sets the ClientToken field's value. 1507func (s *CreateProfilingGroupInput) SetClientToken(v string) *CreateProfilingGroupInput { 1508 s.ClientToken = &v 1509 return s 1510} 1511 1512// SetProfilingGroupName sets the ProfilingGroupName field's value. 1513func (s *CreateProfilingGroupInput) SetProfilingGroupName(v string) *CreateProfilingGroupInput { 1514 s.ProfilingGroupName = &v 1515 return s 1516} 1517 1518// The structure representing the createProfilingGroupResponse. 1519type CreateProfilingGroupOutput struct { 1520 _ struct{} `type:"structure" payload:"ProfilingGroup"` 1521 1522 // Information about the new profiling group 1523 // 1524 // ProfilingGroup is a required field 1525 ProfilingGroup *ProfilingGroupDescription `locationName:"profilingGroup" type:"structure" required:"true"` 1526} 1527 1528// String returns the string representation 1529func (s CreateProfilingGroupOutput) String() string { 1530 return awsutil.Prettify(s) 1531} 1532 1533// GoString returns the string representation 1534func (s CreateProfilingGroupOutput) GoString() string { 1535 return s.String() 1536} 1537 1538// SetProfilingGroup sets the ProfilingGroup field's value. 1539func (s *CreateProfilingGroupOutput) SetProfilingGroup(v *ProfilingGroupDescription) *CreateProfilingGroupOutput { 1540 s.ProfilingGroup = v 1541 return s 1542} 1543 1544// The structure representing the deleteProfilingGroupRequest. 1545type DeleteProfilingGroupInput struct { 1546 _ struct{} `type:"structure"` 1547 1548 // The profiling group name to delete. 1549 // 1550 // ProfilingGroupName is a required field 1551 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1552} 1553 1554// String returns the string representation 1555func (s DeleteProfilingGroupInput) String() string { 1556 return awsutil.Prettify(s) 1557} 1558 1559// GoString returns the string representation 1560func (s DeleteProfilingGroupInput) GoString() string { 1561 return s.String() 1562} 1563 1564// Validate inspects the fields of the type to determine if they are valid. 1565func (s *DeleteProfilingGroupInput) Validate() error { 1566 invalidParams := request.ErrInvalidParams{Context: "DeleteProfilingGroupInput"} 1567 if s.ProfilingGroupName == nil { 1568 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 1569 } 1570 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 1571 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 1572 } 1573 1574 if invalidParams.Len() > 0 { 1575 return invalidParams 1576 } 1577 return nil 1578} 1579 1580// SetProfilingGroupName sets the ProfilingGroupName field's value. 1581func (s *DeleteProfilingGroupInput) SetProfilingGroupName(v string) *DeleteProfilingGroupInput { 1582 s.ProfilingGroupName = &v 1583 return s 1584} 1585 1586// The structure representing the deleteProfilingGroupResponse. 1587type DeleteProfilingGroupOutput struct { 1588 _ struct{} `type:"structure"` 1589} 1590 1591// String returns the string representation 1592func (s DeleteProfilingGroupOutput) String() string { 1593 return awsutil.Prettify(s) 1594} 1595 1596// GoString returns the string representation 1597func (s DeleteProfilingGroupOutput) GoString() string { 1598 return s.String() 1599} 1600 1601// The structure representing the describeProfilingGroupRequest. 1602type DescribeProfilingGroupInput struct { 1603 _ struct{} `type:"structure"` 1604 1605 // The profiling group name. 1606 // 1607 // ProfilingGroupName is a required field 1608 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1609} 1610 1611// String returns the string representation 1612func (s DescribeProfilingGroupInput) String() string { 1613 return awsutil.Prettify(s) 1614} 1615 1616// GoString returns the string representation 1617func (s DescribeProfilingGroupInput) GoString() string { 1618 return s.String() 1619} 1620 1621// Validate inspects the fields of the type to determine if they are valid. 1622func (s *DescribeProfilingGroupInput) Validate() error { 1623 invalidParams := request.ErrInvalidParams{Context: "DescribeProfilingGroupInput"} 1624 if s.ProfilingGroupName == nil { 1625 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 1626 } 1627 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 1628 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 1629 } 1630 1631 if invalidParams.Len() > 0 { 1632 return invalidParams 1633 } 1634 return nil 1635} 1636 1637// SetProfilingGroupName sets the ProfilingGroupName field's value. 1638func (s *DescribeProfilingGroupInput) SetProfilingGroupName(v string) *DescribeProfilingGroupInput { 1639 s.ProfilingGroupName = &v 1640 return s 1641} 1642 1643// The structure representing the describeProfilingGroupResponse. 1644type DescribeProfilingGroupOutput struct { 1645 _ struct{} `type:"structure" payload:"ProfilingGroup"` 1646 1647 // Information about a profiling group. 1648 // 1649 // ProfilingGroup is a required field 1650 ProfilingGroup *ProfilingGroupDescription `locationName:"profilingGroup" type:"structure" required:"true"` 1651} 1652 1653// String returns the string representation 1654func (s DescribeProfilingGroupOutput) String() string { 1655 return awsutil.Prettify(s) 1656} 1657 1658// GoString returns the string representation 1659func (s DescribeProfilingGroupOutput) GoString() string { 1660 return s.String() 1661} 1662 1663// SetProfilingGroup sets the ProfilingGroup field's value. 1664func (s *DescribeProfilingGroupOutput) SetProfilingGroup(v *ProfilingGroupDescription) *DescribeProfilingGroupOutput { 1665 s.ProfilingGroup = v 1666 return s 1667} 1668 1669// The structure representing the getPolicyRequest. 1670type GetPolicyInput struct { 1671 _ struct{} `type:"structure"` 1672 1673 // The name of the profiling group. 1674 // 1675 // ProfilingGroupName is a required field 1676 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1677} 1678 1679// String returns the string representation 1680func (s GetPolicyInput) String() string { 1681 return awsutil.Prettify(s) 1682} 1683 1684// GoString returns the string representation 1685func (s GetPolicyInput) GoString() string { 1686 return s.String() 1687} 1688 1689// Validate inspects the fields of the type to determine if they are valid. 1690func (s *GetPolicyInput) Validate() error { 1691 invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} 1692 if s.ProfilingGroupName == nil { 1693 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 1694 } 1695 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 1696 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 1697 } 1698 1699 if invalidParams.Len() > 0 { 1700 return invalidParams 1701 } 1702 return nil 1703} 1704 1705// SetProfilingGroupName sets the ProfilingGroupName field's value. 1706func (s *GetPolicyInput) SetProfilingGroupName(v string) *GetPolicyInput { 1707 s.ProfilingGroupName = &v 1708 return s 1709} 1710 1711// The structure representing the getPolicyResponse. 1712type GetPolicyOutput struct { 1713 _ struct{} `type:"structure"` 1714 1715 // The resource-based policy attached to the ProfilingGroup. 1716 // 1717 // Policy is a required field 1718 Policy *string `locationName:"policy" type:"string" required:"true"` 1719 1720 // A unique identifier for the current revision of the policy. 1721 // 1722 // RevisionId is a required field 1723 RevisionId *string `locationName:"revisionId" type:"string" required:"true"` 1724} 1725 1726// String returns the string representation 1727func (s GetPolicyOutput) String() string { 1728 return awsutil.Prettify(s) 1729} 1730 1731// GoString returns the string representation 1732func (s GetPolicyOutput) GoString() string { 1733 return s.String() 1734} 1735 1736// SetPolicy sets the Policy field's value. 1737func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput { 1738 s.Policy = &v 1739 return s 1740} 1741 1742// SetRevisionId sets the RevisionId field's value. 1743func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput { 1744 s.RevisionId = &v 1745 return s 1746} 1747 1748// The structure representing the getProfileRequest. 1749type GetProfileInput struct { 1750 _ struct{} `type:"structure"` 1751 1752 // The format of the profile to return. You can choose application/json or the 1753 // default application/x-amzn-ion. 1754 Accept *string `location:"header" locationName:"Accept" type:"string"` 1755 1756 // You must specify exactly two of the following parameters: startTime, period, 1757 // and endTime. 1758 EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` 1759 1760 // The maximum depth of the graph. 1761 MaxDepth *int64 `location:"querystring" locationName:"maxDepth" min:"1" type:"integer"` 1762 1763 // The period of the profile to get. The time range must be in the past and 1764 // not longer than one week. 1765 // 1766 // You must specify exactly two of the following parameters: startTime, period, 1767 // and endTime. 1768 Period *string `location:"querystring" locationName:"period" min:"1" type:"string"` 1769 1770 // The name of the profiling group to get. 1771 // 1772 // ProfilingGroupName is a required field 1773 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1774 1775 // The start time of the profile to get. 1776 // 1777 // You must specify exactly two of the following parameters: startTime, period, 1778 // and endTime. 1779 StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` 1780} 1781 1782// String returns the string representation 1783func (s GetProfileInput) String() string { 1784 return awsutil.Prettify(s) 1785} 1786 1787// GoString returns the string representation 1788func (s GetProfileInput) GoString() string { 1789 return s.String() 1790} 1791 1792// Validate inspects the fields of the type to determine if they are valid. 1793func (s *GetProfileInput) Validate() error { 1794 invalidParams := request.ErrInvalidParams{Context: "GetProfileInput"} 1795 if s.MaxDepth != nil && *s.MaxDepth < 1 { 1796 invalidParams.Add(request.NewErrParamMinValue("MaxDepth", 1)) 1797 } 1798 if s.Period != nil && len(*s.Period) < 1 { 1799 invalidParams.Add(request.NewErrParamMinLen("Period", 1)) 1800 } 1801 if s.ProfilingGroupName == nil { 1802 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 1803 } 1804 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 1805 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 1806 } 1807 1808 if invalidParams.Len() > 0 { 1809 return invalidParams 1810 } 1811 return nil 1812} 1813 1814// SetAccept sets the Accept field's value. 1815func (s *GetProfileInput) SetAccept(v string) *GetProfileInput { 1816 s.Accept = &v 1817 return s 1818} 1819 1820// SetEndTime sets the EndTime field's value. 1821func (s *GetProfileInput) SetEndTime(v time.Time) *GetProfileInput { 1822 s.EndTime = &v 1823 return s 1824} 1825 1826// SetMaxDepth sets the MaxDepth field's value. 1827func (s *GetProfileInput) SetMaxDepth(v int64) *GetProfileInput { 1828 s.MaxDepth = &v 1829 return s 1830} 1831 1832// SetPeriod sets the Period field's value. 1833func (s *GetProfileInput) SetPeriod(v string) *GetProfileInput { 1834 s.Period = &v 1835 return s 1836} 1837 1838// SetProfilingGroupName sets the ProfilingGroupName field's value. 1839func (s *GetProfileInput) SetProfilingGroupName(v string) *GetProfileInput { 1840 s.ProfilingGroupName = &v 1841 return s 1842} 1843 1844// SetStartTime sets the StartTime field's value. 1845func (s *GetProfileInput) SetStartTime(v time.Time) *GetProfileInput { 1846 s.StartTime = &v 1847 return s 1848} 1849 1850// The structure representing the getProfileResponse. 1851type GetProfileOutput struct { 1852 _ struct{} `type:"structure" payload:"Profile"` 1853 1854 // The content encoding of the profile. 1855 ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` 1856 1857 // The content type of the profile in the payload. It is either application/json 1858 // or the default application/x-amzn-ion. 1859 // 1860 // ContentType is a required field 1861 ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true"` 1862 1863 // Information about the profile. 1864 // 1865 // Profile is a required field 1866 Profile []byte `locationName:"profile" type:"blob" required:"true"` 1867} 1868 1869// String returns the string representation 1870func (s GetProfileOutput) String() string { 1871 return awsutil.Prettify(s) 1872} 1873 1874// GoString returns the string representation 1875func (s GetProfileOutput) GoString() string { 1876 return s.String() 1877} 1878 1879// SetContentEncoding sets the ContentEncoding field's value. 1880func (s *GetProfileOutput) SetContentEncoding(v string) *GetProfileOutput { 1881 s.ContentEncoding = &v 1882 return s 1883} 1884 1885// SetContentType sets the ContentType field's value. 1886func (s *GetProfileOutput) SetContentType(v string) *GetProfileOutput { 1887 s.ContentType = &v 1888 return s 1889} 1890 1891// SetProfile sets the Profile field's value. 1892func (s *GetProfileOutput) SetProfile(v []byte) *GetProfileOutput { 1893 s.Profile = v 1894 return s 1895} 1896 1897// The server encountered an internal error and is unable to complete the request. 1898type InternalServerException struct { 1899 _ struct{} `type:"structure"` 1900 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1901 1902 Message_ *string `locationName:"message" type:"string"` 1903} 1904 1905// String returns the string representation 1906func (s InternalServerException) String() string { 1907 return awsutil.Prettify(s) 1908} 1909 1910// GoString returns the string representation 1911func (s InternalServerException) GoString() string { 1912 return s.String() 1913} 1914 1915func newErrorInternalServerException(v protocol.ResponseMetadata) error { 1916 return &InternalServerException{ 1917 RespMetadata: v, 1918 } 1919} 1920 1921// Code returns the exception type name. 1922func (s *InternalServerException) Code() string { 1923 return "InternalServerException" 1924} 1925 1926// Message returns the exception's message. 1927func (s *InternalServerException) Message() string { 1928 if s.Message_ != nil { 1929 return *s.Message_ 1930 } 1931 return "" 1932} 1933 1934// OrigErr always returns nil, satisfies awserr.Error interface. 1935func (s *InternalServerException) OrigErr() error { 1936 return nil 1937} 1938 1939func (s *InternalServerException) Error() string { 1940 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1941} 1942 1943// Status code returns the HTTP status code for the request's response error. 1944func (s *InternalServerException) StatusCode() int { 1945 return s.RespMetadata.StatusCode 1946} 1947 1948// RequestID returns the service's response RequestID for request. 1949func (s *InternalServerException) RequestID() string { 1950 return s.RespMetadata.RequestID 1951} 1952 1953// The structure representing the listProfileTimesRequest. 1954type ListProfileTimesInput struct { 1955 _ struct{} `type:"structure"` 1956 1957 // The end time of the time range from which to list the profiles. 1958 // 1959 // EndTime is a required field 1960 EndTime *time.Time `location:"querystring" locationName:"endTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` 1961 1962 // The maximum number of profile time results returned by ListProfileTimes in 1963 // paginated output. When this parameter is used, ListProfileTimes only returns 1964 // maxResults results in a single page with a nextToken response element. The 1965 // remaining results of the initial request can be seen by sending another ListProfileTimes 1966 // request with the returned nextToken value. 1967 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 1968 1969 // The nextToken value returned from a previous paginated ListProfileTimes request 1970 // where maxResults was used and the results exceeded the value of that parameter. 1971 // Pagination continues from the end of the previous results that returned the 1972 // nextToken value. 1973 // 1974 // This token should be treated as an opaque identifier that is only used to 1975 // retrieve the next items in a list and not for other programmatic purposes. 1976 NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"` 1977 1978 // The order (ascending or descending by start time of the profile) to use when 1979 // listing profiles. Defaults to TIMESTAMP_DESCENDING. 1980 OrderBy *string `location:"querystring" locationName:"orderBy" type:"string" enum:"OrderBy"` 1981 1982 // The aggregation period. 1983 // 1984 // Period is a required field 1985 Period *string `location:"querystring" locationName:"period" type:"string" required:"true" enum:"AggregationPeriod"` 1986 1987 // The name of the profiling group. 1988 // 1989 // ProfilingGroupName is a required field 1990 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 1991 1992 // The start time of the time range from which to list the profiles. 1993 // 1994 // StartTime is a required field 1995 StartTime *time.Time `location:"querystring" locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` 1996} 1997 1998// String returns the string representation 1999func (s ListProfileTimesInput) String() string { 2000 return awsutil.Prettify(s) 2001} 2002 2003// GoString returns the string representation 2004func (s ListProfileTimesInput) GoString() string { 2005 return s.String() 2006} 2007 2008// Validate inspects the fields of the type to determine if they are valid. 2009func (s *ListProfileTimesInput) Validate() error { 2010 invalidParams := request.ErrInvalidParams{Context: "ListProfileTimesInput"} 2011 if s.EndTime == nil { 2012 invalidParams.Add(request.NewErrParamRequired("EndTime")) 2013 } 2014 if s.MaxResults != nil && *s.MaxResults < 1 { 2015 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2016 } 2017 if s.NextToken != nil && len(*s.NextToken) < 1 { 2018 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2019 } 2020 if s.Period == nil { 2021 invalidParams.Add(request.NewErrParamRequired("Period")) 2022 } 2023 if s.ProfilingGroupName == nil { 2024 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 2025 } 2026 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 2027 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 2028 } 2029 if s.StartTime == nil { 2030 invalidParams.Add(request.NewErrParamRequired("StartTime")) 2031 } 2032 2033 if invalidParams.Len() > 0 { 2034 return invalidParams 2035 } 2036 return nil 2037} 2038 2039// SetEndTime sets the EndTime field's value. 2040func (s *ListProfileTimesInput) SetEndTime(v time.Time) *ListProfileTimesInput { 2041 s.EndTime = &v 2042 return s 2043} 2044 2045// SetMaxResults sets the MaxResults field's value. 2046func (s *ListProfileTimesInput) SetMaxResults(v int64) *ListProfileTimesInput { 2047 s.MaxResults = &v 2048 return s 2049} 2050 2051// SetNextToken sets the NextToken field's value. 2052func (s *ListProfileTimesInput) SetNextToken(v string) *ListProfileTimesInput { 2053 s.NextToken = &v 2054 return s 2055} 2056 2057// SetOrderBy sets the OrderBy field's value. 2058func (s *ListProfileTimesInput) SetOrderBy(v string) *ListProfileTimesInput { 2059 s.OrderBy = &v 2060 return s 2061} 2062 2063// SetPeriod sets the Period field's value. 2064func (s *ListProfileTimesInput) SetPeriod(v string) *ListProfileTimesInput { 2065 s.Period = &v 2066 return s 2067} 2068 2069// SetProfilingGroupName sets the ProfilingGroupName field's value. 2070func (s *ListProfileTimesInput) SetProfilingGroupName(v string) *ListProfileTimesInput { 2071 s.ProfilingGroupName = &v 2072 return s 2073} 2074 2075// SetStartTime sets the StartTime field's value. 2076func (s *ListProfileTimesInput) SetStartTime(v time.Time) *ListProfileTimesInput { 2077 s.StartTime = &v 2078 return s 2079} 2080 2081// The structure representing the listProfileTimesResponse. 2082type ListProfileTimesOutput struct { 2083 _ struct{} `type:"structure"` 2084 2085 // The nextToken value to include in a future ListProfileTimes request. When 2086 // the results of a ListProfileTimes request exceed maxResults, this value can 2087 // be used to retrieve the next page of results. This value is null when there 2088 // are no more results to return. 2089 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 2090 2091 // The list of start times of the available profiles for the aggregation period 2092 // in the specified time range. 2093 // 2094 // ProfileTimes is a required field 2095 ProfileTimes []*ProfileTime `locationName:"profileTimes" type:"list" required:"true"` 2096} 2097 2098// String returns the string representation 2099func (s ListProfileTimesOutput) String() string { 2100 return awsutil.Prettify(s) 2101} 2102 2103// GoString returns the string representation 2104func (s ListProfileTimesOutput) GoString() string { 2105 return s.String() 2106} 2107 2108// SetNextToken sets the NextToken field's value. 2109func (s *ListProfileTimesOutput) SetNextToken(v string) *ListProfileTimesOutput { 2110 s.NextToken = &v 2111 return s 2112} 2113 2114// SetProfileTimes sets the ProfileTimes field's value. 2115func (s *ListProfileTimesOutput) SetProfileTimes(v []*ProfileTime) *ListProfileTimesOutput { 2116 s.ProfileTimes = v 2117 return s 2118} 2119 2120// The structure representing the listProfilingGroupsRequest. 2121type ListProfilingGroupsInput struct { 2122 _ struct{} `type:"structure"` 2123 2124 // A Boolean value indicating whether to include a description. 2125 IncludeDescription *bool `location:"querystring" locationName:"includeDescription" type:"boolean"` 2126 2127 // The maximum number of profiling groups results returned by ListProfilingGroups 2128 // in paginated output. When this parameter is used, ListProfilingGroups only 2129 // returns maxResults results in a single page along with a nextToken response 2130 // element. The remaining results of the initial request can be seen by sending 2131 // another ListProfilingGroups request with the returned nextToken value. 2132 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 2133 2134 // The nextToken value returned from a previous paginated ListProfilingGroups 2135 // request where maxResults was used and the results exceeded the value of that 2136 // parameter. Pagination continues from the end of the previous results that 2137 // returned the nextToken value. 2138 // 2139 // This token should be treated as an opaque identifier that is only used to 2140 // retrieve the next items in a list and not for other programmatic purposes. 2141 NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"` 2142} 2143 2144// String returns the string representation 2145func (s ListProfilingGroupsInput) String() string { 2146 return awsutil.Prettify(s) 2147} 2148 2149// GoString returns the string representation 2150func (s ListProfilingGroupsInput) GoString() string { 2151 return s.String() 2152} 2153 2154// Validate inspects the fields of the type to determine if they are valid. 2155func (s *ListProfilingGroupsInput) Validate() error { 2156 invalidParams := request.ErrInvalidParams{Context: "ListProfilingGroupsInput"} 2157 if s.MaxResults != nil && *s.MaxResults < 1 { 2158 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2159 } 2160 if s.NextToken != nil && len(*s.NextToken) < 1 { 2161 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2162 } 2163 2164 if invalidParams.Len() > 0 { 2165 return invalidParams 2166 } 2167 return nil 2168} 2169 2170// SetIncludeDescription sets the IncludeDescription field's value. 2171func (s *ListProfilingGroupsInput) SetIncludeDescription(v bool) *ListProfilingGroupsInput { 2172 s.IncludeDescription = &v 2173 return s 2174} 2175 2176// SetMaxResults sets the MaxResults field's value. 2177func (s *ListProfilingGroupsInput) SetMaxResults(v int64) *ListProfilingGroupsInput { 2178 s.MaxResults = &v 2179 return s 2180} 2181 2182// SetNextToken sets the NextToken field's value. 2183func (s *ListProfilingGroupsInput) SetNextToken(v string) *ListProfilingGroupsInput { 2184 s.NextToken = &v 2185 return s 2186} 2187 2188// The structure representing the listProfilingGroupsResponse. 2189type ListProfilingGroupsOutput struct { 2190 _ struct{} `type:"structure"` 2191 2192 // The nextToken value to include in a future ListProfilingGroups request. When 2193 // the results of a ListProfilingGroups request exceed maxResults, this value 2194 // can be used to retrieve the next page of results. This value is null when 2195 // there are no more results to return. 2196 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 2197 2198 // Information about profiling group names. 2199 // 2200 // ProfilingGroupNames is a required field 2201 ProfilingGroupNames []*string `locationName:"profilingGroupNames" type:"list" required:"true"` 2202 2203 // Information about profiling groups. 2204 ProfilingGroups []*ProfilingGroupDescription `locationName:"profilingGroups" type:"list"` 2205} 2206 2207// String returns the string representation 2208func (s ListProfilingGroupsOutput) String() string { 2209 return awsutil.Prettify(s) 2210} 2211 2212// GoString returns the string representation 2213func (s ListProfilingGroupsOutput) GoString() string { 2214 return s.String() 2215} 2216 2217// SetNextToken sets the NextToken field's value. 2218func (s *ListProfilingGroupsOutput) SetNextToken(v string) *ListProfilingGroupsOutput { 2219 s.NextToken = &v 2220 return s 2221} 2222 2223// SetProfilingGroupNames sets the ProfilingGroupNames field's value. 2224func (s *ListProfilingGroupsOutput) SetProfilingGroupNames(v []*string) *ListProfilingGroupsOutput { 2225 s.ProfilingGroupNames = v 2226 return s 2227} 2228 2229// SetProfilingGroups sets the ProfilingGroups field's value. 2230func (s *ListProfilingGroupsOutput) SetProfilingGroups(v []*ProfilingGroupDescription) *ListProfilingGroupsOutput { 2231 s.ProfilingGroups = v 2232 return s 2233} 2234 2235// The structure representing the postAgentProfileRequest. 2236type PostAgentProfileInput struct { 2237 _ struct{} `type:"structure" payload:"AgentProfile"` 2238 2239 // AgentProfile is a required field 2240 AgentProfile []byte `locationName:"agentProfile" type:"blob" required:"true"` 2241 2242 // ContentType is a required field 2243 ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true"` 2244 2245 ProfileToken *string `location:"querystring" locationName:"profileToken" min:"1" type:"string" idempotencyToken:"true"` 2246 2247 // ProfilingGroupName is a required field 2248 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 2249} 2250 2251// String returns the string representation 2252func (s PostAgentProfileInput) String() string { 2253 return awsutil.Prettify(s) 2254} 2255 2256// GoString returns the string representation 2257func (s PostAgentProfileInput) GoString() string { 2258 return s.String() 2259} 2260 2261// Validate inspects the fields of the type to determine if they are valid. 2262func (s *PostAgentProfileInput) Validate() error { 2263 invalidParams := request.ErrInvalidParams{Context: "PostAgentProfileInput"} 2264 if s.AgentProfile == nil { 2265 invalidParams.Add(request.NewErrParamRequired("AgentProfile")) 2266 } 2267 if s.ContentType == nil { 2268 invalidParams.Add(request.NewErrParamRequired("ContentType")) 2269 } 2270 if s.ProfileToken != nil && len(*s.ProfileToken) < 1 { 2271 invalidParams.Add(request.NewErrParamMinLen("ProfileToken", 1)) 2272 } 2273 if s.ProfilingGroupName == nil { 2274 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 2275 } 2276 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 2277 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 2278 } 2279 2280 if invalidParams.Len() > 0 { 2281 return invalidParams 2282 } 2283 return nil 2284} 2285 2286// SetAgentProfile sets the AgentProfile field's value. 2287func (s *PostAgentProfileInput) SetAgentProfile(v []byte) *PostAgentProfileInput { 2288 s.AgentProfile = v 2289 return s 2290} 2291 2292// SetContentType sets the ContentType field's value. 2293func (s *PostAgentProfileInput) SetContentType(v string) *PostAgentProfileInput { 2294 s.ContentType = &v 2295 return s 2296} 2297 2298// SetProfileToken sets the ProfileToken field's value. 2299func (s *PostAgentProfileInput) SetProfileToken(v string) *PostAgentProfileInput { 2300 s.ProfileToken = &v 2301 return s 2302} 2303 2304// SetProfilingGroupName sets the ProfilingGroupName field's value. 2305func (s *PostAgentProfileInput) SetProfilingGroupName(v string) *PostAgentProfileInput { 2306 s.ProfilingGroupName = &v 2307 return s 2308} 2309 2310// The structure representing the postAgentProfileResponse. 2311type PostAgentProfileOutput struct { 2312 _ struct{} `type:"structure"` 2313} 2314 2315// String returns the string representation 2316func (s PostAgentProfileOutput) String() string { 2317 return awsutil.Prettify(s) 2318} 2319 2320// GoString returns the string representation 2321func (s PostAgentProfileOutput) GoString() string { 2322 return s.String() 2323} 2324 2325// Information about the profile time. 2326type ProfileTime struct { 2327 _ struct{} `type:"structure"` 2328 2329 // The start time of the profile. 2330 Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` 2331} 2332 2333// String returns the string representation 2334func (s ProfileTime) String() string { 2335 return awsutil.Prettify(s) 2336} 2337 2338// GoString returns the string representation 2339func (s ProfileTime) GoString() string { 2340 return s.String() 2341} 2342 2343// SetStart sets the Start field's value. 2344func (s *ProfileTime) SetStart(v time.Time) *ProfileTime { 2345 s.Start = &v 2346 return s 2347} 2348 2349// The description of a profiling group. 2350type ProfilingGroupDescription struct { 2351 _ struct{} `type:"structure"` 2352 2353 AgentOrchestrationConfig *AgentOrchestrationConfig `locationName:"agentOrchestrationConfig" type:"structure"` 2354 2355 // The Amazon Resource Name (ARN) identifying the profiling group. 2356 Arn *string `locationName:"arn" type:"string"` 2357 2358 // The time, in milliseconds since the epoch, when the profiling group was created. 2359 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601"` 2360 2361 // The name of the profiling group. 2362 Name *string `locationName:"name" min:"1" type:"string"` 2363 2364 // The status of the profiling group. 2365 ProfilingStatus *ProfilingStatus `locationName:"profilingStatus" type:"structure"` 2366 2367 // The time, in milliseconds since the epoch, when the profiling group was last 2368 // updated. 2369 UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"iso8601"` 2370} 2371 2372// String returns the string representation 2373func (s ProfilingGroupDescription) String() string { 2374 return awsutil.Prettify(s) 2375} 2376 2377// GoString returns the string representation 2378func (s ProfilingGroupDescription) GoString() string { 2379 return s.String() 2380} 2381 2382// SetAgentOrchestrationConfig sets the AgentOrchestrationConfig field's value. 2383func (s *ProfilingGroupDescription) SetAgentOrchestrationConfig(v *AgentOrchestrationConfig) *ProfilingGroupDescription { 2384 s.AgentOrchestrationConfig = v 2385 return s 2386} 2387 2388// SetArn sets the Arn field's value. 2389func (s *ProfilingGroupDescription) SetArn(v string) *ProfilingGroupDescription { 2390 s.Arn = &v 2391 return s 2392} 2393 2394// SetCreatedAt sets the CreatedAt field's value. 2395func (s *ProfilingGroupDescription) SetCreatedAt(v time.Time) *ProfilingGroupDescription { 2396 s.CreatedAt = &v 2397 return s 2398} 2399 2400// SetName sets the Name field's value. 2401func (s *ProfilingGroupDescription) SetName(v string) *ProfilingGroupDescription { 2402 s.Name = &v 2403 return s 2404} 2405 2406// SetProfilingStatus sets the ProfilingStatus field's value. 2407func (s *ProfilingGroupDescription) SetProfilingStatus(v *ProfilingStatus) *ProfilingGroupDescription { 2408 s.ProfilingStatus = v 2409 return s 2410} 2411 2412// SetUpdatedAt sets the UpdatedAt field's value. 2413func (s *ProfilingGroupDescription) SetUpdatedAt(v time.Time) *ProfilingGroupDescription { 2414 s.UpdatedAt = &v 2415 return s 2416} 2417 2418// Information about the profiling status. 2419type ProfilingStatus struct { 2420 _ struct{} `type:"structure"` 2421 2422 // The time, in milliseconds since the epoch, when the latest agent was orchestrated. 2423 LatestAgentOrchestratedAt *time.Time `locationName:"latestAgentOrchestratedAt" type:"timestamp" timestampFormat:"iso8601"` 2424 2425 // The time, in milliseconds since the epoch, when the latest agent was reported.. 2426 LatestAgentProfileReportedAt *time.Time `locationName:"latestAgentProfileReportedAt" type:"timestamp" timestampFormat:"iso8601"` 2427 2428 // The latest aggregated profile 2429 LatestAggregatedProfile *AggregatedProfileTime `locationName:"latestAggregatedProfile" type:"structure"` 2430} 2431 2432// String returns the string representation 2433func (s ProfilingStatus) String() string { 2434 return awsutil.Prettify(s) 2435} 2436 2437// GoString returns the string representation 2438func (s ProfilingStatus) GoString() string { 2439 return s.String() 2440} 2441 2442// SetLatestAgentOrchestratedAt sets the LatestAgentOrchestratedAt field's value. 2443func (s *ProfilingStatus) SetLatestAgentOrchestratedAt(v time.Time) *ProfilingStatus { 2444 s.LatestAgentOrchestratedAt = &v 2445 return s 2446} 2447 2448// SetLatestAgentProfileReportedAt sets the LatestAgentProfileReportedAt field's value. 2449func (s *ProfilingStatus) SetLatestAgentProfileReportedAt(v time.Time) *ProfilingStatus { 2450 s.LatestAgentProfileReportedAt = &v 2451 return s 2452} 2453 2454// SetLatestAggregatedProfile sets the LatestAggregatedProfile field's value. 2455func (s *ProfilingStatus) SetLatestAggregatedProfile(v *AggregatedProfileTime) *ProfilingStatus { 2456 s.LatestAggregatedProfile = v 2457 return s 2458} 2459 2460// The structure representing the putPermissionRequest. 2461type PutPermissionInput struct { 2462 _ struct{} `type:"structure"` 2463 2464 // The list of actions that the users and roles can perform on the profiling 2465 // group. 2466 // 2467 // ActionGroup is a required field 2468 ActionGroup *string `location:"uri" locationName:"actionGroup" type:"string" required:"true" enum:"ActionGroup"` 2469 2470 // The list of role and user ARNs or the accountId that needs access (wildcards 2471 // are not allowed). 2472 // 2473 // Principals is a required field 2474 Principals []*string `locationName:"principals" min:"1" type:"list" required:"true"` 2475 2476 // The name of the profiling group. 2477 // 2478 // ProfilingGroupName is a required field 2479 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 2480 2481 // A unique identifier for the current revision of the policy. This is required, 2482 // if a policy exists for the profiling group. This is not required when creating 2483 // the policy for the first time. 2484 RevisionId *string `locationName:"revisionId" type:"string"` 2485} 2486 2487// String returns the string representation 2488func (s PutPermissionInput) String() string { 2489 return awsutil.Prettify(s) 2490} 2491 2492// GoString returns the string representation 2493func (s PutPermissionInput) GoString() string { 2494 return s.String() 2495} 2496 2497// Validate inspects the fields of the type to determine if they are valid. 2498func (s *PutPermissionInput) Validate() error { 2499 invalidParams := request.ErrInvalidParams{Context: "PutPermissionInput"} 2500 if s.ActionGroup == nil { 2501 invalidParams.Add(request.NewErrParamRequired("ActionGroup")) 2502 } 2503 if s.ActionGroup != nil && len(*s.ActionGroup) < 1 { 2504 invalidParams.Add(request.NewErrParamMinLen("ActionGroup", 1)) 2505 } 2506 if s.Principals == nil { 2507 invalidParams.Add(request.NewErrParamRequired("Principals")) 2508 } 2509 if s.Principals != nil && len(s.Principals) < 1 { 2510 invalidParams.Add(request.NewErrParamMinLen("Principals", 1)) 2511 } 2512 if s.ProfilingGroupName == nil { 2513 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 2514 } 2515 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 2516 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 2517 } 2518 2519 if invalidParams.Len() > 0 { 2520 return invalidParams 2521 } 2522 return nil 2523} 2524 2525// SetActionGroup sets the ActionGroup field's value. 2526func (s *PutPermissionInput) SetActionGroup(v string) *PutPermissionInput { 2527 s.ActionGroup = &v 2528 return s 2529} 2530 2531// SetPrincipals sets the Principals field's value. 2532func (s *PutPermissionInput) SetPrincipals(v []*string) *PutPermissionInput { 2533 s.Principals = v 2534 return s 2535} 2536 2537// SetProfilingGroupName sets the ProfilingGroupName field's value. 2538func (s *PutPermissionInput) SetProfilingGroupName(v string) *PutPermissionInput { 2539 s.ProfilingGroupName = &v 2540 return s 2541} 2542 2543// SetRevisionId sets the RevisionId field's value. 2544func (s *PutPermissionInput) SetRevisionId(v string) *PutPermissionInput { 2545 s.RevisionId = &v 2546 return s 2547} 2548 2549// The structure representing the putPermissionResponse. 2550type PutPermissionOutput struct { 2551 _ struct{} `type:"structure"` 2552 2553 // The resource-based policy. 2554 // 2555 // Policy is a required field 2556 Policy *string `locationName:"policy" type:"string" required:"true"` 2557 2558 // A unique identifier for the current revision of the policy. 2559 // 2560 // RevisionId is a required field 2561 RevisionId *string `locationName:"revisionId" type:"string" required:"true"` 2562} 2563 2564// String returns the string representation 2565func (s PutPermissionOutput) String() string { 2566 return awsutil.Prettify(s) 2567} 2568 2569// GoString returns the string representation 2570func (s PutPermissionOutput) GoString() string { 2571 return s.String() 2572} 2573 2574// SetPolicy sets the Policy field's value. 2575func (s *PutPermissionOutput) SetPolicy(v string) *PutPermissionOutput { 2576 s.Policy = &v 2577 return s 2578} 2579 2580// SetRevisionId sets the RevisionId field's value. 2581func (s *PutPermissionOutput) SetRevisionId(v string) *PutPermissionOutput { 2582 s.RevisionId = &v 2583 return s 2584} 2585 2586// The structure representing the removePermissionRequest. 2587type RemovePermissionInput struct { 2588 _ struct{} `type:"structure"` 2589 2590 // The list of actions that the users and roles can perform on the profiling 2591 // group. 2592 // 2593 // ActionGroup is a required field 2594 ActionGroup *string `location:"uri" locationName:"actionGroup" type:"string" required:"true" enum:"ActionGroup"` 2595 2596 // The name of the profiling group. 2597 // 2598 // ProfilingGroupName is a required field 2599 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 2600 2601 // A unique identifier for the current revision of the policy. 2602 // 2603 // RevisionId is a required field 2604 RevisionId *string `location:"querystring" locationName:"revisionId" type:"string" required:"true"` 2605} 2606 2607// String returns the string representation 2608func (s RemovePermissionInput) String() string { 2609 return awsutil.Prettify(s) 2610} 2611 2612// GoString returns the string representation 2613func (s RemovePermissionInput) GoString() string { 2614 return s.String() 2615} 2616 2617// Validate inspects the fields of the type to determine if they are valid. 2618func (s *RemovePermissionInput) Validate() error { 2619 invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} 2620 if s.ActionGroup == nil { 2621 invalidParams.Add(request.NewErrParamRequired("ActionGroup")) 2622 } 2623 if s.ActionGroup != nil && len(*s.ActionGroup) < 1 { 2624 invalidParams.Add(request.NewErrParamMinLen("ActionGroup", 1)) 2625 } 2626 if s.ProfilingGroupName == nil { 2627 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 2628 } 2629 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 2630 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 2631 } 2632 if s.RevisionId == nil { 2633 invalidParams.Add(request.NewErrParamRequired("RevisionId")) 2634 } 2635 2636 if invalidParams.Len() > 0 { 2637 return invalidParams 2638 } 2639 return nil 2640} 2641 2642// SetActionGroup sets the ActionGroup field's value. 2643func (s *RemovePermissionInput) SetActionGroup(v string) *RemovePermissionInput { 2644 s.ActionGroup = &v 2645 return s 2646} 2647 2648// SetProfilingGroupName sets the ProfilingGroupName field's value. 2649func (s *RemovePermissionInput) SetProfilingGroupName(v string) *RemovePermissionInput { 2650 s.ProfilingGroupName = &v 2651 return s 2652} 2653 2654// SetRevisionId sets the RevisionId field's value. 2655func (s *RemovePermissionInput) SetRevisionId(v string) *RemovePermissionInput { 2656 s.RevisionId = &v 2657 return s 2658} 2659 2660// The structure representing the removePermissionResponse. 2661type RemovePermissionOutput struct { 2662 _ struct{} `type:"structure"` 2663 2664 // The resource-based policy. 2665 // 2666 // Policy is a required field 2667 Policy *string `locationName:"policy" type:"string" required:"true"` 2668 2669 // A unique identifier for the current revision of the policy. 2670 // 2671 // RevisionId is a required field 2672 RevisionId *string `locationName:"revisionId" type:"string" required:"true"` 2673} 2674 2675// String returns the string representation 2676func (s RemovePermissionOutput) String() string { 2677 return awsutil.Prettify(s) 2678} 2679 2680// GoString returns the string representation 2681func (s RemovePermissionOutput) GoString() string { 2682 return s.String() 2683} 2684 2685// SetPolicy sets the Policy field's value. 2686func (s *RemovePermissionOutput) SetPolicy(v string) *RemovePermissionOutput { 2687 s.Policy = &v 2688 return s 2689} 2690 2691// SetRevisionId sets the RevisionId field's value. 2692func (s *RemovePermissionOutput) SetRevisionId(v string) *RemovePermissionOutput { 2693 s.RevisionId = &v 2694 return s 2695} 2696 2697// The resource specified in the request does not exist. 2698type ResourceNotFoundException struct { 2699 _ struct{} `type:"structure"` 2700 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2701 2702 Message_ *string `locationName:"message" type:"string"` 2703} 2704 2705// String returns the string representation 2706func (s ResourceNotFoundException) String() string { 2707 return awsutil.Prettify(s) 2708} 2709 2710// GoString returns the string representation 2711func (s ResourceNotFoundException) GoString() string { 2712 return s.String() 2713} 2714 2715func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 2716 return &ResourceNotFoundException{ 2717 RespMetadata: v, 2718 } 2719} 2720 2721// Code returns the exception type name. 2722func (s *ResourceNotFoundException) Code() string { 2723 return "ResourceNotFoundException" 2724} 2725 2726// Message returns the exception's message. 2727func (s *ResourceNotFoundException) Message() string { 2728 if s.Message_ != nil { 2729 return *s.Message_ 2730 } 2731 return "" 2732} 2733 2734// OrigErr always returns nil, satisfies awserr.Error interface. 2735func (s *ResourceNotFoundException) OrigErr() error { 2736 return nil 2737} 2738 2739func (s *ResourceNotFoundException) Error() string { 2740 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2741} 2742 2743// Status code returns the HTTP status code for the request's response error. 2744func (s *ResourceNotFoundException) StatusCode() int { 2745 return s.RespMetadata.StatusCode 2746} 2747 2748// RequestID returns the service's response RequestID for request. 2749func (s *ResourceNotFoundException) RequestID() string { 2750 return s.RespMetadata.RequestID 2751} 2752 2753// You have exceeded your service quota. To perform the requested action, remove 2754// some of the relevant resources, or use Service Quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) 2755// to request a service quota increase. 2756type ServiceQuotaExceededException struct { 2757 _ struct{} `type:"structure"` 2758 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2759 2760 Message_ *string `locationName:"message" type:"string"` 2761} 2762 2763// String returns the string representation 2764func (s ServiceQuotaExceededException) String() string { 2765 return awsutil.Prettify(s) 2766} 2767 2768// GoString returns the string representation 2769func (s ServiceQuotaExceededException) GoString() string { 2770 return s.String() 2771} 2772 2773func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 2774 return &ServiceQuotaExceededException{ 2775 RespMetadata: v, 2776 } 2777} 2778 2779// Code returns the exception type name. 2780func (s *ServiceQuotaExceededException) Code() string { 2781 return "ServiceQuotaExceededException" 2782} 2783 2784// Message returns the exception's message. 2785func (s *ServiceQuotaExceededException) Message() string { 2786 if s.Message_ != nil { 2787 return *s.Message_ 2788 } 2789 return "" 2790} 2791 2792// OrigErr always returns nil, satisfies awserr.Error interface. 2793func (s *ServiceQuotaExceededException) OrigErr() error { 2794 return nil 2795} 2796 2797func (s *ServiceQuotaExceededException) Error() string { 2798 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2799} 2800 2801// Status code returns the HTTP status code for the request's response error. 2802func (s *ServiceQuotaExceededException) StatusCode() int { 2803 return s.RespMetadata.StatusCode 2804} 2805 2806// RequestID returns the service's response RequestID for request. 2807func (s *ServiceQuotaExceededException) RequestID() string { 2808 return s.RespMetadata.RequestID 2809} 2810 2811// The request was denied due to request throttling. 2812type ThrottlingException struct { 2813 _ struct{} `type:"structure"` 2814 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2815 2816 Message_ *string `locationName:"message" type:"string"` 2817} 2818 2819// String returns the string representation 2820func (s ThrottlingException) String() string { 2821 return awsutil.Prettify(s) 2822} 2823 2824// GoString returns the string representation 2825func (s ThrottlingException) GoString() string { 2826 return s.String() 2827} 2828 2829func newErrorThrottlingException(v protocol.ResponseMetadata) error { 2830 return &ThrottlingException{ 2831 RespMetadata: v, 2832 } 2833} 2834 2835// Code returns the exception type name. 2836func (s *ThrottlingException) Code() string { 2837 return "ThrottlingException" 2838} 2839 2840// Message returns the exception's message. 2841func (s *ThrottlingException) Message() string { 2842 if s.Message_ != nil { 2843 return *s.Message_ 2844 } 2845 return "" 2846} 2847 2848// OrigErr always returns nil, satisfies awserr.Error interface. 2849func (s *ThrottlingException) OrigErr() error { 2850 return nil 2851} 2852 2853func (s *ThrottlingException) Error() string { 2854 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2855} 2856 2857// Status code returns the HTTP status code for the request's response error. 2858func (s *ThrottlingException) StatusCode() int { 2859 return s.RespMetadata.StatusCode 2860} 2861 2862// RequestID returns the service's response RequestID for request. 2863func (s *ThrottlingException) RequestID() string { 2864 return s.RespMetadata.RequestID 2865} 2866 2867// The structure representing the updateProfilingGroupRequest. 2868type UpdateProfilingGroupInput struct { 2869 _ struct{} `type:"structure"` 2870 2871 // AgentOrchestrationConfig is a required field 2872 AgentOrchestrationConfig *AgentOrchestrationConfig `locationName:"agentOrchestrationConfig" type:"structure" required:"true"` 2873 2874 // The name of the profiling group to update. 2875 // 2876 // ProfilingGroupName is a required field 2877 ProfilingGroupName *string `location:"uri" locationName:"profilingGroupName" min:"1" type:"string" required:"true"` 2878} 2879 2880// String returns the string representation 2881func (s UpdateProfilingGroupInput) String() string { 2882 return awsutil.Prettify(s) 2883} 2884 2885// GoString returns the string representation 2886func (s UpdateProfilingGroupInput) GoString() string { 2887 return s.String() 2888} 2889 2890// Validate inspects the fields of the type to determine if they are valid. 2891func (s *UpdateProfilingGroupInput) Validate() error { 2892 invalidParams := request.ErrInvalidParams{Context: "UpdateProfilingGroupInput"} 2893 if s.AgentOrchestrationConfig == nil { 2894 invalidParams.Add(request.NewErrParamRequired("AgentOrchestrationConfig")) 2895 } 2896 if s.ProfilingGroupName == nil { 2897 invalidParams.Add(request.NewErrParamRequired("ProfilingGroupName")) 2898 } 2899 if s.ProfilingGroupName != nil && len(*s.ProfilingGroupName) < 1 { 2900 invalidParams.Add(request.NewErrParamMinLen("ProfilingGroupName", 1)) 2901 } 2902 if s.AgentOrchestrationConfig != nil { 2903 if err := s.AgentOrchestrationConfig.Validate(); err != nil { 2904 invalidParams.AddNested("AgentOrchestrationConfig", err.(request.ErrInvalidParams)) 2905 } 2906 } 2907 2908 if invalidParams.Len() > 0 { 2909 return invalidParams 2910 } 2911 return nil 2912} 2913 2914// SetAgentOrchestrationConfig sets the AgentOrchestrationConfig field's value. 2915func (s *UpdateProfilingGroupInput) SetAgentOrchestrationConfig(v *AgentOrchestrationConfig) *UpdateProfilingGroupInput { 2916 s.AgentOrchestrationConfig = v 2917 return s 2918} 2919 2920// SetProfilingGroupName sets the ProfilingGroupName field's value. 2921func (s *UpdateProfilingGroupInput) SetProfilingGroupName(v string) *UpdateProfilingGroupInput { 2922 s.ProfilingGroupName = &v 2923 return s 2924} 2925 2926// The structure representing the updateProfilingGroupResponse. 2927type UpdateProfilingGroupOutput struct { 2928 _ struct{} `type:"structure" payload:"ProfilingGroup"` 2929 2930 // Updated information about the profiling group. 2931 // 2932 // ProfilingGroup is a required field 2933 ProfilingGroup *ProfilingGroupDescription `locationName:"profilingGroup" type:"structure" required:"true"` 2934} 2935 2936// String returns the string representation 2937func (s UpdateProfilingGroupOutput) String() string { 2938 return awsutil.Prettify(s) 2939} 2940 2941// GoString returns the string representation 2942func (s UpdateProfilingGroupOutput) GoString() string { 2943 return s.String() 2944} 2945 2946// SetProfilingGroup sets the ProfilingGroup field's value. 2947func (s *UpdateProfilingGroupOutput) SetProfilingGroup(v *ProfilingGroupDescription) *UpdateProfilingGroupOutput { 2948 s.ProfilingGroup = v 2949 return s 2950} 2951 2952// The parameter is not valid. 2953type ValidationException struct { 2954 _ struct{} `type:"structure"` 2955 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2956 2957 Message_ *string `locationName:"message" type:"string"` 2958} 2959 2960// String returns the string representation 2961func (s ValidationException) String() string { 2962 return awsutil.Prettify(s) 2963} 2964 2965// GoString returns the string representation 2966func (s ValidationException) GoString() string { 2967 return s.String() 2968} 2969 2970func newErrorValidationException(v protocol.ResponseMetadata) error { 2971 return &ValidationException{ 2972 RespMetadata: v, 2973 } 2974} 2975 2976// Code returns the exception type name. 2977func (s *ValidationException) Code() string { 2978 return "ValidationException" 2979} 2980 2981// Message returns the exception's message. 2982func (s *ValidationException) Message() string { 2983 if s.Message_ != nil { 2984 return *s.Message_ 2985 } 2986 return "" 2987} 2988 2989// OrigErr always returns nil, satisfies awserr.Error interface. 2990func (s *ValidationException) OrigErr() error { 2991 return nil 2992} 2993 2994func (s *ValidationException) Error() string { 2995 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2996} 2997 2998// Status code returns the HTTP status code for the request's response error. 2999func (s *ValidationException) StatusCode() int { 3000 return s.RespMetadata.StatusCode 3001} 3002 3003// RequestID returns the service's response RequestID for request. 3004func (s *ValidationException) RequestID() string { 3005 return s.RespMetadata.RequestID 3006} 3007 3008const ( 3009 // ActionGroupAgentPermissions is a ActionGroup enum value 3010 ActionGroupAgentPermissions = "agentPermissions" 3011) 3012 3013const ( 3014 // AggregationPeriodP1d is a AggregationPeriod enum value 3015 AggregationPeriodP1d = "P1D" 3016 3017 // AggregationPeriodPt1h is a AggregationPeriod enum value 3018 AggregationPeriodPt1h = "PT1H" 3019 3020 // AggregationPeriodPt5m is a AggregationPeriod enum value 3021 AggregationPeriodPt5m = "PT5M" 3022) 3023 3024const ( 3025 // OrderByTimestampAscending is a OrderBy enum value 3026 OrderByTimestampAscending = "TimestampAscending" 3027 3028 // OrderByTimestampDescending is a OrderBy enum value 3029 OrderByTimestampDescending = "TimestampDescending" 3030) 3031