1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package cloudwatchlogs 4 5import ( 6 "fmt" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11 "github.com/aws/aws-sdk-go/private/protocol" 12 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 13) 14 15const opAssociateKmsKey = "AssociateKmsKey" 16 17// AssociateKmsKeyRequest generates a "aws/request.Request" representing the 18// client's request for the AssociateKmsKey operation. The "output" return 19// value will be populated with the request's response once the request completes 20// successfully. 21// 22// Use "Send" method on the returned Request to send the API call to the service. 23// the "output" return value is not valid until after Send returns without error. 24// 25// See AssociateKmsKey for more information on using the AssociateKmsKey 26// API call, and error handling. 27// 28// This method is useful when you want to inject custom logic or configuration 29// into the SDK's request lifecycle. Such as custom headers, or retry logic. 30// 31// 32// // Example sending a request using the AssociateKmsKeyRequest method. 33// req, resp := client.AssociateKmsKeyRequest(params) 34// 35// err := req.Send() 36// if err == nil { // resp is now filled 37// fmt.Println(resp) 38// } 39// 40// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey 41func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (req *request.Request, output *AssociateKmsKeyOutput) { 42 op := &request.Operation{ 43 Name: opAssociateKmsKey, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &AssociateKmsKeyInput{} 50 } 51 52 output = &AssociateKmsKeyOutput{} 53 req = c.newRequest(op, input, output) 54 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 55 return 56} 57 58// AssociateKmsKey API operation for Amazon CloudWatch Logs. 59// 60// Associates the specified Key Management Service customer master key (CMK) 61// with the specified log group. 62// 63// Associating an KMS CMK with a log group overrides any existing associations 64// between the log group and a CMK. After a CMK is associated with a log group, 65// all newly ingested data for the log group is encrypted using the CMK. This 66// association is stored as long as the data encrypted with the CMK is still 67// within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data 68// whenever it is requested. 69// 70// CloudWatch Logs supports only symmetric CMKs. Do not use an associate an 71// asymmetric CMK with your log group. For more information, see Using Symmetric 72// and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). 73// 74// It can take up to 5 minutes for this operation to take effect. 75// 76// If you attempt to associate a CMK with a log group but the CMK does not exist 77// or the CMK is disabled, you receive an InvalidParameterException error. 78// 79// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 80// with awserr.Error's Code and Message methods to get detailed information about 81// the error. 82// 83// See the AWS API reference guide for Amazon CloudWatch Logs's 84// API operation AssociateKmsKey for usage and error information. 85// 86// Returned Error Types: 87// * InvalidParameterException 88// A parameter is specified incorrectly. 89// 90// * ResourceNotFoundException 91// The specified resource does not exist. 92// 93// * OperationAbortedException 94// Multiple requests to update the same resource were in conflict. 95// 96// * ServiceUnavailableException 97// The service cannot complete the request. 98// 99// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey 100func (c *CloudWatchLogs) AssociateKmsKey(input *AssociateKmsKeyInput) (*AssociateKmsKeyOutput, error) { 101 req, out := c.AssociateKmsKeyRequest(input) 102 return out, req.Send() 103} 104 105// AssociateKmsKeyWithContext is the same as AssociateKmsKey with the addition of 106// the ability to pass a context and additional request options. 107// 108// See AssociateKmsKey for details on how to use this API operation. 109// 110// The context must be non-nil and will be used for request cancellation. If 111// the context is nil a panic will occur. In the future the SDK may create 112// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 113// for more information on using Contexts. 114func (c *CloudWatchLogs) AssociateKmsKeyWithContext(ctx aws.Context, input *AssociateKmsKeyInput, opts ...request.Option) (*AssociateKmsKeyOutput, error) { 115 req, out := c.AssociateKmsKeyRequest(input) 116 req.SetContext(ctx) 117 req.ApplyOptions(opts...) 118 return out, req.Send() 119} 120 121const opCancelExportTask = "CancelExportTask" 122 123// CancelExportTaskRequest generates a "aws/request.Request" representing the 124// client's request for the CancelExportTask operation. The "output" return 125// value will be populated with the request's response once the request completes 126// successfully. 127// 128// Use "Send" method on the returned Request to send the API call to the service. 129// the "output" return value is not valid until after Send returns without error. 130// 131// See CancelExportTask for more information on using the CancelExportTask 132// API call, and error handling. 133// 134// This method is useful when you want to inject custom logic or configuration 135// into the SDK's request lifecycle. Such as custom headers, or retry logic. 136// 137// 138// // Example sending a request using the CancelExportTaskRequest method. 139// req, resp := client.CancelExportTaskRequest(params) 140// 141// err := req.Send() 142// if err == nil { // resp is now filled 143// fmt.Println(resp) 144// } 145// 146// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask 147func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) { 148 op := &request.Operation{ 149 Name: opCancelExportTask, 150 HTTPMethod: "POST", 151 HTTPPath: "/", 152 } 153 154 if input == nil { 155 input = &CancelExportTaskInput{} 156 } 157 158 output = &CancelExportTaskOutput{} 159 req = c.newRequest(op, input, output) 160 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 161 return 162} 163 164// CancelExportTask API operation for Amazon CloudWatch Logs. 165// 166// Cancels the specified export task. 167// 168// The task must be in the PENDING or RUNNING state. 169// 170// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 171// with awserr.Error's Code and Message methods to get detailed information about 172// the error. 173// 174// See the AWS API reference guide for Amazon CloudWatch Logs's 175// API operation CancelExportTask for usage and error information. 176// 177// Returned Error Types: 178// * InvalidParameterException 179// A parameter is specified incorrectly. 180// 181// * ResourceNotFoundException 182// The specified resource does not exist. 183// 184// * InvalidOperationException 185// The operation is not valid on the specified resource. 186// 187// * ServiceUnavailableException 188// The service cannot complete the request. 189// 190// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask 191func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) { 192 req, out := c.CancelExportTaskRequest(input) 193 return out, req.Send() 194} 195 196// CancelExportTaskWithContext is the same as CancelExportTask with the addition of 197// the ability to pass a context and additional request options. 198// 199// See CancelExportTask for details on how to use this API operation. 200// 201// The context must be non-nil and will be used for request cancellation. If 202// the context is nil a panic will occur. In the future the SDK may create 203// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 204// for more information on using Contexts. 205func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) { 206 req, out := c.CancelExportTaskRequest(input) 207 req.SetContext(ctx) 208 req.ApplyOptions(opts...) 209 return out, req.Send() 210} 211 212const opCreateExportTask = "CreateExportTask" 213 214// CreateExportTaskRequest generates a "aws/request.Request" representing the 215// client's request for the CreateExportTask operation. The "output" return 216// value will be populated with the request's response once the request completes 217// successfully. 218// 219// Use "Send" method on the returned Request to send the API call to the service. 220// the "output" return value is not valid until after Send returns without error. 221// 222// See CreateExportTask for more information on using the CreateExportTask 223// API call, and error handling. 224// 225// This method is useful when you want to inject custom logic or configuration 226// into the SDK's request lifecycle. Such as custom headers, or retry logic. 227// 228// 229// // Example sending a request using the CreateExportTaskRequest method. 230// req, resp := client.CreateExportTaskRequest(params) 231// 232// err := req.Send() 233// if err == nil { // resp is now filled 234// fmt.Println(resp) 235// } 236// 237// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask 238func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput) { 239 op := &request.Operation{ 240 Name: opCreateExportTask, 241 HTTPMethod: "POST", 242 HTTPPath: "/", 243 } 244 245 if input == nil { 246 input = &CreateExportTaskInput{} 247 } 248 249 output = &CreateExportTaskOutput{} 250 req = c.newRequest(op, input, output) 251 return 252} 253 254// CreateExportTask API operation for Amazon CloudWatch Logs. 255// 256// Creates an export task, which allows you to efficiently export data from 257// a log group to an Amazon S3 bucket. When you perform a CreateExportTask operation, 258// you must use credentials that have permission to write to the S3 bucket that 259// you specify as the destination. 260// 261// This is an asynchronous call. If all the required information is provided, 262// this operation initiates an export task and responds with the ID of the task. 263// After the task has started, you can use DescribeExportTasks (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html) 264// to get the status of the export task. Each account can only have one active 265// (RUNNING or PENDING) export task at a time. To cancel an export task, use 266// CancelExportTask (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html). 267// 268// You can export logs from multiple log groups or multiple time ranges to the 269// same S3 bucket. To separate out log data for each export task, you can specify 270// a prefix to be used as the Amazon S3 key prefix for all exported objects. 271// 272// Exporting to S3 buckets that are encrypted with AES-256 is supported. Exporting 273// to S3 buckets encrypted with SSE-KMS is not supported. 274// 275// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 276// with awserr.Error's Code and Message methods to get detailed information about 277// the error. 278// 279// See the AWS API reference guide for Amazon CloudWatch Logs's 280// API operation CreateExportTask for usage and error information. 281// 282// Returned Error Types: 283// * InvalidParameterException 284// A parameter is specified incorrectly. 285// 286// * LimitExceededException 287// You have reached the maximum number of resources that can be created. 288// 289// * OperationAbortedException 290// Multiple requests to update the same resource were in conflict. 291// 292// * ServiceUnavailableException 293// The service cannot complete the request. 294// 295// * ResourceNotFoundException 296// The specified resource does not exist. 297// 298// * ResourceAlreadyExistsException 299// The specified resource already exists. 300// 301// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask 302func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error) { 303 req, out := c.CreateExportTaskRequest(input) 304 return out, req.Send() 305} 306 307// CreateExportTaskWithContext is the same as CreateExportTask with the addition of 308// the ability to pass a context and additional request options. 309// 310// See CreateExportTask for details on how to use this API operation. 311// 312// The context must be non-nil and will be used for request cancellation. If 313// the context is nil a panic will occur. In the future the SDK may create 314// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 315// for more information on using Contexts. 316func (c *CloudWatchLogs) CreateExportTaskWithContext(ctx aws.Context, input *CreateExportTaskInput, opts ...request.Option) (*CreateExportTaskOutput, error) { 317 req, out := c.CreateExportTaskRequest(input) 318 req.SetContext(ctx) 319 req.ApplyOptions(opts...) 320 return out, req.Send() 321} 322 323const opCreateLogGroup = "CreateLogGroup" 324 325// CreateLogGroupRequest generates a "aws/request.Request" representing the 326// client's request for the CreateLogGroup operation. The "output" return 327// value will be populated with the request's response once the request completes 328// successfully. 329// 330// Use "Send" method on the returned Request to send the API call to the service. 331// the "output" return value is not valid until after Send returns without error. 332// 333// See CreateLogGroup for more information on using the CreateLogGroup 334// API call, and error handling. 335// 336// This method is useful when you want to inject custom logic or configuration 337// into the SDK's request lifecycle. Such as custom headers, or retry logic. 338// 339// 340// // Example sending a request using the CreateLogGroupRequest method. 341// req, resp := client.CreateLogGroupRequest(params) 342// 343// err := req.Send() 344// if err == nil { // resp is now filled 345// fmt.Println(resp) 346// } 347// 348// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup 349func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput) { 350 op := &request.Operation{ 351 Name: opCreateLogGroup, 352 HTTPMethod: "POST", 353 HTTPPath: "/", 354 } 355 356 if input == nil { 357 input = &CreateLogGroupInput{} 358 } 359 360 output = &CreateLogGroupOutput{} 361 req = c.newRequest(op, input, output) 362 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 363 return 364} 365 366// CreateLogGroup API operation for Amazon CloudWatch Logs. 367// 368// Creates a log group with the specified name. You can create up to 20,000 369// log groups per account. 370// 371// You must use the following guidelines when naming a log group: 372// 373// * Log group names must be unique within a region for an Amazon Web Services 374// account. 375// 376// * Log group names can be between 1 and 512 characters long. 377// 378// * Log group names consist of the following characters: a-z, A-Z, 0-9, 379// '_' (underscore), '-' (hyphen), '/' (forward slash), '.' (period), and 380// '#' (number sign) 381// 382// When you create a log group, by default the log events in the log group never 383// expire. To set a retention policy so that events expire and are deleted after 384// a specified time, use PutRetentionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html). 385// 386// If you associate a Key Management Service customer master key (CMK) with 387// the log group, ingested data is encrypted using the CMK. This association 388// is stored as long as the data encrypted with the CMK is still within CloudWatch 389// Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested. 390// 391// If you attempt to associate a CMK with the log group but the CMK does not 392// exist or the CMK is disabled, you receive an InvalidParameterException error. 393// 394// CloudWatch Logs supports only symmetric CMKs. Do not associate an asymmetric 395// CMK with your log group. For more information, see Using Symmetric and Asymmetric 396// Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). 397// 398// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 399// with awserr.Error's Code and Message methods to get detailed information about 400// the error. 401// 402// See the AWS API reference guide for Amazon CloudWatch Logs's 403// API operation CreateLogGroup for usage and error information. 404// 405// Returned Error Types: 406// * InvalidParameterException 407// A parameter is specified incorrectly. 408// 409// * ResourceAlreadyExistsException 410// The specified resource already exists. 411// 412// * LimitExceededException 413// You have reached the maximum number of resources that can be created. 414// 415// * OperationAbortedException 416// Multiple requests to update the same resource were in conflict. 417// 418// * ServiceUnavailableException 419// The service cannot complete the request. 420// 421// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup 422func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error) { 423 req, out := c.CreateLogGroupRequest(input) 424 return out, req.Send() 425} 426 427// CreateLogGroupWithContext is the same as CreateLogGroup with the addition of 428// the ability to pass a context and additional request options. 429// 430// See CreateLogGroup for details on how to use this API operation. 431// 432// The context must be non-nil and will be used for request cancellation. If 433// the context is nil a panic will occur. In the future the SDK may create 434// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 435// for more information on using Contexts. 436func (c *CloudWatchLogs) CreateLogGroupWithContext(ctx aws.Context, input *CreateLogGroupInput, opts ...request.Option) (*CreateLogGroupOutput, error) { 437 req, out := c.CreateLogGroupRequest(input) 438 req.SetContext(ctx) 439 req.ApplyOptions(opts...) 440 return out, req.Send() 441} 442 443const opCreateLogStream = "CreateLogStream" 444 445// CreateLogStreamRequest generates a "aws/request.Request" representing the 446// client's request for the CreateLogStream operation. The "output" return 447// value will be populated with the request's response once the request completes 448// successfully. 449// 450// Use "Send" method on the returned Request to send the API call to the service. 451// the "output" return value is not valid until after Send returns without error. 452// 453// See CreateLogStream for more information on using the CreateLogStream 454// API call, and error handling. 455// 456// This method is useful when you want to inject custom logic or configuration 457// into the SDK's request lifecycle. Such as custom headers, or retry logic. 458// 459// 460// // Example sending a request using the CreateLogStreamRequest method. 461// req, resp := client.CreateLogStreamRequest(params) 462// 463// err := req.Send() 464// if err == nil { // resp is now filled 465// fmt.Println(resp) 466// } 467// 468// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream 469func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput) { 470 op := &request.Operation{ 471 Name: opCreateLogStream, 472 HTTPMethod: "POST", 473 HTTPPath: "/", 474 } 475 476 if input == nil { 477 input = &CreateLogStreamInput{} 478 } 479 480 output = &CreateLogStreamOutput{} 481 req = c.newRequest(op, input, output) 482 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 483 return 484} 485 486// CreateLogStream API operation for Amazon CloudWatch Logs. 487// 488// Creates a log stream for the specified log group. A log stream is a sequence 489// of log events that originate from a single source, such as an application 490// instance or a resource that is being monitored. 491// 492// There is no limit on the number of log streams that you can create for a 493// log group. There is a limit of 50 TPS on CreateLogStream operations, after 494// which transactions are throttled. 495// 496// You must use the following guidelines when naming a log stream: 497// 498// * Log stream names must be unique within the log group. 499// 500// * Log stream names can be between 1 and 512 characters long. 501// 502// * The ':' (colon) and '*' (asterisk) characters are not allowed. 503// 504// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 505// with awserr.Error's Code and Message methods to get detailed information about 506// the error. 507// 508// See the AWS API reference guide for Amazon CloudWatch Logs's 509// API operation CreateLogStream for usage and error information. 510// 511// Returned Error Types: 512// * InvalidParameterException 513// A parameter is specified incorrectly. 514// 515// * ResourceAlreadyExistsException 516// The specified resource already exists. 517// 518// * ResourceNotFoundException 519// The specified resource does not exist. 520// 521// * ServiceUnavailableException 522// The service cannot complete the request. 523// 524// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream 525func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error) { 526 req, out := c.CreateLogStreamRequest(input) 527 return out, req.Send() 528} 529 530// CreateLogStreamWithContext is the same as CreateLogStream with the addition of 531// the ability to pass a context and additional request options. 532// 533// See CreateLogStream for details on how to use this API operation. 534// 535// The context must be non-nil and will be used for request cancellation. If 536// the context is nil a panic will occur. In the future the SDK may create 537// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 538// for more information on using Contexts. 539func (c *CloudWatchLogs) CreateLogStreamWithContext(ctx aws.Context, input *CreateLogStreamInput, opts ...request.Option) (*CreateLogStreamOutput, error) { 540 req, out := c.CreateLogStreamRequest(input) 541 req.SetContext(ctx) 542 req.ApplyOptions(opts...) 543 return out, req.Send() 544} 545 546const opDeleteDestination = "DeleteDestination" 547 548// DeleteDestinationRequest generates a "aws/request.Request" representing the 549// client's request for the DeleteDestination operation. The "output" return 550// value will be populated with the request's response once the request completes 551// successfully. 552// 553// Use "Send" method on the returned Request to send the API call to the service. 554// the "output" return value is not valid until after Send returns without error. 555// 556// See DeleteDestination for more information on using the DeleteDestination 557// API call, and error handling. 558// 559// This method is useful when you want to inject custom logic or configuration 560// into the SDK's request lifecycle. Such as custom headers, or retry logic. 561// 562// 563// // Example sending a request using the DeleteDestinationRequest method. 564// req, resp := client.DeleteDestinationRequest(params) 565// 566// err := req.Send() 567// if err == nil { // resp is now filled 568// fmt.Println(resp) 569// } 570// 571// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination 572func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) { 573 op := &request.Operation{ 574 Name: opDeleteDestination, 575 HTTPMethod: "POST", 576 HTTPPath: "/", 577 } 578 579 if input == nil { 580 input = &DeleteDestinationInput{} 581 } 582 583 output = &DeleteDestinationOutput{} 584 req = c.newRequest(op, input, output) 585 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 586 return 587} 588 589// DeleteDestination API operation for Amazon CloudWatch Logs. 590// 591// Deletes the specified destination, and eventually disables all the subscription 592// filters that publish to it. This operation does not delete the physical resource 593// encapsulated by the destination. 594// 595// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 596// with awserr.Error's Code and Message methods to get detailed information about 597// the error. 598// 599// See the AWS API reference guide for Amazon CloudWatch Logs's 600// API operation DeleteDestination for usage and error information. 601// 602// Returned Error Types: 603// * InvalidParameterException 604// A parameter is specified incorrectly. 605// 606// * ResourceNotFoundException 607// The specified resource does not exist. 608// 609// * OperationAbortedException 610// Multiple requests to update the same resource were in conflict. 611// 612// * ServiceUnavailableException 613// The service cannot complete the request. 614// 615// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination 616func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) { 617 req, out := c.DeleteDestinationRequest(input) 618 return out, req.Send() 619} 620 621// DeleteDestinationWithContext is the same as DeleteDestination with the addition of 622// the ability to pass a context and additional request options. 623// 624// See DeleteDestination for details on how to use this API operation. 625// 626// The context must be non-nil and will be used for request cancellation. If 627// the context is nil a panic will occur. In the future the SDK may create 628// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 629// for more information on using Contexts. 630func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) { 631 req, out := c.DeleteDestinationRequest(input) 632 req.SetContext(ctx) 633 req.ApplyOptions(opts...) 634 return out, req.Send() 635} 636 637const opDeleteLogGroup = "DeleteLogGroup" 638 639// DeleteLogGroupRequest generates a "aws/request.Request" representing the 640// client's request for the DeleteLogGroup operation. The "output" return 641// value will be populated with the request's response once the request completes 642// successfully. 643// 644// Use "Send" method on the returned Request to send the API call to the service. 645// the "output" return value is not valid until after Send returns without error. 646// 647// See DeleteLogGroup for more information on using the DeleteLogGroup 648// API call, and error handling. 649// 650// This method is useful when you want to inject custom logic or configuration 651// into the SDK's request lifecycle. Such as custom headers, or retry logic. 652// 653// 654// // Example sending a request using the DeleteLogGroupRequest method. 655// req, resp := client.DeleteLogGroupRequest(params) 656// 657// err := req.Send() 658// if err == nil { // resp is now filled 659// fmt.Println(resp) 660// } 661// 662// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup 663func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) { 664 op := &request.Operation{ 665 Name: opDeleteLogGroup, 666 HTTPMethod: "POST", 667 HTTPPath: "/", 668 } 669 670 if input == nil { 671 input = &DeleteLogGroupInput{} 672 } 673 674 output = &DeleteLogGroupOutput{} 675 req = c.newRequest(op, input, output) 676 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 677 return 678} 679 680// DeleteLogGroup API operation for Amazon CloudWatch Logs. 681// 682// Deletes the specified log group and permanently deletes all the archived 683// log events associated with the log group. 684// 685// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 686// with awserr.Error's Code and Message methods to get detailed information about 687// the error. 688// 689// See the AWS API reference guide for Amazon CloudWatch Logs's 690// API operation DeleteLogGroup for usage and error information. 691// 692// Returned Error Types: 693// * InvalidParameterException 694// A parameter is specified incorrectly. 695// 696// * ResourceNotFoundException 697// The specified resource does not exist. 698// 699// * OperationAbortedException 700// Multiple requests to update the same resource were in conflict. 701// 702// * ServiceUnavailableException 703// The service cannot complete the request. 704// 705// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup 706func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) { 707 req, out := c.DeleteLogGroupRequest(input) 708 return out, req.Send() 709} 710 711// DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of 712// the ability to pass a context and additional request options. 713// 714// See DeleteLogGroup for details on how to use this API operation. 715// 716// The context must be non-nil and will be used for request cancellation. If 717// the context is nil a panic will occur. In the future the SDK may create 718// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 719// for more information on using Contexts. 720func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) { 721 req, out := c.DeleteLogGroupRequest(input) 722 req.SetContext(ctx) 723 req.ApplyOptions(opts...) 724 return out, req.Send() 725} 726 727const opDeleteLogStream = "DeleteLogStream" 728 729// DeleteLogStreamRequest generates a "aws/request.Request" representing the 730// client's request for the DeleteLogStream operation. The "output" return 731// value will be populated with the request's response once the request completes 732// successfully. 733// 734// Use "Send" method on the returned Request to send the API call to the service. 735// the "output" return value is not valid until after Send returns without error. 736// 737// See DeleteLogStream for more information on using the DeleteLogStream 738// API call, and error handling. 739// 740// This method is useful when you want to inject custom logic or configuration 741// into the SDK's request lifecycle. Such as custom headers, or retry logic. 742// 743// 744// // Example sending a request using the DeleteLogStreamRequest method. 745// req, resp := client.DeleteLogStreamRequest(params) 746// 747// err := req.Send() 748// if err == nil { // resp is now filled 749// fmt.Println(resp) 750// } 751// 752// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream 753func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) { 754 op := &request.Operation{ 755 Name: opDeleteLogStream, 756 HTTPMethod: "POST", 757 HTTPPath: "/", 758 } 759 760 if input == nil { 761 input = &DeleteLogStreamInput{} 762 } 763 764 output = &DeleteLogStreamOutput{} 765 req = c.newRequest(op, input, output) 766 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 767 return 768} 769 770// DeleteLogStream API operation for Amazon CloudWatch Logs. 771// 772// Deletes the specified log stream and permanently deletes all the archived 773// log events associated with the log stream. 774// 775// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 776// with awserr.Error's Code and Message methods to get detailed information about 777// the error. 778// 779// See the AWS API reference guide for Amazon CloudWatch Logs's 780// API operation DeleteLogStream for usage and error information. 781// 782// Returned Error Types: 783// * InvalidParameterException 784// A parameter is specified incorrectly. 785// 786// * ResourceNotFoundException 787// The specified resource does not exist. 788// 789// * OperationAbortedException 790// Multiple requests to update the same resource were in conflict. 791// 792// * ServiceUnavailableException 793// The service cannot complete the request. 794// 795// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream 796func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) { 797 req, out := c.DeleteLogStreamRequest(input) 798 return out, req.Send() 799} 800 801// DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of 802// the ability to pass a context and additional request options. 803// 804// See DeleteLogStream for details on how to use this API operation. 805// 806// The context must be non-nil and will be used for request cancellation. If 807// the context is nil a panic will occur. In the future the SDK may create 808// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 809// for more information on using Contexts. 810func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) { 811 req, out := c.DeleteLogStreamRequest(input) 812 req.SetContext(ctx) 813 req.ApplyOptions(opts...) 814 return out, req.Send() 815} 816 817const opDeleteMetricFilter = "DeleteMetricFilter" 818 819// DeleteMetricFilterRequest generates a "aws/request.Request" representing the 820// client's request for the DeleteMetricFilter operation. The "output" return 821// value will be populated with the request's response once the request completes 822// successfully. 823// 824// Use "Send" method on the returned Request to send the API call to the service. 825// the "output" return value is not valid until after Send returns without error. 826// 827// See DeleteMetricFilter for more information on using the DeleteMetricFilter 828// API call, and error handling. 829// 830// This method is useful when you want to inject custom logic or configuration 831// into the SDK's request lifecycle. Such as custom headers, or retry logic. 832// 833// 834// // Example sending a request using the DeleteMetricFilterRequest method. 835// req, resp := client.DeleteMetricFilterRequest(params) 836// 837// err := req.Send() 838// if err == nil { // resp is now filled 839// fmt.Println(resp) 840// } 841// 842// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter 843func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) { 844 op := &request.Operation{ 845 Name: opDeleteMetricFilter, 846 HTTPMethod: "POST", 847 HTTPPath: "/", 848 } 849 850 if input == nil { 851 input = &DeleteMetricFilterInput{} 852 } 853 854 output = &DeleteMetricFilterOutput{} 855 req = c.newRequest(op, input, output) 856 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 857 return 858} 859 860// DeleteMetricFilter API operation for Amazon CloudWatch Logs. 861// 862// Deletes the specified metric filter. 863// 864// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 865// with awserr.Error's Code and Message methods to get detailed information about 866// the error. 867// 868// See the AWS API reference guide for Amazon CloudWatch Logs's 869// API operation DeleteMetricFilter for usage and error information. 870// 871// Returned Error Types: 872// * InvalidParameterException 873// A parameter is specified incorrectly. 874// 875// * ResourceNotFoundException 876// The specified resource does not exist. 877// 878// * OperationAbortedException 879// Multiple requests to update the same resource were in conflict. 880// 881// * ServiceUnavailableException 882// The service cannot complete the request. 883// 884// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter 885func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) { 886 req, out := c.DeleteMetricFilterRequest(input) 887 return out, req.Send() 888} 889 890// DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of 891// the ability to pass a context and additional request options. 892// 893// See DeleteMetricFilter for details on how to use this API operation. 894// 895// The context must be non-nil and will be used for request cancellation. If 896// the context is nil a panic will occur. In the future the SDK may create 897// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 898// for more information on using Contexts. 899func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) { 900 req, out := c.DeleteMetricFilterRequest(input) 901 req.SetContext(ctx) 902 req.ApplyOptions(opts...) 903 return out, req.Send() 904} 905 906const opDeleteQueryDefinition = "DeleteQueryDefinition" 907 908// DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the 909// client's request for the DeleteQueryDefinition operation. The "output" return 910// value will be populated with the request's response once the request completes 911// successfully. 912// 913// Use "Send" method on the returned Request to send the API call to the service. 914// the "output" return value is not valid until after Send returns without error. 915// 916// See DeleteQueryDefinition for more information on using the DeleteQueryDefinition 917// API call, and error handling. 918// 919// This method is useful when you want to inject custom logic or configuration 920// into the SDK's request lifecycle. Such as custom headers, or retry logic. 921// 922// 923// // Example sending a request using the DeleteQueryDefinitionRequest method. 924// req, resp := client.DeleteQueryDefinitionRequest(params) 925// 926// err := req.Send() 927// if err == nil { // resp is now filled 928// fmt.Println(resp) 929// } 930// 931// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition 932func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput) { 933 op := &request.Operation{ 934 Name: opDeleteQueryDefinition, 935 HTTPMethod: "POST", 936 HTTPPath: "/", 937 } 938 939 if input == nil { 940 input = &DeleteQueryDefinitionInput{} 941 } 942 943 output = &DeleteQueryDefinitionOutput{} 944 req = c.newRequest(op, input, output) 945 return 946} 947 948// DeleteQueryDefinition API operation for Amazon CloudWatch Logs. 949// 950// Deletes a saved CloudWatch Logs Insights query definition. A query definition 951// contains details about a saved CloudWatch Logs Insights query. 952// 953// Each DeleteQueryDefinition operation can delete one query definition. 954// 955// You must have the logs:DeleteQueryDefinition permission to be able to perform 956// this operation. 957// 958// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 959// with awserr.Error's Code and Message methods to get detailed information about 960// the error. 961// 962// See the AWS API reference guide for Amazon CloudWatch Logs's 963// API operation DeleteQueryDefinition for usage and error information. 964// 965// Returned Error Types: 966// * InvalidParameterException 967// A parameter is specified incorrectly. 968// 969// * ResourceNotFoundException 970// The specified resource does not exist. 971// 972// * ServiceUnavailableException 973// The service cannot complete the request. 974// 975// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition 976func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error) { 977 req, out := c.DeleteQueryDefinitionRequest(input) 978 return out, req.Send() 979} 980 981// DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of 982// the ability to pass a context and additional request options. 983// 984// See DeleteQueryDefinition for details on how to use this API operation. 985// 986// The context must be non-nil and will be used for request cancellation. If 987// the context is nil a panic will occur. In the future the SDK may create 988// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 989// for more information on using Contexts. 990func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error) { 991 req, out := c.DeleteQueryDefinitionRequest(input) 992 req.SetContext(ctx) 993 req.ApplyOptions(opts...) 994 return out, req.Send() 995} 996 997const opDeleteResourcePolicy = "DeleteResourcePolicy" 998 999// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the 1000// client's request for the DeleteResourcePolicy operation. The "output" return 1001// value will be populated with the request's response once the request completes 1002// successfully. 1003// 1004// Use "Send" method on the returned Request to send the API call to the service. 1005// the "output" return value is not valid until after Send returns without error. 1006// 1007// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy 1008// API call, and error handling. 1009// 1010// This method is useful when you want to inject custom logic or configuration 1011// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1012// 1013// 1014// // Example sending a request using the DeleteResourcePolicyRequest method. 1015// req, resp := client.DeleteResourcePolicyRequest(params) 1016// 1017// err := req.Send() 1018// if err == nil { // resp is now filled 1019// fmt.Println(resp) 1020// } 1021// 1022// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy 1023func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { 1024 op := &request.Operation{ 1025 Name: opDeleteResourcePolicy, 1026 HTTPMethod: "POST", 1027 HTTPPath: "/", 1028 } 1029 1030 if input == nil { 1031 input = &DeleteResourcePolicyInput{} 1032 } 1033 1034 output = &DeleteResourcePolicyOutput{} 1035 req = c.newRequest(op, input, output) 1036 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1037 return 1038} 1039 1040// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. 1041// 1042// Deletes a resource policy from this account. This revokes the access of the 1043// identities in that policy to put log events to this account. 1044// 1045// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1046// with awserr.Error's Code and Message methods to get detailed information about 1047// the error. 1048// 1049// See the AWS API reference guide for Amazon CloudWatch Logs's 1050// API operation DeleteResourcePolicy for usage and error information. 1051// 1052// Returned Error Types: 1053// * InvalidParameterException 1054// A parameter is specified incorrectly. 1055// 1056// * ResourceNotFoundException 1057// The specified resource does not exist. 1058// 1059// * ServiceUnavailableException 1060// The service cannot complete the request. 1061// 1062// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy 1063func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { 1064 req, out := c.DeleteResourcePolicyRequest(input) 1065 return out, req.Send() 1066} 1067 1068// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of 1069// the ability to pass a context and additional request options. 1070// 1071// See DeleteResourcePolicy for details on how to use this API operation. 1072// 1073// The context must be non-nil and will be used for request cancellation. If 1074// the context is nil a panic will occur. In the future the SDK may create 1075// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1076// for more information on using Contexts. 1077func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { 1078 req, out := c.DeleteResourcePolicyRequest(input) 1079 req.SetContext(ctx) 1080 req.ApplyOptions(opts...) 1081 return out, req.Send() 1082} 1083 1084const opDeleteRetentionPolicy = "DeleteRetentionPolicy" 1085 1086// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the 1087// client's request for the DeleteRetentionPolicy operation. The "output" return 1088// value will be populated with the request's response once the request completes 1089// successfully. 1090// 1091// Use "Send" method on the returned Request to send the API call to the service. 1092// the "output" return value is not valid until after Send returns without error. 1093// 1094// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy 1095// API call, and error handling. 1096// 1097// This method is useful when you want to inject custom logic or configuration 1098// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1099// 1100// 1101// // Example sending a request using the DeleteRetentionPolicyRequest method. 1102// req, resp := client.DeleteRetentionPolicyRequest(params) 1103// 1104// err := req.Send() 1105// if err == nil { // resp is now filled 1106// fmt.Println(resp) 1107// } 1108// 1109// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy 1110func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { 1111 op := &request.Operation{ 1112 Name: opDeleteRetentionPolicy, 1113 HTTPMethod: "POST", 1114 HTTPPath: "/", 1115 } 1116 1117 if input == nil { 1118 input = &DeleteRetentionPolicyInput{} 1119 } 1120 1121 output = &DeleteRetentionPolicyOutput{} 1122 req = c.newRequest(op, input, output) 1123 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1124 return 1125} 1126 1127// DeleteRetentionPolicy API operation for Amazon CloudWatch Logs. 1128// 1129// Deletes the specified retention policy. 1130// 1131// Log events do not expire if they belong to log groups without a retention 1132// policy. 1133// 1134// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1135// with awserr.Error's Code and Message methods to get detailed information about 1136// the error. 1137// 1138// See the AWS API reference guide for Amazon CloudWatch Logs's 1139// API operation DeleteRetentionPolicy for usage and error information. 1140// 1141// Returned Error Types: 1142// * InvalidParameterException 1143// A parameter is specified incorrectly. 1144// 1145// * ResourceNotFoundException 1146// The specified resource does not exist. 1147// 1148// * OperationAbortedException 1149// Multiple requests to update the same resource were in conflict. 1150// 1151// * ServiceUnavailableException 1152// The service cannot complete the request. 1153// 1154// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy 1155func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { 1156 req, out := c.DeleteRetentionPolicyRequest(input) 1157 return out, req.Send() 1158} 1159 1160// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of 1161// the ability to pass a context and additional request options. 1162// 1163// See DeleteRetentionPolicy for details on how to use this API operation. 1164// 1165// The context must be non-nil and will be used for request cancellation. If 1166// the context is nil a panic will occur. In the future the SDK may create 1167// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1168// for more information on using Contexts. 1169func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { 1170 req, out := c.DeleteRetentionPolicyRequest(input) 1171 req.SetContext(ctx) 1172 req.ApplyOptions(opts...) 1173 return out, req.Send() 1174} 1175 1176const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" 1177 1178// DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the 1179// client's request for the DeleteSubscriptionFilter operation. The "output" return 1180// value will be populated with the request's response once the request completes 1181// successfully. 1182// 1183// Use "Send" method on the returned Request to send the API call to the service. 1184// the "output" return value is not valid until after Send returns without error. 1185// 1186// See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter 1187// API call, and error handling. 1188// 1189// This method is useful when you want to inject custom logic or configuration 1190// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1191// 1192// 1193// // Example sending a request using the DeleteSubscriptionFilterRequest method. 1194// req, resp := client.DeleteSubscriptionFilterRequest(params) 1195// 1196// err := req.Send() 1197// if err == nil { // resp is now filled 1198// fmt.Println(resp) 1199// } 1200// 1201// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter 1202func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) { 1203 op := &request.Operation{ 1204 Name: opDeleteSubscriptionFilter, 1205 HTTPMethod: "POST", 1206 HTTPPath: "/", 1207 } 1208 1209 if input == nil { 1210 input = &DeleteSubscriptionFilterInput{} 1211 } 1212 1213 output = &DeleteSubscriptionFilterOutput{} 1214 req = c.newRequest(op, input, output) 1215 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1216 return 1217} 1218 1219// DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs. 1220// 1221// Deletes the specified subscription filter. 1222// 1223// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1224// with awserr.Error's Code and Message methods to get detailed information about 1225// the error. 1226// 1227// See the AWS API reference guide for Amazon CloudWatch Logs's 1228// API operation DeleteSubscriptionFilter for usage and error information. 1229// 1230// Returned Error Types: 1231// * InvalidParameterException 1232// A parameter is specified incorrectly. 1233// 1234// * ResourceNotFoundException 1235// The specified resource does not exist. 1236// 1237// * OperationAbortedException 1238// Multiple requests to update the same resource were in conflict. 1239// 1240// * ServiceUnavailableException 1241// The service cannot complete the request. 1242// 1243// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter 1244func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) { 1245 req, out := c.DeleteSubscriptionFilterRequest(input) 1246 return out, req.Send() 1247} 1248 1249// DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of 1250// the ability to pass a context and additional request options. 1251// 1252// See DeleteSubscriptionFilter for details on how to use this API operation. 1253// 1254// The context must be non-nil and will be used for request cancellation. If 1255// the context is nil a panic will occur. In the future the SDK may create 1256// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1257// for more information on using Contexts. 1258func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) { 1259 req, out := c.DeleteSubscriptionFilterRequest(input) 1260 req.SetContext(ctx) 1261 req.ApplyOptions(opts...) 1262 return out, req.Send() 1263} 1264 1265const opDescribeDestinations = "DescribeDestinations" 1266 1267// DescribeDestinationsRequest generates a "aws/request.Request" representing the 1268// client's request for the DescribeDestinations operation. The "output" return 1269// value will be populated with the request's response once the request completes 1270// successfully. 1271// 1272// Use "Send" method on the returned Request to send the API call to the service. 1273// the "output" return value is not valid until after Send returns without error. 1274// 1275// See DescribeDestinations for more information on using the DescribeDestinations 1276// API call, and error handling. 1277// 1278// This method is useful when you want to inject custom logic or configuration 1279// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1280// 1281// 1282// // Example sending a request using the DescribeDestinationsRequest method. 1283// req, resp := client.DescribeDestinationsRequest(params) 1284// 1285// err := req.Send() 1286// if err == nil { // resp is now filled 1287// fmt.Println(resp) 1288// } 1289// 1290// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations 1291func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) { 1292 op := &request.Operation{ 1293 Name: opDescribeDestinations, 1294 HTTPMethod: "POST", 1295 HTTPPath: "/", 1296 Paginator: &request.Paginator{ 1297 InputTokens: []string{"nextToken"}, 1298 OutputTokens: []string{"nextToken"}, 1299 LimitToken: "limit", 1300 TruncationToken: "", 1301 }, 1302 } 1303 1304 if input == nil { 1305 input = &DescribeDestinationsInput{} 1306 } 1307 1308 output = &DescribeDestinationsOutput{} 1309 req = c.newRequest(op, input, output) 1310 return 1311} 1312 1313// DescribeDestinations API operation for Amazon CloudWatch Logs. 1314// 1315// Lists all your destinations. The results are ASCII-sorted by destination 1316// name. 1317// 1318// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1319// with awserr.Error's Code and Message methods to get detailed information about 1320// the error. 1321// 1322// See the AWS API reference guide for Amazon CloudWatch Logs's 1323// API operation DescribeDestinations for usage and error information. 1324// 1325// Returned Error Types: 1326// * InvalidParameterException 1327// A parameter is specified incorrectly. 1328// 1329// * ServiceUnavailableException 1330// The service cannot complete the request. 1331// 1332// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations 1333func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) { 1334 req, out := c.DescribeDestinationsRequest(input) 1335 return out, req.Send() 1336} 1337 1338// DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of 1339// the ability to pass a context and additional request options. 1340// 1341// See DescribeDestinations for details on how to use this API operation. 1342// 1343// The context must be non-nil and will be used for request cancellation. If 1344// the context is nil a panic will occur. In the future the SDK may create 1345// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1346// for more information on using Contexts. 1347func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) { 1348 req, out := c.DescribeDestinationsRequest(input) 1349 req.SetContext(ctx) 1350 req.ApplyOptions(opts...) 1351 return out, req.Send() 1352} 1353 1354// DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation, 1355// calling the "fn" function with the response data for each page. To stop 1356// iterating, return false from the fn function. 1357// 1358// See DescribeDestinations method for more information on how to use this operation. 1359// 1360// Note: This operation can generate multiple requests to a service. 1361// 1362// // Example iterating over at most 3 pages of a DescribeDestinations operation. 1363// pageNum := 0 1364// err := client.DescribeDestinationsPages(params, 1365// func(page *cloudwatchlogs.DescribeDestinationsOutput, lastPage bool) bool { 1366// pageNum++ 1367// fmt.Println(page) 1368// return pageNum <= 3 1369// }) 1370// 1371func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error { 1372 return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) 1373} 1374 1375// DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except 1376// it takes a Context and allows setting request options on the pages. 1377// 1378// The context must be non-nil and will be used for request cancellation. If 1379// the context is nil a panic will occur. In the future the SDK may create 1380// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1381// for more information on using Contexts. 1382func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { 1383 p := request.Pagination{ 1384 EndPageOnSameToken: true, 1385 NewRequest: func() (*request.Request, error) { 1386 var inCpy *DescribeDestinationsInput 1387 if input != nil { 1388 tmp := *input 1389 inCpy = &tmp 1390 } 1391 req, _ := c.DescribeDestinationsRequest(inCpy) 1392 req.SetContext(ctx) 1393 req.ApplyOptions(opts...) 1394 return req, nil 1395 }, 1396 } 1397 1398 for p.Next() { 1399 if !fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) { 1400 break 1401 } 1402 } 1403 1404 return p.Err() 1405} 1406 1407const opDescribeExportTasks = "DescribeExportTasks" 1408 1409// DescribeExportTasksRequest generates a "aws/request.Request" representing the 1410// client's request for the DescribeExportTasks operation. The "output" return 1411// value will be populated with the request's response once the request completes 1412// successfully. 1413// 1414// Use "Send" method on the returned Request to send the API call to the service. 1415// the "output" return value is not valid until after Send returns without error. 1416// 1417// See DescribeExportTasks for more information on using the DescribeExportTasks 1418// API call, and error handling. 1419// 1420// This method is useful when you want to inject custom logic or configuration 1421// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1422// 1423// 1424// // Example sending a request using the DescribeExportTasksRequest method. 1425// req, resp := client.DescribeExportTasksRequest(params) 1426// 1427// err := req.Send() 1428// if err == nil { // resp is now filled 1429// fmt.Println(resp) 1430// } 1431// 1432// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks 1433func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { 1434 op := &request.Operation{ 1435 Name: opDescribeExportTasks, 1436 HTTPMethod: "POST", 1437 HTTPPath: "/", 1438 } 1439 1440 if input == nil { 1441 input = &DescribeExportTasksInput{} 1442 } 1443 1444 output = &DescribeExportTasksOutput{} 1445 req = c.newRequest(op, input, output) 1446 return 1447} 1448 1449// DescribeExportTasks API operation for Amazon CloudWatch Logs. 1450// 1451// Lists the specified export tasks. You can list all your export tasks or filter 1452// the results based on task ID or task status. 1453// 1454// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1455// with awserr.Error's Code and Message methods to get detailed information about 1456// the error. 1457// 1458// See the AWS API reference guide for Amazon CloudWatch Logs's 1459// API operation DescribeExportTasks for usage and error information. 1460// 1461// Returned Error Types: 1462// * InvalidParameterException 1463// A parameter is specified incorrectly. 1464// 1465// * ServiceUnavailableException 1466// The service cannot complete the request. 1467// 1468// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks 1469func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { 1470 req, out := c.DescribeExportTasksRequest(input) 1471 return out, req.Send() 1472} 1473 1474// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of 1475// the ability to pass a context and additional request options. 1476// 1477// See DescribeExportTasks for details on how to use this API operation. 1478// 1479// The context must be non-nil and will be used for request cancellation. If 1480// the context is nil a panic will occur. In the future the SDK may create 1481// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1482// for more information on using Contexts. 1483func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { 1484 req, out := c.DescribeExportTasksRequest(input) 1485 req.SetContext(ctx) 1486 req.ApplyOptions(opts...) 1487 return out, req.Send() 1488} 1489 1490const opDescribeLogGroups = "DescribeLogGroups" 1491 1492// DescribeLogGroupsRequest generates a "aws/request.Request" representing the 1493// client's request for the DescribeLogGroups operation. The "output" return 1494// value will be populated with the request's response once the request completes 1495// successfully. 1496// 1497// Use "Send" method on the returned Request to send the API call to the service. 1498// the "output" return value is not valid until after Send returns without error. 1499// 1500// See DescribeLogGroups for more information on using the DescribeLogGroups 1501// API call, and error handling. 1502// 1503// This method is useful when you want to inject custom logic or configuration 1504// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1505// 1506// 1507// // Example sending a request using the DescribeLogGroupsRequest method. 1508// req, resp := client.DescribeLogGroupsRequest(params) 1509// 1510// err := req.Send() 1511// if err == nil { // resp is now filled 1512// fmt.Println(resp) 1513// } 1514// 1515// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups 1516func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) { 1517 op := &request.Operation{ 1518 Name: opDescribeLogGroups, 1519 HTTPMethod: "POST", 1520 HTTPPath: "/", 1521 Paginator: &request.Paginator{ 1522 InputTokens: []string{"nextToken"}, 1523 OutputTokens: []string{"nextToken"}, 1524 LimitToken: "limit", 1525 TruncationToken: "", 1526 }, 1527 } 1528 1529 if input == nil { 1530 input = &DescribeLogGroupsInput{} 1531 } 1532 1533 output = &DescribeLogGroupsOutput{} 1534 req = c.newRequest(op, input, output) 1535 return 1536} 1537 1538// DescribeLogGroups API operation for Amazon CloudWatch Logs. 1539// 1540// Lists the specified log groups. You can list all your log groups or filter 1541// the results by prefix. The results are ASCII-sorted by log group name. 1542// 1543// CloudWatch Logs doesn’t support IAM policies that control access to the 1544// DescribeLogGroups action by using the aws:ResourceTag/key-name condition 1545// key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name 1546// condition key to control access. For more information about using tags to 1547// control access, see Controlling access to Amazon Web Services resources using 1548// tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). 1549// 1550// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1551// with awserr.Error's Code and Message methods to get detailed information about 1552// the error. 1553// 1554// See the AWS API reference guide for Amazon CloudWatch Logs's 1555// API operation DescribeLogGroups for usage and error information. 1556// 1557// Returned Error Types: 1558// * InvalidParameterException 1559// A parameter is specified incorrectly. 1560// 1561// * ServiceUnavailableException 1562// The service cannot complete the request. 1563// 1564// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups 1565func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) { 1566 req, out := c.DescribeLogGroupsRequest(input) 1567 return out, req.Send() 1568} 1569 1570// DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of 1571// the ability to pass a context and additional request options. 1572// 1573// See DescribeLogGroups for details on how to use this API operation. 1574// 1575// The context must be non-nil and will be used for request cancellation. If 1576// the context is nil a panic will occur. In the future the SDK may create 1577// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1578// for more information on using Contexts. 1579func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) { 1580 req, out := c.DescribeLogGroupsRequest(input) 1581 req.SetContext(ctx) 1582 req.ApplyOptions(opts...) 1583 return out, req.Send() 1584} 1585 1586// DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation, 1587// calling the "fn" function with the response data for each page. To stop 1588// iterating, return false from the fn function. 1589// 1590// See DescribeLogGroups method for more information on how to use this operation. 1591// 1592// Note: This operation can generate multiple requests to a service. 1593// 1594// // Example iterating over at most 3 pages of a DescribeLogGroups operation. 1595// pageNum := 0 1596// err := client.DescribeLogGroupsPages(params, 1597// func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { 1598// pageNum++ 1599// fmt.Println(page) 1600// return pageNum <= 3 1601// }) 1602// 1603func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error { 1604 return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn) 1605} 1606 1607// DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except 1608// it takes a Context and allows setting request options on the pages. 1609// 1610// The context must be non-nil and will be used for request cancellation. If 1611// the context is nil a panic will occur. In the future the SDK may create 1612// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1613// for more information on using Contexts. 1614func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { 1615 p := request.Pagination{ 1616 EndPageOnSameToken: true, 1617 NewRequest: func() (*request.Request, error) { 1618 var inCpy *DescribeLogGroupsInput 1619 if input != nil { 1620 tmp := *input 1621 inCpy = &tmp 1622 } 1623 req, _ := c.DescribeLogGroupsRequest(inCpy) 1624 req.SetContext(ctx) 1625 req.ApplyOptions(opts...) 1626 return req, nil 1627 }, 1628 } 1629 1630 for p.Next() { 1631 if !fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) { 1632 break 1633 } 1634 } 1635 1636 return p.Err() 1637} 1638 1639const opDescribeLogStreams = "DescribeLogStreams" 1640 1641// DescribeLogStreamsRequest generates a "aws/request.Request" representing the 1642// client's request for the DescribeLogStreams operation. The "output" return 1643// value will be populated with the request's response once the request completes 1644// successfully. 1645// 1646// Use "Send" method on the returned Request to send the API call to the service. 1647// the "output" return value is not valid until after Send returns without error. 1648// 1649// See DescribeLogStreams for more information on using the DescribeLogStreams 1650// API call, and error handling. 1651// 1652// This method is useful when you want to inject custom logic or configuration 1653// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1654// 1655// 1656// // Example sending a request using the DescribeLogStreamsRequest method. 1657// req, resp := client.DescribeLogStreamsRequest(params) 1658// 1659// err := req.Send() 1660// if err == nil { // resp is now filled 1661// fmt.Println(resp) 1662// } 1663// 1664// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams 1665func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) { 1666 op := &request.Operation{ 1667 Name: opDescribeLogStreams, 1668 HTTPMethod: "POST", 1669 HTTPPath: "/", 1670 Paginator: &request.Paginator{ 1671 InputTokens: []string{"nextToken"}, 1672 OutputTokens: []string{"nextToken"}, 1673 LimitToken: "limit", 1674 TruncationToken: "", 1675 }, 1676 } 1677 1678 if input == nil { 1679 input = &DescribeLogStreamsInput{} 1680 } 1681 1682 output = &DescribeLogStreamsOutput{} 1683 req = c.newRequest(op, input, output) 1684 return 1685} 1686 1687// DescribeLogStreams API operation for Amazon CloudWatch Logs. 1688// 1689// Lists the log streams for the specified log group. You can list all the log 1690// streams or filter the results by prefix. You can also control how the results 1691// are ordered. 1692// 1693// This operation has a limit of five transactions per second, after which transactions 1694// are throttled. 1695// 1696// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1697// with awserr.Error's Code and Message methods to get detailed information about 1698// the error. 1699// 1700// See the AWS API reference guide for Amazon CloudWatch Logs's 1701// API operation DescribeLogStreams for usage and error information. 1702// 1703// Returned Error Types: 1704// * InvalidParameterException 1705// A parameter is specified incorrectly. 1706// 1707// * ResourceNotFoundException 1708// The specified resource does not exist. 1709// 1710// * ServiceUnavailableException 1711// The service cannot complete the request. 1712// 1713// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams 1714func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) { 1715 req, out := c.DescribeLogStreamsRequest(input) 1716 return out, req.Send() 1717} 1718 1719// DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of 1720// the ability to pass a context and additional request options. 1721// 1722// See DescribeLogStreams for details on how to use this API operation. 1723// 1724// The context must be non-nil and will be used for request cancellation. If 1725// the context is nil a panic will occur. In the future the SDK may create 1726// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1727// for more information on using Contexts. 1728func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) { 1729 req, out := c.DescribeLogStreamsRequest(input) 1730 req.SetContext(ctx) 1731 req.ApplyOptions(opts...) 1732 return out, req.Send() 1733} 1734 1735// DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation, 1736// calling the "fn" function with the response data for each page. To stop 1737// iterating, return false from the fn function. 1738// 1739// See DescribeLogStreams method for more information on how to use this operation. 1740// 1741// Note: This operation can generate multiple requests to a service. 1742// 1743// // Example iterating over at most 3 pages of a DescribeLogStreams operation. 1744// pageNum := 0 1745// err := client.DescribeLogStreamsPages(params, 1746// func(page *cloudwatchlogs.DescribeLogStreamsOutput, lastPage bool) bool { 1747// pageNum++ 1748// fmt.Println(page) 1749// return pageNum <= 3 1750// }) 1751// 1752func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error { 1753 return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn) 1754} 1755 1756// DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except 1757// it takes a Context and allows setting request options on the pages. 1758// 1759// The context must be non-nil and will be used for request cancellation. If 1760// the context is nil a panic will occur. In the future the SDK may create 1761// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1762// for more information on using Contexts. 1763func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { 1764 p := request.Pagination{ 1765 EndPageOnSameToken: true, 1766 NewRequest: func() (*request.Request, error) { 1767 var inCpy *DescribeLogStreamsInput 1768 if input != nil { 1769 tmp := *input 1770 inCpy = &tmp 1771 } 1772 req, _ := c.DescribeLogStreamsRequest(inCpy) 1773 req.SetContext(ctx) 1774 req.ApplyOptions(opts...) 1775 return req, nil 1776 }, 1777 } 1778 1779 for p.Next() { 1780 if !fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) { 1781 break 1782 } 1783 } 1784 1785 return p.Err() 1786} 1787 1788const opDescribeMetricFilters = "DescribeMetricFilters" 1789 1790// DescribeMetricFiltersRequest generates a "aws/request.Request" representing the 1791// client's request for the DescribeMetricFilters operation. The "output" return 1792// value will be populated with the request's response once the request completes 1793// successfully. 1794// 1795// Use "Send" method on the returned Request to send the API call to the service. 1796// the "output" return value is not valid until after Send returns without error. 1797// 1798// See DescribeMetricFilters for more information on using the DescribeMetricFilters 1799// API call, and error handling. 1800// 1801// This method is useful when you want to inject custom logic or configuration 1802// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1803// 1804// 1805// // Example sending a request using the DescribeMetricFiltersRequest method. 1806// req, resp := client.DescribeMetricFiltersRequest(params) 1807// 1808// err := req.Send() 1809// if err == nil { // resp is now filled 1810// fmt.Println(resp) 1811// } 1812// 1813// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters 1814func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) { 1815 op := &request.Operation{ 1816 Name: opDescribeMetricFilters, 1817 HTTPMethod: "POST", 1818 HTTPPath: "/", 1819 Paginator: &request.Paginator{ 1820 InputTokens: []string{"nextToken"}, 1821 OutputTokens: []string{"nextToken"}, 1822 LimitToken: "limit", 1823 TruncationToken: "", 1824 }, 1825 } 1826 1827 if input == nil { 1828 input = &DescribeMetricFiltersInput{} 1829 } 1830 1831 output = &DescribeMetricFiltersOutput{} 1832 req = c.newRequest(op, input, output) 1833 return 1834} 1835 1836// DescribeMetricFilters API operation for Amazon CloudWatch Logs. 1837// 1838// Lists the specified metric filters. You can list all of the metric filters 1839// or filter the results by log name, prefix, metric name, or metric namespace. 1840// The results are ASCII-sorted by filter name. 1841// 1842// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1843// with awserr.Error's Code and Message methods to get detailed information about 1844// the error. 1845// 1846// See the AWS API reference guide for Amazon CloudWatch Logs's 1847// API operation DescribeMetricFilters for usage and error information. 1848// 1849// Returned Error Types: 1850// * InvalidParameterException 1851// A parameter is specified incorrectly. 1852// 1853// * ResourceNotFoundException 1854// The specified resource does not exist. 1855// 1856// * ServiceUnavailableException 1857// The service cannot complete the request. 1858// 1859// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters 1860func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) { 1861 req, out := c.DescribeMetricFiltersRequest(input) 1862 return out, req.Send() 1863} 1864 1865// DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of 1866// the ability to pass a context and additional request options. 1867// 1868// See DescribeMetricFilters for details on how to use this API operation. 1869// 1870// The context must be non-nil and will be used for request cancellation. If 1871// the context is nil a panic will occur. In the future the SDK may create 1872// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1873// for more information on using Contexts. 1874func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) { 1875 req, out := c.DescribeMetricFiltersRequest(input) 1876 req.SetContext(ctx) 1877 req.ApplyOptions(opts...) 1878 return out, req.Send() 1879} 1880 1881// DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation, 1882// calling the "fn" function with the response data for each page. To stop 1883// iterating, return false from the fn function. 1884// 1885// See DescribeMetricFilters method for more information on how to use this operation. 1886// 1887// Note: This operation can generate multiple requests to a service. 1888// 1889// // Example iterating over at most 3 pages of a DescribeMetricFilters operation. 1890// pageNum := 0 1891// err := client.DescribeMetricFiltersPages(params, 1892// func(page *cloudwatchlogs.DescribeMetricFiltersOutput, lastPage bool) bool { 1893// pageNum++ 1894// fmt.Println(page) 1895// return pageNum <= 3 1896// }) 1897// 1898func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error { 1899 return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn) 1900} 1901 1902// DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except 1903// it takes a Context and allows setting request options on the pages. 1904// 1905// The context must be non-nil and will be used for request cancellation. If 1906// the context is nil a panic will occur. In the future the SDK may create 1907// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1908// for more information on using Contexts. 1909func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { 1910 p := request.Pagination{ 1911 EndPageOnSameToken: true, 1912 NewRequest: func() (*request.Request, error) { 1913 var inCpy *DescribeMetricFiltersInput 1914 if input != nil { 1915 tmp := *input 1916 inCpy = &tmp 1917 } 1918 req, _ := c.DescribeMetricFiltersRequest(inCpy) 1919 req.SetContext(ctx) 1920 req.ApplyOptions(opts...) 1921 return req, nil 1922 }, 1923 } 1924 1925 for p.Next() { 1926 if !fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) { 1927 break 1928 } 1929 } 1930 1931 return p.Err() 1932} 1933 1934const opDescribeQueries = "DescribeQueries" 1935 1936// DescribeQueriesRequest generates a "aws/request.Request" representing the 1937// client's request for the DescribeQueries operation. The "output" return 1938// value will be populated with the request's response once the request completes 1939// successfully. 1940// 1941// Use "Send" method on the returned Request to send the API call to the service. 1942// the "output" return value is not valid until after Send returns without error. 1943// 1944// See DescribeQueries for more information on using the DescribeQueries 1945// API call, and error handling. 1946// 1947// This method is useful when you want to inject custom logic or configuration 1948// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1949// 1950// 1951// // Example sending a request using the DescribeQueriesRequest method. 1952// req, resp := client.DescribeQueriesRequest(params) 1953// 1954// err := req.Send() 1955// if err == nil { // resp is now filled 1956// fmt.Println(resp) 1957// } 1958// 1959// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries 1960func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { 1961 op := &request.Operation{ 1962 Name: opDescribeQueries, 1963 HTTPMethod: "POST", 1964 HTTPPath: "/", 1965 } 1966 1967 if input == nil { 1968 input = &DescribeQueriesInput{} 1969 } 1970 1971 output = &DescribeQueriesOutput{} 1972 req = c.newRequest(op, input, output) 1973 return 1974} 1975 1976// DescribeQueries API operation for Amazon CloudWatch Logs. 1977// 1978// Returns a list of CloudWatch Logs Insights queries that are scheduled, executing, 1979// or have been executed recently in this account. You can request all queries 1980// or limit it to queries of a specific log group or queries with a certain 1981// status. 1982// 1983// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1984// with awserr.Error's Code and Message methods to get detailed information about 1985// the error. 1986// 1987// See the AWS API reference guide for Amazon CloudWatch Logs's 1988// API operation DescribeQueries for usage and error information. 1989// 1990// Returned Error Types: 1991// * InvalidParameterException 1992// A parameter is specified incorrectly. 1993// 1994// * ResourceNotFoundException 1995// The specified resource does not exist. 1996// 1997// * ServiceUnavailableException 1998// The service cannot complete the request. 1999// 2000// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries 2001func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { 2002 req, out := c.DescribeQueriesRequest(input) 2003 return out, req.Send() 2004} 2005 2006// DescribeQueriesWithContext is the same as DescribeQueries with the addition of 2007// the ability to pass a context and additional request options. 2008// 2009// See DescribeQueries for details on how to use this API operation. 2010// 2011// The context must be non-nil and will be used for request cancellation. If 2012// the context is nil a panic will occur. In the future the SDK may create 2013// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2014// for more information on using Contexts. 2015func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { 2016 req, out := c.DescribeQueriesRequest(input) 2017 req.SetContext(ctx) 2018 req.ApplyOptions(opts...) 2019 return out, req.Send() 2020} 2021 2022const opDescribeQueryDefinitions = "DescribeQueryDefinitions" 2023 2024// DescribeQueryDefinitionsRequest generates a "aws/request.Request" representing the 2025// client's request for the DescribeQueryDefinitions operation. The "output" return 2026// value will be populated with the request's response once the request completes 2027// successfully. 2028// 2029// Use "Send" method on the returned Request to send the API call to the service. 2030// the "output" return value is not valid until after Send returns without error. 2031// 2032// See DescribeQueryDefinitions for more information on using the DescribeQueryDefinitions 2033// API call, and error handling. 2034// 2035// This method is useful when you want to inject custom logic or configuration 2036// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2037// 2038// 2039// // Example sending a request using the DescribeQueryDefinitionsRequest method. 2040// req, resp := client.DescribeQueryDefinitionsRequest(params) 2041// 2042// err := req.Send() 2043// if err == nil { // resp is now filled 2044// fmt.Println(resp) 2045// } 2046// 2047// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions 2048func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDefinitionsInput) (req *request.Request, output *DescribeQueryDefinitionsOutput) { 2049 op := &request.Operation{ 2050 Name: opDescribeQueryDefinitions, 2051 HTTPMethod: "POST", 2052 HTTPPath: "/", 2053 } 2054 2055 if input == nil { 2056 input = &DescribeQueryDefinitionsInput{} 2057 } 2058 2059 output = &DescribeQueryDefinitionsOutput{} 2060 req = c.newRequest(op, input, output) 2061 return 2062} 2063 2064// DescribeQueryDefinitions API operation for Amazon CloudWatch Logs. 2065// 2066// This operation returns a paginated list of your saved CloudWatch Logs Insights 2067// query definitions. 2068// 2069// You can use the queryDefinitionNamePrefix parameter to limit the results 2070// to only the query definitions that have names that start with a certain string. 2071// 2072// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2073// with awserr.Error's Code and Message methods to get detailed information about 2074// the error. 2075// 2076// See the AWS API reference guide for Amazon CloudWatch Logs's 2077// API operation DescribeQueryDefinitions for usage and error information. 2078// 2079// Returned Error Types: 2080// * InvalidParameterException 2081// A parameter is specified incorrectly. 2082// 2083// * ServiceUnavailableException 2084// The service cannot complete the request. 2085// 2086// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions 2087func (c *CloudWatchLogs) DescribeQueryDefinitions(input *DescribeQueryDefinitionsInput) (*DescribeQueryDefinitionsOutput, error) { 2088 req, out := c.DescribeQueryDefinitionsRequest(input) 2089 return out, req.Send() 2090} 2091 2092// DescribeQueryDefinitionsWithContext is the same as DescribeQueryDefinitions with the addition of 2093// the ability to pass a context and additional request options. 2094// 2095// See DescribeQueryDefinitions for details on how to use this API operation. 2096// 2097// The context must be non-nil and will be used for request cancellation. If 2098// the context is nil a panic will occur. In the future the SDK may create 2099// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2100// for more information on using Contexts. 2101func (c *CloudWatchLogs) DescribeQueryDefinitionsWithContext(ctx aws.Context, input *DescribeQueryDefinitionsInput, opts ...request.Option) (*DescribeQueryDefinitionsOutput, error) { 2102 req, out := c.DescribeQueryDefinitionsRequest(input) 2103 req.SetContext(ctx) 2104 req.ApplyOptions(opts...) 2105 return out, req.Send() 2106} 2107 2108const opDescribeResourcePolicies = "DescribeResourcePolicies" 2109 2110// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the 2111// client's request for the DescribeResourcePolicies operation. The "output" return 2112// value will be populated with the request's response once the request completes 2113// successfully. 2114// 2115// Use "Send" method on the returned Request to send the API call to the service. 2116// the "output" return value is not valid until after Send returns without error. 2117// 2118// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies 2119// API call, and error handling. 2120// 2121// This method is useful when you want to inject custom logic or configuration 2122// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2123// 2124// 2125// // Example sending a request using the DescribeResourcePoliciesRequest method. 2126// req, resp := client.DescribeResourcePoliciesRequest(params) 2127// 2128// err := req.Send() 2129// if err == nil { // resp is now filled 2130// fmt.Println(resp) 2131// } 2132// 2133// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies 2134func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { 2135 op := &request.Operation{ 2136 Name: opDescribeResourcePolicies, 2137 HTTPMethod: "POST", 2138 HTTPPath: "/", 2139 } 2140 2141 if input == nil { 2142 input = &DescribeResourcePoliciesInput{} 2143 } 2144 2145 output = &DescribeResourcePoliciesOutput{} 2146 req = c.newRequest(op, input, output) 2147 return 2148} 2149 2150// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. 2151// 2152// Lists the resource policies in this account. 2153// 2154// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2155// with awserr.Error's Code and Message methods to get detailed information about 2156// the error. 2157// 2158// See the AWS API reference guide for Amazon CloudWatch Logs's 2159// API operation DescribeResourcePolicies for usage and error information. 2160// 2161// Returned Error Types: 2162// * InvalidParameterException 2163// A parameter is specified incorrectly. 2164// 2165// * ServiceUnavailableException 2166// The service cannot complete the request. 2167// 2168// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies 2169func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { 2170 req, out := c.DescribeResourcePoliciesRequest(input) 2171 return out, req.Send() 2172} 2173 2174// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of 2175// the ability to pass a context and additional request options. 2176// 2177// See DescribeResourcePolicies for details on how to use this API operation. 2178// 2179// The context must be non-nil and will be used for request cancellation. If 2180// the context is nil a panic will occur. In the future the SDK may create 2181// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2182// for more information on using Contexts. 2183func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { 2184 req, out := c.DescribeResourcePoliciesRequest(input) 2185 req.SetContext(ctx) 2186 req.ApplyOptions(opts...) 2187 return out, req.Send() 2188} 2189 2190const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" 2191 2192// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the 2193// client's request for the DescribeSubscriptionFilters operation. The "output" return 2194// value will be populated with the request's response once the request completes 2195// successfully. 2196// 2197// Use "Send" method on the returned Request to send the API call to the service. 2198// the "output" return value is not valid until after Send returns without error. 2199// 2200// See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters 2201// API call, and error handling. 2202// 2203// This method is useful when you want to inject custom logic or configuration 2204// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2205// 2206// 2207// // Example sending a request using the DescribeSubscriptionFiltersRequest method. 2208// req, resp := client.DescribeSubscriptionFiltersRequest(params) 2209// 2210// err := req.Send() 2211// if err == nil { // resp is now filled 2212// fmt.Println(resp) 2213// } 2214// 2215// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters 2216func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) { 2217 op := &request.Operation{ 2218 Name: opDescribeSubscriptionFilters, 2219 HTTPMethod: "POST", 2220 HTTPPath: "/", 2221 Paginator: &request.Paginator{ 2222 InputTokens: []string{"nextToken"}, 2223 OutputTokens: []string{"nextToken"}, 2224 LimitToken: "limit", 2225 TruncationToken: "", 2226 }, 2227 } 2228 2229 if input == nil { 2230 input = &DescribeSubscriptionFiltersInput{} 2231 } 2232 2233 output = &DescribeSubscriptionFiltersOutput{} 2234 req = c.newRequest(op, input, output) 2235 return 2236} 2237 2238// DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs. 2239// 2240// Lists the subscription filters for the specified log group. You can list 2241// all the subscription filters or filter the results by prefix. The results 2242// are ASCII-sorted by filter name. 2243// 2244// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2245// with awserr.Error's Code and Message methods to get detailed information about 2246// the error. 2247// 2248// See the AWS API reference guide for Amazon CloudWatch Logs's 2249// API operation DescribeSubscriptionFilters for usage and error information. 2250// 2251// Returned Error Types: 2252// * InvalidParameterException 2253// A parameter is specified incorrectly. 2254// 2255// * ResourceNotFoundException 2256// The specified resource does not exist. 2257// 2258// * ServiceUnavailableException 2259// The service cannot complete the request. 2260// 2261// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters 2262func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) { 2263 req, out := c.DescribeSubscriptionFiltersRequest(input) 2264 return out, req.Send() 2265} 2266 2267// DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of 2268// the ability to pass a context and additional request options. 2269// 2270// See DescribeSubscriptionFilters for details on how to use this API operation. 2271// 2272// The context must be non-nil and will be used for request cancellation. If 2273// the context is nil a panic will occur. In the future the SDK may create 2274// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2275// for more information on using Contexts. 2276func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) { 2277 req, out := c.DescribeSubscriptionFiltersRequest(input) 2278 req.SetContext(ctx) 2279 req.ApplyOptions(opts...) 2280 return out, req.Send() 2281} 2282 2283// DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation, 2284// calling the "fn" function with the response data for each page. To stop 2285// iterating, return false from the fn function. 2286// 2287// See DescribeSubscriptionFilters method for more information on how to use this operation. 2288// 2289// Note: This operation can generate multiple requests to a service. 2290// 2291// // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation. 2292// pageNum := 0 2293// err := client.DescribeSubscriptionFiltersPages(params, 2294// func(page *cloudwatchlogs.DescribeSubscriptionFiltersOutput, lastPage bool) bool { 2295// pageNum++ 2296// fmt.Println(page) 2297// return pageNum <= 3 2298// }) 2299// 2300func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error { 2301 return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn) 2302} 2303 2304// DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except 2305// it takes a Context and allows setting request options on the pages. 2306// 2307// The context must be non-nil and will be used for request cancellation. If 2308// the context is nil a panic will occur. In the future the SDK may create 2309// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2310// for more information on using Contexts. 2311func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { 2312 p := request.Pagination{ 2313 EndPageOnSameToken: true, 2314 NewRequest: func() (*request.Request, error) { 2315 var inCpy *DescribeSubscriptionFiltersInput 2316 if input != nil { 2317 tmp := *input 2318 inCpy = &tmp 2319 } 2320 req, _ := c.DescribeSubscriptionFiltersRequest(inCpy) 2321 req.SetContext(ctx) 2322 req.ApplyOptions(opts...) 2323 return req, nil 2324 }, 2325 } 2326 2327 for p.Next() { 2328 if !fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) { 2329 break 2330 } 2331 } 2332 2333 return p.Err() 2334} 2335 2336const opDisassociateKmsKey = "DisassociateKmsKey" 2337 2338// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the 2339// client's request for the DisassociateKmsKey operation. The "output" return 2340// value will be populated with the request's response once the request completes 2341// successfully. 2342// 2343// Use "Send" method on the returned Request to send the API call to the service. 2344// the "output" return value is not valid until after Send returns without error. 2345// 2346// See DisassociateKmsKey for more information on using the DisassociateKmsKey 2347// API call, and error handling. 2348// 2349// This method is useful when you want to inject custom logic or configuration 2350// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2351// 2352// 2353// // Example sending a request using the DisassociateKmsKeyRequest method. 2354// req, resp := client.DisassociateKmsKeyRequest(params) 2355// 2356// err := req.Send() 2357// if err == nil { // resp is now filled 2358// fmt.Println(resp) 2359// } 2360// 2361// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey 2362func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { 2363 op := &request.Operation{ 2364 Name: opDisassociateKmsKey, 2365 HTTPMethod: "POST", 2366 HTTPPath: "/", 2367 } 2368 2369 if input == nil { 2370 input = &DisassociateKmsKeyInput{} 2371 } 2372 2373 output = &DisassociateKmsKeyOutput{} 2374 req = c.newRequest(op, input, output) 2375 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2376 return 2377} 2378 2379// DisassociateKmsKey API operation for Amazon CloudWatch Logs. 2380// 2381// Disassociates the associated Key Management Service customer master key (CMK) 2382// from the specified log group. 2383// 2384// After the KMS CMK is disassociated from the log group, CloudWatch Logs stops 2385// encrypting newly ingested data for the log group. All previously ingested 2386// data remains encrypted, and CloudWatch Logs requires permissions for the 2387// CMK whenever the encrypted data is requested. 2388// 2389// Note that it can take up to 5 minutes for this operation to take effect. 2390// 2391// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2392// with awserr.Error's Code and Message methods to get detailed information about 2393// the error. 2394// 2395// See the AWS API reference guide for Amazon CloudWatch Logs's 2396// API operation DisassociateKmsKey for usage and error information. 2397// 2398// Returned Error Types: 2399// * InvalidParameterException 2400// A parameter is specified incorrectly. 2401// 2402// * ResourceNotFoundException 2403// The specified resource does not exist. 2404// 2405// * OperationAbortedException 2406// Multiple requests to update the same resource were in conflict. 2407// 2408// * ServiceUnavailableException 2409// The service cannot complete the request. 2410// 2411// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey 2412func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { 2413 req, out := c.DisassociateKmsKeyRequest(input) 2414 return out, req.Send() 2415} 2416 2417// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of 2418// the ability to pass a context and additional request options. 2419// 2420// See DisassociateKmsKey for details on how to use this API operation. 2421// 2422// The context must be non-nil and will be used for request cancellation. If 2423// the context is nil a panic will occur. In the future the SDK may create 2424// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2425// for more information on using Contexts. 2426func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { 2427 req, out := c.DisassociateKmsKeyRequest(input) 2428 req.SetContext(ctx) 2429 req.ApplyOptions(opts...) 2430 return out, req.Send() 2431} 2432 2433const opFilterLogEvents = "FilterLogEvents" 2434 2435// FilterLogEventsRequest generates a "aws/request.Request" representing the 2436// client's request for the FilterLogEvents operation. The "output" return 2437// value will be populated with the request's response once the request completes 2438// successfully. 2439// 2440// Use "Send" method on the returned Request to send the API call to the service. 2441// the "output" return value is not valid until after Send returns without error. 2442// 2443// See FilterLogEvents for more information on using the FilterLogEvents 2444// API call, and error handling. 2445// 2446// This method is useful when you want to inject custom logic or configuration 2447// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2448// 2449// 2450// // Example sending a request using the FilterLogEventsRequest method. 2451// req, resp := client.FilterLogEventsRequest(params) 2452// 2453// err := req.Send() 2454// if err == nil { // resp is now filled 2455// fmt.Println(resp) 2456// } 2457// 2458// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents 2459func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) { 2460 op := &request.Operation{ 2461 Name: opFilterLogEvents, 2462 HTTPMethod: "POST", 2463 HTTPPath: "/", 2464 Paginator: &request.Paginator{ 2465 InputTokens: []string{"nextToken"}, 2466 OutputTokens: []string{"nextToken"}, 2467 LimitToken: "limit", 2468 TruncationToken: "", 2469 }, 2470 } 2471 2472 if input == nil { 2473 input = &FilterLogEventsInput{} 2474 } 2475 2476 output = &FilterLogEventsOutput{} 2477 req = c.newRequest(op, input, output) 2478 return 2479} 2480 2481// FilterLogEvents API operation for Amazon CloudWatch Logs. 2482// 2483// Lists log events from the specified log group. You can list all the log events 2484// or filter the results using a filter pattern, a time range, and the name 2485// of the log stream. 2486// 2487// By default, this operation returns as many log events as can fit in 1 MB 2488// (up to 10,000 log events) or all the events found within the time range that 2489// you specify. If the results include a token, then there are more log events 2490// available, and you can get additional results by specifying the token in 2491// a subsequent call. This operation can return empty results while there are 2492// more log events available through the token. 2493// 2494// The returned log events are sorted by event timestamp, the timestamp when 2495// the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents 2496// request. 2497// 2498// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2499// with awserr.Error's Code and Message methods to get detailed information about 2500// the error. 2501// 2502// See the AWS API reference guide for Amazon CloudWatch Logs's 2503// API operation FilterLogEvents for usage and error information. 2504// 2505// Returned Error Types: 2506// * InvalidParameterException 2507// A parameter is specified incorrectly. 2508// 2509// * ResourceNotFoundException 2510// The specified resource does not exist. 2511// 2512// * ServiceUnavailableException 2513// The service cannot complete the request. 2514// 2515// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents 2516func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) { 2517 req, out := c.FilterLogEventsRequest(input) 2518 return out, req.Send() 2519} 2520 2521// FilterLogEventsWithContext is the same as FilterLogEvents with the addition of 2522// the ability to pass a context and additional request options. 2523// 2524// See FilterLogEvents for details on how to use this API operation. 2525// 2526// The context must be non-nil and will be used for request cancellation. If 2527// the context is nil a panic will occur. In the future the SDK may create 2528// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2529// for more information on using Contexts. 2530func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) { 2531 req, out := c.FilterLogEventsRequest(input) 2532 req.SetContext(ctx) 2533 req.ApplyOptions(opts...) 2534 return out, req.Send() 2535} 2536 2537// FilterLogEventsPages iterates over the pages of a FilterLogEvents operation, 2538// calling the "fn" function with the response data for each page. To stop 2539// iterating, return false from the fn function. 2540// 2541// See FilterLogEvents method for more information on how to use this operation. 2542// 2543// Note: This operation can generate multiple requests to a service. 2544// 2545// // Example iterating over at most 3 pages of a FilterLogEvents operation. 2546// pageNum := 0 2547// err := client.FilterLogEventsPages(params, 2548// func(page *cloudwatchlogs.FilterLogEventsOutput, lastPage bool) bool { 2549// pageNum++ 2550// fmt.Println(page) 2551// return pageNum <= 3 2552// }) 2553// 2554func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error { 2555 return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) 2556} 2557 2558// FilterLogEventsPagesWithContext same as FilterLogEventsPages except 2559// it takes a Context and allows setting request options on the pages. 2560// 2561// The context must be non-nil and will be used for request cancellation. If 2562// the context is nil a panic will occur. In the future the SDK may create 2563// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2564// for more information on using Contexts. 2565func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { 2566 p := request.Pagination{ 2567 EndPageOnSameToken: true, 2568 NewRequest: func() (*request.Request, error) { 2569 var inCpy *FilterLogEventsInput 2570 if input != nil { 2571 tmp := *input 2572 inCpy = &tmp 2573 } 2574 req, _ := c.FilterLogEventsRequest(inCpy) 2575 req.SetContext(ctx) 2576 req.ApplyOptions(opts...) 2577 return req, nil 2578 }, 2579 } 2580 2581 for p.Next() { 2582 if !fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) { 2583 break 2584 } 2585 } 2586 2587 return p.Err() 2588} 2589 2590const opGetLogEvents = "GetLogEvents" 2591 2592// GetLogEventsRequest generates a "aws/request.Request" representing the 2593// client's request for the GetLogEvents operation. The "output" return 2594// value will be populated with the request's response once the request completes 2595// successfully. 2596// 2597// Use "Send" method on the returned Request to send the API call to the service. 2598// the "output" return value is not valid until after Send returns without error. 2599// 2600// See GetLogEvents for more information on using the GetLogEvents 2601// API call, and error handling. 2602// 2603// This method is useful when you want to inject custom logic or configuration 2604// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2605// 2606// 2607// // Example sending a request using the GetLogEventsRequest method. 2608// req, resp := client.GetLogEventsRequest(params) 2609// 2610// err := req.Send() 2611// if err == nil { // resp is now filled 2612// fmt.Println(resp) 2613// } 2614// 2615// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents 2616func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) { 2617 op := &request.Operation{ 2618 Name: opGetLogEvents, 2619 HTTPMethod: "POST", 2620 HTTPPath: "/", 2621 Paginator: &request.Paginator{ 2622 InputTokens: []string{"nextToken"}, 2623 OutputTokens: []string{"nextForwardToken"}, 2624 LimitToken: "limit", 2625 TruncationToken: "", 2626 }, 2627 } 2628 2629 if input == nil { 2630 input = &GetLogEventsInput{} 2631 } 2632 2633 output = &GetLogEventsOutput{} 2634 req = c.newRequest(op, input, output) 2635 return 2636} 2637 2638// GetLogEvents API operation for Amazon CloudWatch Logs. 2639// 2640// Lists log events from the specified log stream. You can list all of the log 2641// events or filter using a time range. 2642// 2643// By default, this operation returns as many log events as can fit in a response 2644// size of 1MB (up to 10,000 log events). You can get additional log events 2645// by specifying one of the tokens in a subsequent call. This operation can 2646// return empty results while there are more log events available through the 2647// token. 2648// 2649// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2650// with awserr.Error's Code and Message methods to get detailed information about 2651// the error. 2652// 2653// See the AWS API reference guide for Amazon CloudWatch Logs's 2654// API operation GetLogEvents for usage and error information. 2655// 2656// Returned Error Types: 2657// * InvalidParameterException 2658// A parameter is specified incorrectly. 2659// 2660// * ResourceNotFoundException 2661// The specified resource does not exist. 2662// 2663// * ServiceUnavailableException 2664// The service cannot complete the request. 2665// 2666// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents 2667func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) { 2668 req, out := c.GetLogEventsRequest(input) 2669 return out, req.Send() 2670} 2671 2672// GetLogEventsWithContext is the same as GetLogEvents with the addition of 2673// the ability to pass a context and additional request options. 2674// 2675// See GetLogEvents for details on how to use this API operation. 2676// 2677// The context must be non-nil and will be used for request cancellation. If 2678// the context is nil a panic will occur. In the future the SDK may create 2679// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2680// for more information on using Contexts. 2681func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) { 2682 req, out := c.GetLogEventsRequest(input) 2683 req.SetContext(ctx) 2684 req.ApplyOptions(opts...) 2685 return out, req.Send() 2686} 2687 2688// GetLogEventsPages iterates over the pages of a GetLogEvents operation, 2689// calling the "fn" function with the response data for each page. To stop 2690// iterating, return false from the fn function. 2691// 2692// See GetLogEvents method for more information on how to use this operation. 2693// 2694// Note: This operation can generate multiple requests to a service. 2695// 2696// // Example iterating over at most 3 pages of a GetLogEvents operation. 2697// pageNum := 0 2698// err := client.GetLogEventsPages(params, 2699// func(page *cloudwatchlogs.GetLogEventsOutput, lastPage bool) bool { 2700// pageNum++ 2701// fmt.Println(page) 2702// return pageNum <= 3 2703// }) 2704// 2705func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error { 2706 return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) 2707} 2708 2709// GetLogEventsPagesWithContext same as GetLogEventsPages except 2710// it takes a Context and allows setting request options on the pages. 2711// 2712// The context must be non-nil and will be used for request cancellation. If 2713// the context is nil a panic will occur. In the future the SDK may create 2714// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2715// for more information on using Contexts. 2716func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { 2717 p := request.Pagination{ 2718 EndPageOnSameToken: true, 2719 NewRequest: func() (*request.Request, error) { 2720 var inCpy *GetLogEventsInput 2721 if input != nil { 2722 tmp := *input 2723 inCpy = &tmp 2724 } 2725 req, _ := c.GetLogEventsRequest(inCpy) 2726 req.SetContext(ctx) 2727 req.ApplyOptions(opts...) 2728 return req, nil 2729 }, 2730 } 2731 2732 for p.Next() { 2733 if !fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) { 2734 break 2735 } 2736 } 2737 2738 return p.Err() 2739} 2740 2741const opGetLogGroupFields = "GetLogGroupFields" 2742 2743// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the 2744// client's request for the GetLogGroupFields operation. The "output" return 2745// value will be populated with the request's response once the request completes 2746// successfully. 2747// 2748// Use "Send" method on the returned Request to send the API call to the service. 2749// the "output" return value is not valid until after Send returns without error. 2750// 2751// See GetLogGroupFields for more information on using the GetLogGroupFields 2752// API call, and error handling. 2753// 2754// This method is useful when you want to inject custom logic or configuration 2755// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2756// 2757// 2758// // Example sending a request using the GetLogGroupFieldsRequest method. 2759// req, resp := client.GetLogGroupFieldsRequest(params) 2760// 2761// err := req.Send() 2762// if err == nil { // resp is now filled 2763// fmt.Println(resp) 2764// } 2765// 2766// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields 2767func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { 2768 op := &request.Operation{ 2769 Name: opGetLogGroupFields, 2770 HTTPMethod: "POST", 2771 HTTPPath: "/", 2772 } 2773 2774 if input == nil { 2775 input = &GetLogGroupFieldsInput{} 2776 } 2777 2778 output = &GetLogGroupFieldsOutput{} 2779 req = c.newRequest(op, input, output) 2780 return 2781} 2782 2783// GetLogGroupFields API operation for Amazon CloudWatch Logs. 2784// 2785// Returns a list of the fields that are included in log events in the specified 2786// log group, along with the percentage of log events that contain each field. 2787// The search is limited to a time period that you specify. 2788// 2789// In the results, fields that start with @ are fields generated by CloudWatch 2790// Logs. For example, @timestamp is the timestamp of each log event. For more 2791// information about the fields that are generated by CloudWatch logs, see Supported 2792// Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). 2793// 2794// The response results are sorted by the frequency percentage, starting with 2795// the highest percentage. 2796// 2797// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2798// with awserr.Error's Code and Message methods to get detailed information about 2799// the error. 2800// 2801// See the AWS API reference guide for Amazon CloudWatch Logs's 2802// API operation GetLogGroupFields for usage and error information. 2803// 2804// Returned Error Types: 2805// * InvalidParameterException 2806// A parameter is specified incorrectly. 2807// 2808// * LimitExceededException 2809// You have reached the maximum number of resources that can be created. 2810// 2811// * ResourceNotFoundException 2812// The specified resource does not exist. 2813// 2814// * ServiceUnavailableException 2815// The service cannot complete the request. 2816// 2817// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields 2818func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { 2819 req, out := c.GetLogGroupFieldsRequest(input) 2820 return out, req.Send() 2821} 2822 2823// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of 2824// the ability to pass a context and additional request options. 2825// 2826// See GetLogGroupFields for details on how to use this API operation. 2827// 2828// The context must be non-nil and will be used for request cancellation. If 2829// the context is nil a panic will occur. In the future the SDK may create 2830// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2831// for more information on using Contexts. 2832func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { 2833 req, out := c.GetLogGroupFieldsRequest(input) 2834 req.SetContext(ctx) 2835 req.ApplyOptions(opts...) 2836 return out, req.Send() 2837} 2838 2839const opGetLogRecord = "GetLogRecord" 2840 2841// GetLogRecordRequest generates a "aws/request.Request" representing the 2842// client's request for the GetLogRecord operation. The "output" return 2843// value will be populated with the request's response once the request completes 2844// successfully. 2845// 2846// Use "Send" method on the returned Request to send the API call to the service. 2847// the "output" return value is not valid until after Send returns without error. 2848// 2849// See GetLogRecord for more information on using the GetLogRecord 2850// API call, and error handling. 2851// 2852// This method is useful when you want to inject custom logic or configuration 2853// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2854// 2855// 2856// // Example sending a request using the GetLogRecordRequest method. 2857// req, resp := client.GetLogRecordRequest(params) 2858// 2859// err := req.Send() 2860// if err == nil { // resp is now filled 2861// fmt.Println(resp) 2862// } 2863// 2864// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord 2865func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { 2866 op := &request.Operation{ 2867 Name: opGetLogRecord, 2868 HTTPMethod: "POST", 2869 HTTPPath: "/", 2870 } 2871 2872 if input == nil { 2873 input = &GetLogRecordInput{} 2874 } 2875 2876 output = &GetLogRecordOutput{} 2877 req = c.newRequest(op, input, output) 2878 return 2879} 2880 2881// GetLogRecord API operation for Amazon CloudWatch Logs. 2882// 2883// Retrieves all of the fields and values of a single log event. All fields 2884// are retrieved, even if the original query that produced the logRecordPointer 2885// retrieved only a subset of fields. Fields are returned as field name/field 2886// value pairs. 2887// 2888// The full unparsed log event is returned within @message. 2889// 2890// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2891// with awserr.Error's Code and Message methods to get detailed information about 2892// the error. 2893// 2894// See the AWS API reference guide for Amazon CloudWatch Logs's 2895// API operation GetLogRecord for usage and error information. 2896// 2897// Returned Error Types: 2898// * InvalidParameterException 2899// A parameter is specified incorrectly. 2900// 2901// * LimitExceededException 2902// You have reached the maximum number of resources that can be created. 2903// 2904// * ResourceNotFoundException 2905// The specified resource does not exist. 2906// 2907// * ServiceUnavailableException 2908// The service cannot complete the request. 2909// 2910// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord 2911func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { 2912 req, out := c.GetLogRecordRequest(input) 2913 return out, req.Send() 2914} 2915 2916// GetLogRecordWithContext is the same as GetLogRecord with the addition of 2917// the ability to pass a context and additional request options. 2918// 2919// See GetLogRecord for details on how to use this API operation. 2920// 2921// The context must be non-nil and will be used for request cancellation. If 2922// the context is nil a panic will occur. In the future the SDK may create 2923// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2924// for more information on using Contexts. 2925func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { 2926 req, out := c.GetLogRecordRequest(input) 2927 req.SetContext(ctx) 2928 req.ApplyOptions(opts...) 2929 return out, req.Send() 2930} 2931 2932const opGetQueryResults = "GetQueryResults" 2933 2934// GetQueryResultsRequest generates a "aws/request.Request" representing the 2935// client's request for the GetQueryResults operation. The "output" return 2936// value will be populated with the request's response once the request completes 2937// successfully. 2938// 2939// Use "Send" method on the returned Request to send the API call to the service. 2940// the "output" return value is not valid until after Send returns without error. 2941// 2942// See GetQueryResults for more information on using the GetQueryResults 2943// API call, and error handling. 2944// 2945// This method is useful when you want to inject custom logic or configuration 2946// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2947// 2948// 2949// // Example sending a request using the GetQueryResultsRequest method. 2950// req, resp := client.GetQueryResultsRequest(params) 2951// 2952// err := req.Send() 2953// if err == nil { // resp is now filled 2954// fmt.Println(resp) 2955// } 2956// 2957// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults 2958func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { 2959 op := &request.Operation{ 2960 Name: opGetQueryResults, 2961 HTTPMethod: "POST", 2962 HTTPPath: "/", 2963 } 2964 2965 if input == nil { 2966 input = &GetQueryResultsInput{} 2967 } 2968 2969 output = &GetQueryResultsOutput{} 2970 req = c.newRequest(op, input, output) 2971 return 2972} 2973 2974// GetQueryResults API operation for Amazon CloudWatch Logs. 2975// 2976// Returns the results from the specified query. 2977// 2978// Only the fields requested in the query are returned, along with a @ptr field, 2979// which is the identifier for the log record. You can use the value of @ptr 2980// in a GetLogRecord (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) 2981// operation to get the full log record. 2982// 2983// GetQueryResults does not start a query execution. To run a query, use StartQuery 2984// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). 2985// 2986// If the value of the Status field in the output is Running, this operation 2987// returns only partial results. If you see a value of Scheduled or Running 2988// for the status, you can retry the operation later to see the final results. 2989// 2990// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2991// with awserr.Error's Code and Message methods to get detailed information about 2992// the error. 2993// 2994// See the AWS API reference guide for Amazon CloudWatch Logs's 2995// API operation GetQueryResults for usage and error information. 2996// 2997// Returned Error Types: 2998// * InvalidParameterException 2999// A parameter is specified incorrectly. 3000// 3001// * ResourceNotFoundException 3002// The specified resource does not exist. 3003// 3004// * ServiceUnavailableException 3005// The service cannot complete the request. 3006// 3007// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults 3008func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { 3009 req, out := c.GetQueryResultsRequest(input) 3010 return out, req.Send() 3011} 3012 3013// GetQueryResultsWithContext is the same as GetQueryResults with the addition of 3014// the ability to pass a context and additional request options. 3015// 3016// See GetQueryResults for details on how to use this API operation. 3017// 3018// The context must be non-nil and will be used for request cancellation. If 3019// the context is nil a panic will occur. In the future the SDK may create 3020// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3021// for more information on using Contexts. 3022func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { 3023 req, out := c.GetQueryResultsRequest(input) 3024 req.SetContext(ctx) 3025 req.ApplyOptions(opts...) 3026 return out, req.Send() 3027} 3028 3029const opListTagsLogGroup = "ListTagsLogGroup" 3030 3031// ListTagsLogGroupRequest generates a "aws/request.Request" representing the 3032// client's request for the ListTagsLogGroup operation. The "output" return 3033// value will be populated with the request's response once the request completes 3034// successfully. 3035// 3036// Use "Send" method on the returned Request to send the API call to the service. 3037// the "output" return value is not valid until after Send returns without error. 3038// 3039// See ListTagsLogGroup for more information on using the ListTagsLogGroup 3040// API call, and error handling. 3041// 3042// This method is useful when you want to inject custom logic or configuration 3043// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3044// 3045// 3046// // Example sending a request using the ListTagsLogGroupRequest method. 3047// req, resp := client.ListTagsLogGroupRequest(params) 3048// 3049// err := req.Send() 3050// if err == nil { // resp is now filled 3051// fmt.Println(resp) 3052// } 3053// 3054// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup 3055func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) { 3056 op := &request.Operation{ 3057 Name: opListTagsLogGroup, 3058 HTTPMethod: "POST", 3059 HTTPPath: "/", 3060 } 3061 3062 if input == nil { 3063 input = &ListTagsLogGroupInput{} 3064 } 3065 3066 output = &ListTagsLogGroupOutput{} 3067 req = c.newRequest(op, input, output) 3068 return 3069} 3070 3071// ListTagsLogGroup API operation for Amazon CloudWatch Logs. 3072// 3073// Lists the tags for the specified log group. 3074// 3075// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3076// with awserr.Error's Code and Message methods to get detailed information about 3077// the error. 3078// 3079// See the AWS API reference guide for Amazon CloudWatch Logs's 3080// API operation ListTagsLogGroup for usage and error information. 3081// 3082// Returned Error Types: 3083// * ResourceNotFoundException 3084// The specified resource does not exist. 3085// 3086// * ServiceUnavailableException 3087// The service cannot complete the request. 3088// 3089// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup 3090func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) { 3091 req, out := c.ListTagsLogGroupRequest(input) 3092 return out, req.Send() 3093} 3094 3095// ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of 3096// the ability to pass a context and additional request options. 3097// 3098// See ListTagsLogGroup for details on how to use this API operation. 3099// 3100// The context must be non-nil and will be used for request cancellation. If 3101// the context is nil a panic will occur. In the future the SDK may create 3102// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3103// for more information on using Contexts. 3104func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) { 3105 req, out := c.ListTagsLogGroupRequest(input) 3106 req.SetContext(ctx) 3107 req.ApplyOptions(opts...) 3108 return out, req.Send() 3109} 3110 3111const opPutDestination = "PutDestination" 3112 3113// PutDestinationRequest generates a "aws/request.Request" representing the 3114// client's request for the PutDestination operation. The "output" return 3115// value will be populated with the request's response once the request completes 3116// successfully. 3117// 3118// Use "Send" method on the returned Request to send the API call to the service. 3119// the "output" return value is not valid until after Send returns without error. 3120// 3121// See PutDestination for more information on using the PutDestination 3122// API call, and error handling. 3123// 3124// This method is useful when you want to inject custom logic or configuration 3125// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3126// 3127// 3128// // Example sending a request using the PutDestinationRequest method. 3129// req, resp := client.PutDestinationRequest(params) 3130// 3131// err := req.Send() 3132// if err == nil { // resp is now filled 3133// fmt.Println(resp) 3134// } 3135// 3136// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination 3137func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) { 3138 op := &request.Operation{ 3139 Name: opPutDestination, 3140 HTTPMethod: "POST", 3141 HTTPPath: "/", 3142 } 3143 3144 if input == nil { 3145 input = &PutDestinationInput{} 3146 } 3147 3148 output = &PutDestinationOutput{} 3149 req = c.newRequest(op, input, output) 3150 return 3151} 3152 3153// PutDestination API operation for Amazon CloudWatch Logs. 3154// 3155// Creates or updates a destination. This operation is used only to create destinations 3156// for cross-account subscriptions. 3157// 3158// A destination encapsulates a physical resource (such as an Amazon Kinesis 3159// stream) and enables you to subscribe to a real-time stream of log events 3160// for a different account, ingested using PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). 3161// 3162// Through an access policy, a destination controls what is written to it. By 3163// default, PutDestination does not set any access policy with the destination, 3164// which means a cross-account user cannot call PutSubscriptionFilter (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) 3165// against this destination. To enable this, the destination owner must call 3166// PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) 3167// after PutDestination. 3168// 3169// To perform a PutDestination operation, you must also have the iam:PassRole 3170// permission. 3171// 3172// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3173// with awserr.Error's Code and Message methods to get detailed information about 3174// the error. 3175// 3176// See the AWS API reference guide for Amazon CloudWatch Logs's 3177// API operation PutDestination for usage and error information. 3178// 3179// Returned Error Types: 3180// * InvalidParameterException 3181// A parameter is specified incorrectly. 3182// 3183// * OperationAbortedException 3184// Multiple requests to update the same resource were in conflict. 3185// 3186// * ServiceUnavailableException 3187// The service cannot complete the request. 3188// 3189// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination 3190func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) { 3191 req, out := c.PutDestinationRequest(input) 3192 return out, req.Send() 3193} 3194 3195// PutDestinationWithContext is the same as PutDestination with the addition of 3196// the ability to pass a context and additional request options. 3197// 3198// See PutDestination for details on how to use this API operation. 3199// 3200// The context must be non-nil and will be used for request cancellation. If 3201// the context is nil a panic will occur. In the future the SDK may create 3202// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3203// for more information on using Contexts. 3204func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) { 3205 req, out := c.PutDestinationRequest(input) 3206 req.SetContext(ctx) 3207 req.ApplyOptions(opts...) 3208 return out, req.Send() 3209} 3210 3211const opPutDestinationPolicy = "PutDestinationPolicy" 3212 3213// PutDestinationPolicyRequest generates a "aws/request.Request" representing the 3214// client's request for the PutDestinationPolicy operation. The "output" return 3215// value will be populated with the request's response once the request completes 3216// successfully. 3217// 3218// Use "Send" method on the returned Request to send the API call to the service. 3219// the "output" return value is not valid until after Send returns without error. 3220// 3221// See PutDestinationPolicy for more information on using the PutDestinationPolicy 3222// API call, and error handling. 3223// 3224// This method is useful when you want to inject custom logic or configuration 3225// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3226// 3227// 3228// // Example sending a request using the PutDestinationPolicyRequest method. 3229// req, resp := client.PutDestinationPolicyRequest(params) 3230// 3231// err := req.Send() 3232// if err == nil { // resp is now filled 3233// fmt.Println(resp) 3234// } 3235// 3236// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy 3237func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) { 3238 op := &request.Operation{ 3239 Name: opPutDestinationPolicy, 3240 HTTPMethod: "POST", 3241 HTTPPath: "/", 3242 } 3243 3244 if input == nil { 3245 input = &PutDestinationPolicyInput{} 3246 } 3247 3248 output = &PutDestinationPolicyOutput{} 3249 req = c.newRequest(op, input, output) 3250 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3251 return 3252} 3253 3254// PutDestinationPolicy API operation for Amazon CloudWatch Logs. 3255// 3256// Creates or updates an access policy associated with an existing destination. 3257// An access policy is an IAM policy document (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) 3258// that is used to authorize claims to register a subscription filter against 3259// a given destination. 3260// 3261// If multiple Amazon Web Services accounts are sending logs to this destination, 3262// each sender account must be listed separately in the policy. The policy does 3263// not support specifying * as the Principal or the use of the aws:PrincipalOrgId 3264// global key. 3265// 3266// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3267// with awserr.Error's Code and Message methods to get detailed information about 3268// the error. 3269// 3270// See the AWS API reference guide for Amazon CloudWatch Logs's 3271// API operation PutDestinationPolicy for usage and error information. 3272// 3273// Returned Error Types: 3274// * InvalidParameterException 3275// A parameter is specified incorrectly. 3276// 3277// * OperationAbortedException 3278// Multiple requests to update the same resource were in conflict. 3279// 3280// * ServiceUnavailableException 3281// The service cannot complete the request. 3282// 3283// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy 3284func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) { 3285 req, out := c.PutDestinationPolicyRequest(input) 3286 return out, req.Send() 3287} 3288 3289// PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of 3290// the ability to pass a context and additional request options. 3291// 3292// See PutDestinationPolicy for details on how to use this API operation. 3293// 3294// The context must be non-nil and will be used for request cancellation. If 3295// the context is nil a panic will occur. In the future the SDK may create 3296// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3297// for more information on using Contexts. 3298func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) { 3299 req, out := c.PutDestinationPolicyRequest(input) 3300 req.SetContext(ctx) 3301 req.ApplyOptions(opts...) 3302 return out, req.Send() 3303} 3304 3305const opPutLogEvents = "PutLogEvents" 3306 3307// PutLogEventsRequest generates a "aws/request.Request" representing the 3308// client's request for the PutLogEvents operation. The "output" return 3309// value will be populated with the request's response once the request completes 3310// successfully. 3311// 3312// Use "Send" method on the returned Request to send the API call to the service. 3313// the "output" return value is not valid until after Send returns without error. 3314// 3315// See PutLogEvents for more information on using the PutLogEvents 3316// API call, and error handling. 3317// 3318// This method is useful when you want to inject custom logic or configuration 3319// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3320// 3321// 3322// // Example sending a request using the PutLogEventsRequest method. 3323// req, resp := client.PutLogEventsRequest(params) 3324// 3325// err := req.Send() 3326// if err == nil { // resp is now filled 3327// fmt.Println(resp) 3328// } 3329// 3330// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents 3331func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) { 3332 op := &request.Operation{ 3333 Name: opPutLogEvents, 3334 HTTPMethod: "POST", 3335 HTTPPath: "/", 3336 } 3337 3338 if input == nil { 3339 input = &PutLogEventsInput{} 3340 } 3341 3342 output = &PutLogEventsOutput{} 3343 req = c.newRequest(op, input, output) 3344 return 3345} 3346 3347// PutLogEvents API operation for Amazon CloudWatch Logs. 3348// 3349// Uploads a batch of log events to the specified log stream. 3350// 3351// You must include the sequence token obtained from the response of the previous 3352// call. An upload in a newly created log stream does not require a sequence 3353// token. You can also get the sequence token in the expectedSequenceToken field 3354// from InvalidSequenceTokenException. If you call PutLogEvents twice within 3355// a narrow time period using the same value for sequenceToken, both calls might 3356// be successful or one might be rejected. 3357// 3358// The batch of events must satisfy the following constraints: 3359// 3360// * The maximum batch size is 1,048,576 bytes. This size is calculated as 3361// the sum of all event messages in UTF-8, plus 26 bytes for each log event. 3362// 3363// * None of the log events in the batch can be more than 2 hours in the 3364// future. 3365// 3366// * None of the log events in the batch can be older than 14 days or older 3367// than the retention period of the log group. 3368// 3369// * The log events in the batch must be in chronological order by their 3370// timestamp. The timestamp is the time the event occurred, expressed as 3371// the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon 3372// Web Services Tools for PowerShell and the Amazon Web Services SDK for 3373// .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. 3374// For example, 2017-09-15T13:45:30.) 3375// 3376// * A batch of log events in a single request cannot span more than 24 hours. 3377// Otherwise, the operation fails. 3378// 3379// * The maximum number of log events in a batch is 10,000. 3380// 3381// * There is a quota of 5 requests per second per log stream. Additional 3382// requests are throttled. This quota can't be changed. 3383// 3384// If a call to PutLogEvents returns "UnrecognizedClientException" the most 3385// likely cause is an invalid Amazon Web Services access key ID or secret key. 3386// 3387// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3388// with awserr.Error's Code and Message methods to get detailed information about 3389// the error. 3390// 3391// See the AWS API reference guide for Amazon CloudWatch Logs's 3392// API operation PutLogEvents for usage and error information. 3393// 3394// Returned Error Types: 3395// * InvalidParameterException 3396// A parameter is specified incorrectly. 3397// 3398// * InvalidSequenceTokenException 3399// The sequence token is not valid. You can get the correct sequence token in 3400// the expectedSequenceToken field in the InvalidSequenceTokenException message. 3401// 3402// * DataAlreadyAcceptedException 3403// The event was already logged. 3404// 3405// * ResourceNotFoundException 3406// The specified resource does not exist. 3407// 3408// * ServiceUnavailableException 3409// The service cannot complete the request. 3410// 3411// * UnrecognizedClientException 3412// The most likely cause is an invalid Amazon Web Services access key ID or 3413// secret key. 3414// 3415// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents 3416func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { 3417 req, out := c.PutLogEventsRequest(input) 3418 return out, req.Send() 3419} 3420 3421// PutLogEventsWithContext is the same as PutLogEvents with the addition of 3422// the ability to pass a context and additional request options. 3423// 3424// See PutLogEvents for details on how to use this API operation. 3425// 3426// The context must be non-nil and will be used for request cancellation. If 3427// the context is nil a panic will occur. In the future the SDK may create 3428// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3429// for more information on using Contexts. 3430func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) { 3431 req, out := c.PutLogEventsRequest(input) 3432 req.SetContext(ctx) 3433 req.ApplyOptions(opts...) 3434 return out, req.Send() 3435} 3436 3437const opPutMetricFilter = "PutMetricFilter" 3438 3439// PutMetricFilterRequest generates a "aws/request.Request" representing the 3440// client's request for the PutMetricFilter operation. The "output" return 3441// value will be populated with the request's response once the request completes 3442// successfully. 3443// 3444// Use "Send" method on the returned Request to send the API call to the service. 3445// the "output" return value is not valid until after Send returns without error. 3446// 3447// See PutMetricFilter for more information on using the PutMetricFilter 3448// API call, and error handling. 3449// 3450// This method is useful when you want to inject custom logic or configuration 3451// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3452// 3453// 3454// // Example sending a request using the PutMetricFilterRequest method. 3455// req, resp := client.PutMetricFilterRequest(params) 3456// 3457// err := req.Send() 3458// if err == nil { // resp is now filled 3459// fmt.Println(resp) 3460// } 3461// 3462// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter 3463func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) { 3464 op := &request.Operation{ 3465 Name: opPutMetricFilter, 3466 HTTPMethod: "POST", 3467 HTTPPath: "/", 3468 } 3469 3470 if input == nil { 3471 input = &PutMetricFilterInput{} 3472 } 3473 3474 output = &PutMetricFilterOutput{} 3475 req = c.newRequest(op, input, output) 3476 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3477 return 3478} 3479 3480// PutMetricFilter API operation for Amazon CloudWatch Logs. 3481// 3482// Creates or updates a metric filter and associates it with the specified log 3483// group. Metric filters allow you to configure rules to extract metric data 3484// from log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). 3485// 3486// The maximum number of metric filters that can be associated with a log group 3487// is 100. 3488// 3489// When you create a metric filter, you can also optionally assign a unit and 3490// dimensions to the metric that is created. 3491// 3492// Metrics extracted from log events are charged as custom metrics. To prevent 3493// unexpected high charges, do not specify high-cardinality fields such as IPAddress 3494// or requestID as dimensions. Each different value found for a dimension is 3495// treated as a separate metric and accrues charges as a separate custom metric. 3496// 3497// To help prevent accidental high charges, Amazon disables a metric filter 3498// if it generates 1000 different name/value pairs for the dimensions that you 3499// have specified within a certain amount of time. 3500// 3501// You can also set up a billing alarm to alert you if your charges are higher 3502// than expected. For more information, see Creating a Billing Alarm to Monitor 3503// Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). 3504// 3505// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3506// with awserr.Error's Code and Message methods to get detailed information about 3507// the error. 3508// 3509// See the AWS API reference guide for Amazon CloudWatch Logs's 3510// API operation PutMetricFilter for usage and error information. 3511// 3512// Returned Error Types: 3513// * InvalidParameterException 3514// A parameter is specified incorrectly. 3515// 3516// * ResourceNotFoundException 3517// The specified resource does not exist. 3518// 3519// * OperationAbortedException 3520// Multiple requests to update the same resource were in conflict. 3521// 3522// * LimitExceededException 3523// You have reached the maximum number of resources that can be created. 3524// 3525// * ServiceUnavailableException 3526// The service cannot complete the request. 3527// 3528// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter 3529func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) { 3530 req, out := c.PutMetricFilterRequest(input) 3531 return out, req.Send() 3532} 3533 3534// PutMetricFilterWithContext is the same as PutMetricFilter with the addition of 3535// the ability to pass a context and additional request options. 3536// 3537// See PutMetricFilter for details on how to use this API operation. 3538// 3539// The context must be non-nil and will be used for request cancellation. If 3540// the context is nil a panic will occur. In the future the SDK may create 3541// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3542// for more information on using Contexts. 3543func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) { 3544 req, out := c.PutMetricFilterRequest(input) 3545 req.SetContext(ctx) 3546 req.ApplyOptions(opts...) 3547 return out, req.Send() 3548} 3549 3550const opPutQueryDefinition = "PutQueryDefinition" 3551 3552// PutQueryDefinitionRequest generates a "aws/request.Request" representing the 3553// client's request for the PutQueryDefinition operation. The "output" return 3554// value will be populated with the request's response once the request completes 3555// successfully. 3556// 3557// Use "Send" method on the returned Request to send the API call to the service. 3558// the "output" return value is not valid until after Send returns without error. 3559// 3560// See PutQueryDefinition for more information on using the PutQueryDefinition 3561// API call, and error handling. 3562// 3563// This method is useful when you want to inject custom logic or configuration 3564// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3565// 3566// 3567// // Example sending a request using the PutQueryDefinitionRequest method. 3568// req, resp := client.PutQueryDefinitionRequest(params) 3569// 3570// err := req.Send() 3571// if err == nil { // resp is now filled 3572// fmt.Println(resp) 3573// } 3574// 3575// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition 3576func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInput) (req *request.Request, output *PutQueryDefinitionOutput) { 3577 op := &request.Operation{ 3578 Name: opPutQueryDefinition, 3579 HTTPMethod: "POST", 3580 HTTPPath: "/", 3581 } 3582 3583 if input == nil { 3584 input = &PutQueryDefinitionInput{} 3585 } 3586 3587 output = &PutQueryDefinitionOutput{} 3588 req = c.newRequest(op, input, output) 3589 return 3590} 3591 3592// PutQueryDefinition API operation for Amazon CloudWatch Logs. 3593// 3594// Creates or updates a query definition for CloudWatch Logs Insights. For more 3595// information, see Analyzing Log Data with CloudWatch Logs Insights (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). 3596// 3597// To update a query definition, specify its queryDefinitionId in your request. 3598// The values of name, queryString, and logGroupNames are changed to the values 3599// that you specify in your update operation. No current values are retained 3600// from the current query definition. For example, if you update a current query 3601// definition that includes log groups, and you don't specify the logGroupNames 3602// parameter in your update operation, the query definition changes to contain 3603// no log groups. 3604// 3605// You must have the logs:PutQueryDefinition permission to be able to perform 3606// this operation. 3607// 3608// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3609// with awserr.Error's Code and Message methods to get detailed information about 3610// the error. 3611// 3612// See the AWS API reference guide for Amazon CloudWatch Logs's 3613// API operation PutQueryDefinition for usage and error information. 3614// 3615// Returned Error Types: 3616// * InvalidParameterException 3617// A parameter is specified incorrectly. 3618// 3619// * ResourceNotFoundException 3620// The specified resource does not exist. 3621// 3622// * ServiceUnavailableException 3623// The service cannot complete the request. 3624// 3625// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition 3626func (c *CloudWatchLogs) PutQueryDefinition(input *PutQueryDefinitionInput) (*PutQueryDefinitionOutput, error) { 3627 req, out := c.PutQueryDefinitionRequest(input) 3628 return out, req.Send() 3629} 3630 3631// PutQueryDefinitionWithContext is the same as PutQueryDefinition with the addition of 3632// the ability to pass a context and additional request options. 3633// 3634// See PutQueryDefinition for details on how to use this API operation. 3635// 3636// The context must be non-nil and will be used for request cancellation. If 3637// the context is nil a panic will occur. In the future the SDK may create 3638// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3639// for more information on using Contexts. 3640func (c *CloudWatchLogs) PutQueryDefinitionWithContext(ctx aws.Context, input *PutQueryDefinitionInput, opts ...request.Option) (*PutQueryDefinitionOutput, error) { 3641 req, out := c.PutQueryDefinitionRequest(input) 3642 req.SetContext(ctx) 3643 req.ApplyOptions(opts...) 3644 return out, req.Send() 3645} 3646 3647const opPutResourcePolicy = "PutResourcePolicy" 3648 3649// PutResourcePolicyRequest generates a "aws/request.Request" representing the 3650// client's request for the PutResourcePolicy operation. The "output" return 3651// value will be populated with the request's response once the request completes 3652// successfully. 3653// 3654// Use "Send" method on the returned Request to send the API call to the service. 3655// the "output" return value is not valid until after Send returns without error. 3656// 3657// See PutResourcePolicy for more information on using the PutResourcePolicy 3658// API call, and error handling. 3659// 3660// This method is useful when you want to inject custom logic or configuration 3661// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3662// 3663// 3664// // Example sending a request using the PutResourcePolicyRequest method. 3665// req, resp := client.PutResourcePolicyRequest(params) 3666// 3667// err := req.Send() 3668// if err == nil { // resp is now filled 3669// fmt.Println(resp) 3670// } 3671// 3672// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy 3673func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { 3674 op := &request.Operation{ 3675 Name: opPutResourcePolicy, 3676 HTTPMethod: "POST", 3677 HTTPPath: "/", 3678 } 3679 3680 if input == nil { 3681 input = &PutResourcePolicyInput{} 3682 } 3683 3684 output = &PutResourcePolicyOutput{} 3685 req = c.newRequest(op, input, output) 3686 return 3687} 3688 3689// PutResourcePolicy API operation for Amazon CloudWatch Logs. 3690// 3691// Creates or updates a resource policy allowing other Amazon Web Services services 3692// to put log events to this account, such as Amazon Route 53. An account can 3693// have up to 10 resource policies per Amazon Web Services Region. 3694// 3695// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3696// with awserr.Error's Code and Message methods to get detailed information about 3697// the error. 3698// 3699// See the AWS API reference guide for Amazon CloudWatch Logs's 3700// API operation PutResourcePolicy for usage and error information. 3701// 3702// Returned Error Types: 3703// * InvalidParameterException 3704// A parameter is specified incorrectly. 3705// 3706// * LimitExceededException 3707// You have reached the maximum number of resources that can be created. 3708// 3709// * ServiceUnavailableException 3710// The service cannot complete the request. 3711// 3712// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy 3713func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { 3714 req, out := c.PutResourcePolicyRequest(input) 3715 return out, req.Send() 3716} 3717 3718// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of 3719// the ability to pass a context and additional request options. 3720// 3721// See PutResourcePolicy for details on how to use this API operation. 3722// 3723// The context must be non-nil and will be used for request cancellation. If 3724// the context is nil a panic will occur. In the future the SDK may create 3725// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3726// for more information on using Contexts. 3727func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { 3728 req, out := c.PutResourcePolicyRequest(input) 3729 req.SetContext(ctx) 3730 req.ApplyOptions(opts...) 3731 return out, req.Send() 3732} 3733 3734const opPutRetentionPolicy = "PutRetentionPolicy" 3735 3736// PutRetentionPolicyRequest generates a "aws/request.Request" representing the 3737// client's request for the PutRetentionPolicy operation. The "output" return 3738// value will be populated with the request's response once the request completes 3739// successfully. 3740// 3741// Use "Send" method on the returned Request to send the API call to the service. 3742// the "output" return value is not valid until after Send returns without error. 3743// 3744// See PutRetentionPolicy for more information on using the PutRetentionPolicy 3745// API call, and error handling. 3746// 3747// This method is useful when you want to inject custom logic or configuration 3748// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3749// 3750// 3751// // Example sending a request using the PutRetentionPolicyRequest method. 3752// req, resp := client.PutRetentionPolicyRequest(params) 3753// 3754// err := req.Send() 3755// if err == nil { // resp is now filled 3756// fmt.Println(resp) 3757// } 3758// 3759// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy 3760func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { 3761 op := &request.Operation{ 3762 Name: opPutRetentionPolicy, 3763 HTTPMethod: "POST", 3764 HTTPPath: "/", 3765 } 3766 3767 if input == nil { 3768 input = &PutRetentionPolicyInput{} 3769 } 3770 3771 output = &PutRetentionPolicyOutput{} 3772 req = c.newRequest(op, input, output) 3773 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3774 return 3775} 3776 3777// PutRetentionPolicy API operation for Amazon CloudWatch Logs. 3778// 3779// Sets the retention of the specified log group. A retention policy allows 3780// you to configure the number of days for which to retain log events in the 3781// specified log group. 3782// 3783// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3784// with awserr.Error's Code and Message methods to get detailed information about 3785// the error. 3786// 3787// See the AWS API reference guide for Amazon CloudWatch Logs's 3788// API operation PutRetentionPolicy for usage and error information. 3789// 3790// Returned Error Types: 3791// * InvalidParameterException 3792// A parameter is specified incorrectly. 3793// 3794// * ResourceNotFoundException 3795// The specified resource does not exist. 3796// 3797// * OperationAbortedException 3798// Multiple requests to update the same resource were in conflict. 3799// 3800// * ServiceUnavailableException 3801// The service cannot complete the request. 3802// 3803// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy 3804func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { 3805 req, out := c.PutRetentionPolicyRequest(input) 3806 return out, req.Send() 3807} 3808 3809// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of 3810// the ability to pass a context and additional request options. 3811// 3812// See PutRetentionPolicy for details on how to use this API operation. 3813// 3814// The context must be non-nil and will be used for request cancellation. If 3815// the context is nil a panic will occur. In the future the SDK may create 3816// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3817// for more information on using Contexts. 3818func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { 3819 req, out := c.PutRetentionPolicyRequest(input) 3820 req.SetContext(ctx) 3821 req.ApplyOptions(opts...) 3822 return out, req.Send() 3823} 3824 3825const opPutSubscriptionFilter = "PutSubscriptionFilter" 3826 3827// PutSubscriptionFilterRequest generates a "aws/request.Request" representing the 3828// client's request for the PutSubscriptionFilter operation. The "output" return 3829// value will be populated with the request's response once the request completes 3830// successfully. 3831// 3832// Use "Send" method on the returned Request to send the API call to the service. 3833// the "output" return value is not valid until after Send returns without error. 3834// 3835// See PutSubscriptionFilter for more information on using the PutSubscriptionFilter 3836// API call, and error handling. 3837// 3838// This method is useful when you want to inject custom logic or configuration 3839// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3840// 3841// 3842// // Example sending a request using the PutSubscriptionFilterRequest method. 3843// req, resp := client.PutSubscriptionFilterRequest(params) 3844// 3845// err := req.Send() 3846// if err == nil { // resp is now filled 3847// fmt.Println(resp) 3848// } 3849// 3850// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter 3851func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) { 3852 op := &request.Operation{ 3853 Name: opPutSubscriptionFilter, 3854 HTTPMethod: "POST", 3855 HTTPPath: "/", 3856 } 3857 3858 if input == nil { 3859 input = &PutSubscriptionFilterInput{} 3860 } 3861 3862 output = &PutSubscriptionFilterOutput{} 3863 req = c.newRequest(op, input, output) 3864 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3865 return 3866} 3867 3868// PutSubscriptionFilter API operation for Amazon CloudWatch Logs. 3869// 3870// Creates or updates a subscription filter and associates it with the specified 3871// log group. Subscription filters allow you to subscribe to a real-time stream 3872// of log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) 3873// and have them delivered to a specific destination. When log events are sent 3874// to the receiving service, they are Base64 encoded and compressed with the 3875// gzip format. 3876// 3877// The following destinations are supported for subscription filters: 3878// 3879// * An Amazon Kinesis stream belonging to the same account as the subscription 3880// filter, for same-account delivery. 3881// 3882// * A logical destination that belongs to a different account, for cross-account 3883// delivery. 3884// 3885// * An Amazon Kinesis Firehose delivery stream that belongs to the same 3886// account as the subscription filter, for same-account delivery. 3887// 3888// * An Lambda function that belongs to the same account as the subscription 3889// filter, for same-account delivery. 3890// 3891// Each log group can have up to two subscription filters associated with it. 3892// If you are updating an existing filter, you must specify the correct name 3893// in filterName. 3894// 3895// To perform a PutSubscriptionFilter operation, you must also have the iam:PassRole 3896// permission. 3897// 3898// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3899// with awserr.Error's Code and Message methods to get detailed information about 3900// the error. 3901// 3902// See the AWS API reference guide for Amazon CloudWatch Logs's 3903// API operation PutSubscriptionFilter for usage and error information. 3904// 3905// Returned Error Types: 3906// * InvalidParameterException 3907// A parameter is specified incorrectly. 3908// 3909// * ResourceNotFoundException 3910// The specified resource does not exist. 3911// 3912// * OperationAbortedException 3913// Multiple requests to update the same resource were in conflict. 3914// 3915// * LimitExceededException 3916// You have reached the maximum number of resources that can be created. 3917// 3918// * ServiceUnavailableException 3919// The service cannot complete the request. 3920// 3921// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter 3922func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { 3923 req, out := c.PutSubscriptionFilterRequest(input) 3924 return out, req.Send() 3925} 3926 3927// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of 3928// the ability to pass a context and additional request options. 3929// 3930// See PutSubscriptionFilter for details on how to use this API operation. 3931// 3932// The context must be non-nil and will be used for request cancellation. If 3933// the context is nil a panic will occur. In the future the SDK may create 3934// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3935// for more information on using Contexts. 3936func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { 3937 req, out := c.PutSubscriptionFilterRequest(input) 3938 req.SetContext(ctx) 3939 req.ApplyOptions(opts...) 3940 return out, req.Send() 3941} 3942 3943const opStartQuery = "StartQuery" 3944 3945// StartQueryRequest generates a "aws/request.Request" representing the 3946// client's request for the StartQuery operation. The "output" return 3947// value will be populated with the request's response once the request completes 3948// successfully. 3949// 3950// Use "Send" method on the returned Request to send the API call to the service. 3951// the "output" return value is not valid until after Send returns without error. 3952// 3953// See StartQuery for more information on using the StartQuery 3954// API call, and error handling. 3955// 3956// This method is useful when you want to inject custom logic or configuration 3957// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3958// 3959// 3960// // Example sending a request using the StartQueryRequest method. 3961// req, resp := client.StartQueryRequest(params) 3962// 3963// err := req.Send() 3964// if err == nil { // resp is now filled 3965// fmt.Println(resp) 3966// } 3967// 3968// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery 3969func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { 3970 op := &request.Operation{ 3971 Name: opStartQuery, 3972 HTTPMethod: "POST", 3973 HTTPPath: "/", 3974 } 3975 3976 if input == nil { 3977 input = &StartQueryInput{} 3978 } 3979 3980 output = &StartQueryOutput{} 3981 req = c.newRequest(op, input, output) 3982 return 3983} 3984 3985// StartQuery API operation for Amazon CloudWatch Logs. 3986// 3987// Schedules a query of a log group using CloudWatch Logs Insights. You specify 3988// the log group and time range to query and the query string to use. 3989// 3990// For more information, see CloudWatch Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 3991// 3992// Queries time out after 15 minutes of execution. If your queries are timing 3993// out, reduce the time range being searched or partition your query into a 3994// number of queries. 3995// 3996// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3997// with awserr.Error's Code and Message methods to get detailed information about 3998// the error. 3999// 4000// See the AWS API reference guide for Amazon CloudWatch Logs's 4001// API operation StartQuery for usage and error information. 4002// 4003// Returned Error Types: 4004// * MalformedQueryException 4005// The query string is not valid. Details about this error are displayed in 4006// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). 4007// 4008// For more information about valid query syntax, see CloudWatch Logs Insights 4009// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 4010// 4011// * InvalidParameterException 4012// A parameter is specified incorrectly. 4013// 4014// * LimitExceededException 4015// You have reached the maximum number of resources that can be created. 4016// 4017// * ResourceNotFoundException 4018// The specified resource does not exist. 4019// 4020// * ServiceUnavailableException 4021// The service cannot complete the request. 4022// 4023// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery 4024func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { 4025 req, out := c.StartQueryRequest(input) 4026 return out, req.Send() 4027} 4028 4029// StartQueryWithContext is the same as StartQuery with the addition of 4030// the ability to pass a context and additional request options. 4031// 4032// See StartQuery for details on how to use this API operation. 4033// 4034// The context must be non-nil and will be used for request cancellation. If 4035// the context is nil a panic will occur. In the future the SDK may create 4036// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4037// for more information on using Contexts. 4038func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { 4039 req, out := c.StartQueryRequest(input) 4040 req.SetContext(ctx) 4041 req.ApplyOptions(opts...) 4042 return out, req.Send() 4043} 4044 4045const opStopQuery = "StopQuery" 4046 4047// StopQueryRequest generates a "aws/request.Request" representing the 4048// client's request for the StopQuery operation. The "output" return 4049// value will be populated with the request's response once the request completes 4050// successfully. 4051// 4052// Use "Send" method on the returned Request to send the API call to the service. 4053// the "output" return value is not valid until after Send returns without error. 4054// 4055// See StopQuery for more information on using the StopQuery 4056// API call, and error handling. 4057// 4058// This method is useful when you want to inject custom logic or configuration 4059// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4060// 4061// 4062// // Example sending a request using the StopQueryRequest method. 4063// req, resp := client.StopQueryRequest(params) 4064// 4065// err := req.Send() 4066// if err == nil { // resp is now filled 4067// fmt.Println(resp) 4068// } 4069// 4070// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery 4071func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { 4072 op := &request.Operation{ 4073 Name: opStopQuery, 4074 HTTPMethod: "POST", 4075 HTTPPath: "/", 4076 } 4077 4078 if input == nil { 4079 input = &StopQueryInput{} 4080 } 4081 4082 output = &StopQueryOutput{} 4083 req = c.newRequest(op, input, output) 4084 return 4085} 4086 4087// StopQuery API operation for Amazon CloudWatch Logs. 4088// 4089// Stops a CloudWatch Logs Insights query that is in progress. If the query 4090// has already ended, the operation returns an error indicating that the specified 4091// query is not running. 4092// 4093// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4094// with awserr.Error's Code and Message methods to get detailed information about 4095// the error. 4096// 4097// See the AWS API reference guide for Amazon CloudWatch Logs's 4098// API operation StopQuery for usage and error information. 4099// 4100// Returned Error Types: 4101// * InvalidParameterException 4102// A parameter is specified incorrectly. 4103// 4104// * ResourceNotFoundException 4105// The specified resource does not exist. 4106// 4107// * ServiceUnavailableException 4108// The service cannot complete the request. 4109// 4110// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery 4111func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { 4112 req, out := c.StopQueryRequest(input) 4113 return out, req.Send() 4114} 4115 4116// StopQueryWithContext is the same as StopQuery with the addition of 4117// the ability to pass a context and additional request options. 4118// 4119// See StopQuery for details on how to use this API operation. 4120// 4121// The context must be non-nil and will be used for request cancellation. If 4122// the context is nil a panic will occur. In the future the SDK may create 4123// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4124// for more information on using Contexts. 4125func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { 4126 req, out := c.StopQueryRequest(input) 4127 req.SetContext(ctx) 4128 req.ApplyOptions(opts...) 4129 return out, req.Send() 4130} 4131 4132const opTagLogGroup = "TagLogGroup" 4133 4134// TagLogGroupRequest generates a "aws/request.Request" representing the 4135// client's request for the TagLogGroup operation. The "output" return 4136// value will be populated with the request's response once the request completes 4137// successfully. 4138// 4139// Use "Send" method on the returned Request to send the API call to the service. 4140// the "output" return value is not valid until after Send returns without error. 4141// 4142// See TagLogGroup for more information on using the TagLogGroup 4143// API call, and error handling. 4144// 4145// This method is useful when you want to inject custom logic or configuration 4146// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4147// 4148// 4149// // Example sending a request using the TagLogGroupRequest method. 4150// req, resp := client.TagLogGroupRequest(params) 4151// 4152// err := req.Send() 4153// if err == nil { // resp is now filled 4154// fmt.Println(resp) 4155// } 4156// 4157// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup 4158func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) { 4159 op := &request.Operation{ 4160 Name: opTagLogGroup, 4161 HTTPMethod: "POST", 4162 HTTPPath: "/", 4163 } 4164 4165 if input == nil { 4166 input = &TagLogGroupInput{} 4167 } 4168 4169 output = &TagLogGroupOutput{} 4170 req = c.newRequest(op, input, output) 4171 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4172 return 4173} 4174 4175// TagLogGroup API operation for Amazon CloudWatch Logs. 4176// 4177// Adds or updates the specified tags for the specified log group. 4178// 4179// To list the tags for a log group, use ListTagsLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsLogGroup.html). 4180// To remove tags, use UntagLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagLogGroup.html). 4181// 4182// For more information about tags, see Tag Log Groups in Amazon CloudWatch 4183// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) 4184// in the Amazon CloudWatch Logs User Guide. 4185// 4186// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning 4187// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys 4188// condition keys. For more information about using tags to control access, 4189// see Controlling access to Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). 4190// 4191// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4192// with awserr.Error's Code and Message methods to get detailed information about 4193// the error. 4194// 4195// See the AWS API reference guide for Amazon CloudWatch Logs's 4196// API operation TagLogGroup for usage and error information. 4197// 4198// Returned Error Types: 4199// * ResourceNotFoundException 4200// The specified resource does not exist. 4201// 4202// * InvalidParameterException 4203// A parameter is specified incorrectly. 4204// 4205// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup 4206func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) { 4207 req, out := c.TagLogGroupRequest(input) 4208 return out, req.Send() 4209} 4210 4211// TagLogGroupWithContext is the same as TagLogGroup with the addition of 4212// the ability to pass a context and additional request options. 4213// 4214// See TagLogGroup for details on how to use this API operation. 4215// 4216// The context must be non-nil and will be used for request cancellation. If 4217// the context is nil a panic will occur. In the future the SDK may create 4218// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4219// for more information on using Contexts. 4220func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) { 4221 req, out := c.TagLogGroupRequest(input) 4222 req.SetContext(ctx) 4223 req.ApplyOptions(opts...) 4224 return out, req.Send() 4225} 4226 4227const opTestMetricFilter = "TestMetricFilter" 4228 4229// TestMetricFilterRequest generates a "aws/request.Request" representing the 4230// client's request for the TestMetricFilter operation. The "output" return 4231// value will be populated with the request's response once the request completes 4232// successfully. 4233// 4234// Use "Send" method on the returned Request to send the API call to the service. 4235// the "output" return value is not valid until after Send returns without error. 4236// 4237// See TestMetricFilter for more information on using the TestMetricFilter 4238// API call, and error handling. 4239// 4240// This method is useful when you want to inject custom logic or configuration 4241// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4242// 4243// 4244// // Example sending a request using the TestMetricFilterRequest method. 4245// req, resp := client.TestMetricFilterRequest(params) 4246// 4247// err := req.Send() 4248// if err == nil { // resp is now filled 4249// fmt.Println(resp) 4250// } 4251// 4252// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter 4253func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) { 4254 op := &request.Operation{ 4255 Name: opTestMetricFilter, 4256 HTTPMethod: "POST", 4257 HTTPPath: "/", 4258 } 4259 4260 if input == nil { 4261 input = &TestMetricFilterInput{} 4262 } 4263 4264 output = &TestMetricFilterOutput{} 4265 req = c.newRequest(op, input, output) 4266 return 4267} 4268 4269// TestMetricFilter API operation for Amazon CloudWatch Logs. 4270// 4271// Tests the filter pattern of a metric filter against a sample of log event 4272// messages. You can use this operation to validate the correctness of a metric 4273// filter pattern. 4274// 4275// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4276// with awserr.Error's Code and Message methods to get detailed information about 4277// the error. 4278// 4279// See the AWS API reference guide for Amazon CloudWatch Logs's 4280// API operation TestMetricFilter for usage and error information. 4281// 4282// Returned Error Types: 4283// * InvalidParameterException 4284// A parameter is specified incorrectly. 4285// 4286// * ServiceUnavailableException 4287// The service cannot complete the request. 4288// 4289// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter 4290func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) { 4291 req, out := c.TestMetricFilterRequest(input) 4292 return out, req.Send() 4293} 4294 4295// TestMetricFilterWithContext is the same as TestMetricFilter with the addition of 4296// the ability to pass a context and additional request options. 4297// 4298// See TestMetricFilter for details on how to use this API operation. 4299// 4300// The context must be non-nil and will be used for request cancellation. If 4301// the context is nil a panic will occur. In the future the SDK may create 4302// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4303// for more information on using Contexts. 4304func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) { 4305 req, out := c.TestMetricFilterRequest(input) 4306 req.SetContext(ctx) 4307 req.ApplyOptions(opts...) 4308 return out, req.Send() 4309} 4310 4311const opUntagLogGroup = "UntagLogGroup" 4312 4313// UntagLogGroupRequest generates a "aws/request.Request" representing the 4314// client's request for the UntagLogGroup operation. The "output" return 4315// value will be populated with the request's response once the request completes 4316// successfully. 4317// 4318// Use "Send" method on the returned Request to send the API call to the service. 4319// the "output" return value is not valid until after Send returns without error. 4320// 4321// See UntagLogGroup for more information on using the UntagLogGroup 4322// API call, and error handling. 4323// 4324// This method is useful when you want to inject custom logic or configuration 4325// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4326// 4327// 4328// // Example sending a request using the UntagLogGroupRequest method. 4329// req, resp := client.UntagLogGroupRequest(params) 4330// 4331// err := req.Send() 4332// if err == nil { // resp is now filled 4333// fmt.Println(resp) 4334// } 4335// 4336// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup 4337func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) { 4338 op := &request.Operation{ 4339 Name: opUntagLogGroup, 4340 HTTPMethod: "POST", 4341 HTTPPath: "/", 4342 } 4343 4344 if input == nil { 4345 input = &UntagLogGroupInput{} 4346 } 4347 4348 output = &UntagLogGroupOutput{} 4349 req = c.newRequest(op, input, output) 4350 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4351 return 4352} 4353 4354// UntagLogGroup API operation for Amazon CloudWatch Logs. 4355// 4356// Removes the specified tags from the specified log group. 4357// 4358// To list the tags for a log group, use ListTagsLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsLogGroup.html). 4359// To add tags, use TagLogGroup (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagLogGroup.html). 4360// 4361// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning 4362// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys 4363// condition keys. 4364// 4365// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4366// with awserr.Error's Code and Message methods to get detailed information about 4367// the error. 4368// 4369// See the AWS API reference guide for Amazon CloudWatch Logs's 4370// API operation UntagLogGroup for usage and error information. 4371// 4372// Returned Error Types: 4373// * ResourceNotFoundException 4374// The specified resource does not exist. 4375// 4376// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup 4377func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) { 4378 req, out := c.UntagLogGroupRequest(input) 4379 return out, req.Send() 4380} 4381 4382// UntagLogGroupWithContext is the same as UntagLogGroup with the addition of 4383// the ability to pass a context and additional request options. 4384// 4385// See UntagLogGroup for details on how to use this API operation. 4386// 4387// The context must be non-nil and will be used for request cancellation. If 4388// the context is nil a panic will occur. In the future the SDK may create 4389// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4390// for more information on using Contexts. 4391func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) { 4392 req, out := c.UntagLogGroupRequest(input) 4393 req.SetContext(ctx) 4394 req.ApplyOptions(opts...) 4395 return out, req.Send() 4396} 4397 4398type AssociateKmsKeyInput struct { 4399 _ struct{} `type:"structure"` 4400 4401 // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. 4402 // This must be a symmetric CMK. For more information, see Amazon Resource Names 4403 // - Key Management Service (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) 4404 // and Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). 4405 // 4406 // KmsKeyId is a required field 4407 KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` 4408 4409 // The name of the log group. 4410 // 4411 // LogGroupName is a required field 4412 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 4413} 4414 4415// String returns the string representation 4416func (s AssociateKmsKeyInput) String() string { 4417 return awsutil.Prettify(s) 4418} 4419 4420// GoString returns the string representation 4421func (s AssociateKmsKeyInput) GoString() string { 4422 return s.String() 4423} 4424 4425// Validate inspects the fields of the type to determine if they are valid. 4426func (s *AssociateKmsKeyInput) Validate() error { 4427 invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} 4428 if s.KmsKeyId == nil { 4429 invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) 4430 } 4431 if s.LogGroupName == nil { 4432 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 4433 } 4434 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 4435 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 4436 } 4437 4438 if invalidParams.Len() > 0 { 4439 return invalidParams 4440 } 4441 return nil 4442} 4443 4444// SetKmsKeyId sets the KmsKeyId field's value. 4445func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { 4446 s.KmsKeyId = &v 4447 return s 4448} 4449 4450// SetLogGroupName sets the LogGroupName field's value. 4451func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { 4452 s.LogGroupName = &v 4453 return s 4454} 4455 4456type AssociateKmsKeyOutput struct { 4457 _ struct{} `type:"structure"` 4458} 4459 4460// String returns the string representation 4461func (s AssociateKmsKeyOutput) String() string { 4462 return awsutil.Prettify(s) 4463} 4464 4465// GoString returns the string representation 4466func (s AssociateKmsKeyOutput) GoString() string { 4467 return s.String() 4468} 4469 4470type CancelExportTaskInput struct { 4471 _ struct{} `type:"structure"` 4472 4473 // The ID of the export task. 4474 // 4475 // TaskId is a required field 4476 TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` 4477} 4478 4479// String returns the string representation 4480func (s CancelExportTaskInput) String() string { 4481 return awsutil.Prettify(s) 4482} 4483 4484// GoString returns the string representation 4485func (s CancelExportTaskInput) GoString() string { 4486 return s.String() 4487} 4488 4489// Validate inspects the fields of the type to determine if they are valid. 4490func (s *CancelExportTaskInput) Validate() error { 4491 invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} 4492 if s.TaskId == nil { 4493 invalidParams.Add(request.NewErrParamRequired("TaskId")) 4494 } 4495 if s.TaskId != nil && len(*s.TaskId) < 1 { 4496 invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) 4497 } 4498 4499 if invalidParams.Len() > 0 { 4500 return invalidParams 4501 } 4502 return nil 4503} 4504 4505// SetTaskId sets the TaskId field's value. 4506func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput { 4507 s.TaskId = &v 4508 return s 4509} 4510 4511type CancelExportTaskOutput struct { 4512 _ struct{} `type:"structure"` 4513} 4514 4515// String returns the string representation 4516func (s CancelExportTaskOutput) String() string { 4517 return awsutil.Prettify(s) 4518} 4519 4520// GoString returns the string representation 4521func (s CancelExportTaskOutput) GoString() string { 4522 return s.String() 4523} 4524 4525type CreateExportTaskInput struct { 4526 _ struct{} `type:"structure"` 4527 4528 // The name of S3 bucket for the exported log data. The bucket must be in the 4529 // same Amazon Web Services region. 4530 // 4531 // Destination is a required field 4532 Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` 4533 4534 // The prefix used as the start of the key for every object exported. If you 4535 // don't specify a value, the default is exportedlogs. 4536 DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` 4537 4538 // The start time of the range for the request, expressed as the number of milliseconds 4539 // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this 4540 // time are not exported. 4541 // 4542 // From is a required field 4543 From *int64 `locationName:"from" type:"long" required:"true"` 4544 4545 // The name of the log group. 4546 // 4547 // LogGroupName is a required field 4548 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 4549 4550 // Export only log streams that match the provided prefix. If you don't specify 4551 // a value, no prefix filter is applied. 4552 LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` 4553 4554 // The name of the export task. 4555 TaskName *string `locationName:"taskName" min:"1" type:"string"` 4556 4557 // The end time of the range for the request, expreswatchlogsdocused as the 4558 // number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp 4559 // later than this time are not exported. 4560 // 4561 // To is a required field 4562 To *int64 `locationName:"to" type:"long" required:"true"` 4563} 4564 4565// String returns the string representation 4566func (s CreateExportTaskInput) String() string { 4567 return awsutil.Prettify(s) 4568} 4569 4570// GoString returns the string representation 4571func (s CreateExportTaskInput) GoString() string { 4572 return s.String() 4573} 4574 4575// Validate inspects the fields of the type to determine if they are valid. 4576func (s *CreateExportTaskInput) Validate() error { 4577 invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} 4578 if s.Destination == nil { 4579 invalidParams.Add(request.NewErrParamRequired("Destination")) 4580 } 4581 if s.Destination != nil && len(*s.Destination) < 1 { 4582 invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) 4583 } 4584 if s.From == nil { 4585 invalidParams.Add(request.NewErrParamRequired("From")) 4586 } 4587 if s.LogGroupName == nil { 4588 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 4589 } 4590 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 4591 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 4592 } 4593 if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { 4594 invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) 4595 } 4596 if s.TaskName != nil && len(*s.TaskName) < 1 { 4597 invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) 4598 } 4599 if s.To == nil { 4600 invalidParams.Add(request.NewErrParamRequired("To")) 4601 } 4602 4603 if invalidParams.Len() > 0 { 4604 return invalidParams 4605 } 4606 return nil 4607} 4608 4609// SetDestination sets the Destination field's value. 4610func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput { 4611 s.Destination = &v 4612 return s 4613} 4614 4615// SetDestinationPrefix sets the DestinationPrefix field's value. 4616func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput { 4617 s.DestinationPrefix = &v 4618 return s 4619} 4620 4621// SetFrom sets the From field's value. 4622func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput { 4623 s.From = &v 4624 return s 4625} 4626 4627// SetLogGroupName sets the LogGroupName field's value. 4628func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput { 4629 s.LogGroupName = &v 4630 return s 4631} 4632 4633// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. 4634func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput { 4635 s.LogStreamNamePrefix = &v 4636 return s 4637} 4638 4639// SetTaskName sets the TaskName field's value. 4640func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput { 4641 s.TaskName = &v 4642 return s 4643} 4644 4645// SetTo sets the To field's value. 4646func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput { 4647 s.To = &v 4648 return s 4649} 4650 4651type CreateExportTaskOutput struct { 4652 _ struct{} `type:"structure"` 4653 4654 // The ID of the export task. 4655 TaskId *string `locationName:"taskId" min:"1" type:"string"` 4656} 4657 4658// String returns the string representation 4659func (s CreateExportTaskOutput) String() string { 4660 return awsutil.Prettify(s) 4661} 4662 4663// GoString returns the string representation 4664func (s CreateExportTaskOutput) GoString() string { 4665 return s.String() 4666} 4667 4668// SetTaskId sets the TaskId field's value. 4669func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { 4670 s.TaskId = &v 4671 return s 4672} 4673 4674type CreateLogGroupInput struct { 4675 _ struct{} `type:"structure"` 4676 4677 // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. 4678 // For more information, see Amazon Resource Names - Key Management Service 4679 // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). 4680 KmsKeyId *string `locationName:"kmsKeyId" type:"string"` 4681 4682 // The name of the log group. 4683 // 4684 // LogGroupName is a required field 4685 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 4686 4687 // The key-value pairs to use for the tags. 4688 // 4689 // CloudWatch Logs doesn’t support IAM policies that prevent users from assigning 4690 // specified tags to log groups using the aws:Resource/key-name or aws:TagKeys 4691 // condition keys. For more information about using tags to control access, 4692 // see Controlling access to Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). 4693 Tags map[string]*string `locationName:"tags" min:"1" type:"map"` 4694} 4695 4696// String returns the string representation 4697func (s CreateLogGroupInput) String() string { 4698 return awsutil.Prettify(s) 4699} 4700 4701// GoString returns the string representation 4702func (s CreateLogGroupInput) GoString() string { 4703 return s.String() 4704} 4705 4706// Validate inspects the fields of the type to determine if they are valid. 4707func (s *CreateLogGroupInput) Validate() error { 4708 invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} 4709 if s.LogGroupName == nil { 4710 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 4711 } 4712 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 4713 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 4714 } 4715 if s.Tags != nil && len(s.Tags) < 1 { 4716 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 4717 } 4718 4719 if invalidParams.Len() > 0 { 4720 return invalidParams 4721 } 4722 return nil 4723} 4724 4725// SetKmsKeyId sets the KmsKeyId field's value. 4726func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { 4727 s.KmsKeyId = &v 4728 return s 4729} 4730 4731// SetLogGroupName sets the LogGroupName field's value. 4732func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { 4733 s.LogGroupName = &v 4734 return s 4735} 4736 4737// SetTags sets the Tags field's value. 4738func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput { 4739 s.Tags = v 4740 return s 4741} 4742 4743type CreateLogGroupOutput struct { 4744 _ struct{} `type:"structure"` 4745} 4746 4747// String returns the string representation 4748func (s CreateLogGroupOutput) String() string { 4749 return awsutil.Prettify(s) 4750} 4751 4752// GoString returns the string representation 4753func (s CreateLogGroupOutput) GoString() string { 4754 return s.String() 4755} 4756 4757type CreateLogStreamInput struct { 4758 _ struct{} `type:"structure"` 4759 4760 // The name of the log group. 4761 // 4762 // LogGroupName is a required field 4763 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 4764 4765 // The name of the log stream. 4766 // 4767 // LogStreamName is a required field 4768 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` 4769} 4770 4771// String returns the string representation 4772func (s CreateLogStreamInput) String() string { 4773 return awsutil.Prettify(s) 4774} 4775 4776// GoString returns the string representation 4777func (s CreateLogStreamInput) GoString() string { 4778 return s.String() 4779} 4780 4781// Validate inspects the fields of the type to determine if they are valid. 4782func (s *CreateLogStreamInput) Validate() error { 4783 invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} 4784 if s.LogGroupName == nil { 4785 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 4786 } 4787 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 4788 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 4789 } 4790 if s.LogStreamName == nil { 4791 invalidParams.Add(request.NewErrParamRequired("LogStreamName")) 4792 } 4793 if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { 4794 invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) 4795 } 4796 4797 if invalidParams.Len() > 0 { 4798 return invalidParams 4799 } 4800 return nil 4801} 4802 4803// SetLogGroupName sets the LogGroupName field's value. 4804func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput { 4805 s.LogGroupName = &v 4806 return s 4807} 4808 4809// SetLogStreamName sets the LogStreamName field's value. 4810func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput { 4811 s.LogStreamName = &v 4812 return s 4813} 4814 4815type CreateLogStreamOutput struct { 4816 _ struct{} `type:"structure"` 4817} 4818 4819// String returns the string representation 4820func (s CreateLogStreamOutput) String() string { 4821 return awsutil.Prettify(s) 4822} 4823 4824// GoString returns the string representation 4825func (s CreateLogStreamOutput) GoString() string { 4826 return s.String() 4827} 4828 4829// The event was already logged. 4830type DataAlreadyAcceptedException struct { 4831 _ struct{} `type:"structure"` 4832 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4833 4834 ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` 4835 4836 Message_ *string `locationName:"message" type:"string"` 4837} 4838 4839// String returns the string representation 4840func (s DataAlreadyAcceptedException) String() string { 4841 return awsutil.Prettify(s) 4842} 4843 4844// GoString returns the string representation 4845func (s DataAlreadyAcceptedException) GoString() string { 4846 return s.String() 4847} 4848 4849func newErrorDataAlreadyAcceptedException(v protocol.ResponseMetadata) error { 4850 return &DataAlreadyAcceptedException{ 4851 RespMetadata: v, 4852 } 4853} 4854 4855// Code returns the exception type name. 4856func (s *DataAlreadyAcceptedException) Code() string { 4857 return "DataAlreadyAcceptedException" 4858} 4859 4860// Message returns the exception's message. 4861func (s *DataAlreadyAcceptedException) Message() string { 4862 if s.Message_ != nil { 4863 return *s.Message_ 4864 } 4865 return "" 4866} 4867 4868// OrigErr always returns nil, satisfies awserr.Error interface. 4869func (s *DataAlreadyAcceptedException) OrigErr() error { 4870 return nil 4871} 4872 4873func (s *DataAlreadyAcceptedException) Error() string { 4874 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4875} 4876 4877// Status code returns the HTTP status code for the request's response error. 4878func (s *DataAlreadyAcceptedException) StatusCode() int { 4879 return s.RespMetadata.StatusCode 4880} 4881 4882// RequestID returns the service's response RequestID for request. 4883func (s *DataAlreadyAcceptedException) RequestID() string { 4884 return s.RespMetadata.RequestID 4885} 4886 4887type DeleteDestinationInput struct { 4888 _ struct{} `type:"structure"` 4889 4890 // The name of the destination. 4891 // 4892 // DestinationName is a required field 4893 DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` 4894} 4895 4896// String returns the string representation 4897func (s DeleteDestinationInput) String() string { 4898 return awsutil.Prettify(s) 4899} 4900 4901// GoString returns the string representation 4902func (s DeleteDestinationInput) GoString() string { 4903 return s.String() 4904} 4905 4906// Validate inspects the fields of the type to determine if they are valid. 4907func (s *DeleteDestinationInput) Validate() error { 4908 invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} 4909 if s.DestinationName == nil { 4910 invalidParams.Add(request.NewErrParamRequired("DestinationName")) 4911 } 4912 if s.DestinationName != nil && len(*s.DestinationName) < 1 { 4913 invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) 4914 } 4915 4916 if invalidParams.Len() > 0 { 4917 return invalidParams 4918 } 4919 return nil 4920} 4921 4922// SetDestinationName sets the DestinationName field's value. 4923func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput { 4924 s.DestinationName = &v 4925 return s 4926} 4927 4928type DeleteDestinationOutput struct { 4929 _ struct{} `type:"structure"` 4930} 4931 4932// String returns the string representation 4933func (s DeleteDestinationOutput) String() string { 4934 return awsutil.Prettify(s) 4935} 4936 4937// GoString returns the string representation 4938func (s DeleteDestinationOutput) GoString() string { 4939 return s.String() 4940} 4941 4942type DeleteLogGroupInput struct { 4943 _ struct{} `type:"structure"` 4944 4945 // The name of the log group. 4946 // 4947 // LogGroupName is a required field 4948 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 4949} 4950 4951// String returns the string representation 4952func (s DeleteLogGroupInput) String() string { 4953 return awsutil.Prettify(s) 4954} 4955 4956// GoString returns the string representation 4957func (s DeleteLogGroupInput) GoString() string { 4958 return s.String() 4959} 4960 4961// Validate inspects the fields of the type to determine if they are valid. 4962func (s *DeleteLogGroupInput) Validate() error { 4963 invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} 4964 if s.LogGroupName == nil { 4965 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 4966 } 4967 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 4968 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 4969 } 4970 4971 if invalidParams.Len() > 0 { 4972 return invalidParams 4973 } 4974 return nil 4975} 4976 4977// SetLogGroupName sets the LogGroupName field's value. 4978func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput { 4979 s.LogGroupName = &v 4980 return s 4981} 4982 4983type DeleteLogGroupOutput struct { 4984 _ struct{} `type:"structure"` 4985} 4986 4987// String returns the string representation 4988func (s DeleteLogGroupOutput) String() string { 4989 return awsutil.Prettify(s) 4990} 4991 4992// GoString returns the string representation 4993func (s DeleteLogGroupOutput) GoString() string { 4994 return s.String() 4995} 4996 4997type DeleteLogStreamInput struct { 4998 _ struct{} `type:"structure"` 4999 5000 // The name of the log group. 5001 // 5002 // LogGroupName is a required field 5003 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 5004 5005 // The name of the log stream. 5006 // 5007 // LogStreamName is a required field 5008 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` 5009} 5010 5011// String returns the string representation 5012func (s DeleteLogStreamInput) String() string { 5013 return awsutil.Prettify(s) 5014} 5015 5016// GoString returns the string representation 5017func (s DeleteLogStreamInput) GoString() string { 5018 return s.String() 5019} 5020 5021// Validate inspects the fields of the type to determine if they are valid. 5022func (s *DeleteLogStreamInput) Validate() error { 5023 invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} 5024 if s.LogGroupName == nil { 5025 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 5026 } 5027 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5028 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5029 } 5030 if s.LogStreamName == nil { 5031 invalidParams.Add(request.NewErrParamRequired("LogStreamName")) 5032 } 5033 if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { 5034 invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) 5035 } 5036 5037 if invalidParams.Len() > 0 { 5038 return invalidParams 5039 } 5040 return nil 5041} 5042 5043// SetLogGroupName sets the LogGroupName field's value. 5044func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput { 5045 s.LogGroupName = &v 5046 return s 5047} 5048 5049// SetLogStreamName sets the LogStreamName field's value. 5050func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput { 5051 s.LogStreamName = &v 5052 return s 5053} 5054 5055type DeleteLogStreamOutput struct { 5056 _ struct{} `type:"structure"` 5057} 5058 5059// String returns the string representation 5060func (s DeleteLogStreamOutput) String() string { 5061 return awsutil.Prettify(s) 5062} 5063 5064// GoString returns the string representation 5065func (s DeleteLogStreamOutput) GoString() string { 5066 return s.String() 5067} 5068 5069type DeleteMetricFilterInput struct { 5070 _ struct{} `type:"structure"` 5071 5072 // The name of the metric filter. 5073 // 5074 // FilterName is a required field 5075 FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` 5076 5077 // The name of the log group. 5078 // 5079 // LogGroupName is a required field 5080 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 5081} 5082 5083// String returns the string representation 5084func (s DeleteMetricFilterInput) String() string { 5085 return awsutil.Prettify(s) 5086} 5087 5088// GoString returns the string representation 5089func (s DeleteMetricFilterInput) GoString() string { 5090 return s.String() 5091} 5092 5093// Validate inspects the fields of the type to determine if they are valid. 5094func (s *DeleteMetricFilterInput) Validate() error { 5095 invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} 5096 if s.FilterName == nil { 5097 invalidParams.Add(request.NewErrParamRequired("FilterName")) 5098 } 5099 if s.FilterName != nil && len(*s.FilterName) < 1 { 5100 invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) 5101 } 5102 if s.LogGroupName == nil { 5103 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 5104 } 5105 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5106 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5107 } 5108 5109 if invalidParams.Len() > 0 { 5110 return invalidParams 5111 } 5112 return nil 5113} 5114 5115// SetFilterName sets the FilterName field's value. 5116func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput { 5117 s.FilterName = &v 5118 return s 5119} 5120 5121// SetLogGroupName sets the LogGroupName field's value. 5122func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput { 5123 s.LogGroupName = &v 5124 return s 5125} 5126 5127type DeleteMetricFilterOutput struct { 5128 _ struct{} `type:"structure"` 5129} 5130 5131// String returns the string representation 5132func (s DeleteMetricFilterOutput) String() string { 5133 return awsutil.Prettify(s) 5134} 5135 5136// GoString returns the string representation 5137func (s DeleteMetricFilterOutput) GoString() string { 5138 return s.String() 5139} 5140 5141type DeleteQueryDefinitionInput struct { 5142 _ struct{} `type:"structure"` 5143 5144 // The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions 5145 // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html) 5146 // to retrieve the IDs of your saved query definitions. 5147 // 5148 // QueryDefinitionId is a required field 5149 QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string" required:"true"` 5150} 5151 5152// String returns the string representation 5153func (s DeleteQueryDefinitionInput) String() string { 5154 return awsutil.Prettify(s) 5155} 5156 5157// GoString returns the string representation 5158func (s DeleteQueryDefinitionInput) GoString() string { 5159 return s.String() 5160} 5161 5162// Validate inspects the fields of the type to determine if they are valid. 5163func (s *DeleteQueryDefinitionInput) Validate() error { 5164 invalidParams := request.ErrInvalidParams{Context: "DeleteQueryDefinitionInput"} 5165 if s.QueryDefinitionId == nil { 5166 invalidParams.Add(request.NewErrParamRequired("QueryDefinitionId")) 5167 } 5168 5169 if invalidParams.Len() > 0 { 5170 return invalidParams 5171 } 5172 return nil 5173} 5174 5175// SetQueryDefinitionId sets the QueryDefinitionId field's value. 5176func (s *DeleteQueryDefinitionInput) SetQueryDefinitionId(v string) *DeleteQueryDefinitionInput { 5177 s.QueryDefinitionId = &v 5178 return s 5179} 5180 5181type DeleteQueryDefinitionOutput struct { 5182 _ struct{} `type:"structure"` 5183 5184 // A value of TRUE indicates that the operation succeeded. FALSE indicates that 5185 // the operation failed. 5186 Success *bool `locationName:"success" type:"boolean"` 5187} 5188 5189// String returns the string representation 5190func (s DeleteQueryDefinitionOutput) String() string { 5191 return awsutil.Prettify(s) 5192} 5193 5194// GoString returns the string representation 5195func (s DeleteQueryDefinitionOutput) GoString() string { 5196 return s.String() 5197} 5198 5199// SetSuccess sets the Success field's value. 5200func (s *DeleteQueryDefinitionOutput) SetSuccess(v bool) *DeleteQueryDefinitionOutput { 5201 s.Success = &v 5202 return s 5203} 5204 5205type DeleteResourcePolicyInput struct { 5206 _ struct{} `type:"structure"` 5207 5208 // The name of the policy to be revoked. This parameter is required. 5209 PolicyName *string `locationName:"policyName" type:"string"` 5210} 5211 5212// String returns the string representation 5213func (s DeleteResourcePolicyInput) String() string { 5214 return awsutil.Prettify(s) 5215} 5216 5217// GoString returns the string representation 5218func (s DeleteResourcePolicyInput) GoString() string { 5219 return s.String() 5220} 5221 5222// SetPolicyName sets the PolicyName field's value. 5223func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { 5224 s.PolicyName = &v 5225 return s 5226} 5227 5228type DeleteResourcePolicyOutput struct { 5229 _ struct{} `type:"structure"` 5230} 5231 5232// String returns the string representation 5233func (s DeleteResourcePolicyOutput) String() string { 5234 return awsutil.Prettify(s) 5235} 5236 5237// GoString returns the string representation 5238func (s DeleteResourcePolicyOutput) GoString() string { 5239 return s.String() 5240} 5241 5242type DeleteRetentionPolicyInput struct { 5243 _ struct{} `type:"structure"` 5244 5245 // The name of the log group. 5246 // 5247 // LogGroupName is a required field 5248 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 5249} 5250 5251// String returns the string representation 5252func (s DeleteRetentionPolicyInput) String() string { 5253 return awsutil.Prettify(s) 5254} 5255 5256// GoString returns the string representation 5257func (s DeleteRetentionPolicyInput) GoString() string { 5258 return s.String() 5259} 5260 5261// Validate inspects the fields of the type to determine if they are valid. 5262func (s *DeleteRetentionPolicyInput) Validate() error { 5263 invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} 5264 if s.LogGroupName == nil { 5265 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 5266 } 5267 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5268 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5269 } 5270 5271 if invalidParams.Len() > 0 { 5272 return invalidParams 5273 } 5274 return nil 5275} 5276 5277// SetLogGroupName sets the LogGroupName field's value. 5278func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput { 5279 s.LogGroupName = &v 5280 return s 5281} 5282 5283type DeleteRetentionPolicyOutput struct { 5284 _ struct{} `type:"structure"` 5285} 5286 5287// String returns the string representation 5288func (s DeleteRetentionPolicyOutput) String() string { 5289 return awsutil.Prettify(s) 5290} 5291 5292// GoString returns the string representation 5293func (s DeleteRetentionPolicyOutput) GoString() string { 5294 return s.String() 5295} 5296 5297type DeleteSubscriptionFilterInput struct { 5298 _ struct{} `type:"structure"` 5299 5300 // The name of the subscription filter. 5301 // 5302 // FilterName is a required field 5303 FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` 5304 5305 // The name of the log group. 5306 // 5307 // LogGroupName is a required field 5308 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 5309} 5310 5311// String returns the string representation 5312func (s DeleteSubscriptionFilterInput) String() string { 5313 return awsutil.Prettify(s) 5314} 5315 5316// GoString returns the string representation 5317func (s DeleteSubscriptionFilterInput) GoString() string { 5318 return s.String() 5319} 5320 5321// Validate inspects the fields of the type to determine if they are valid. 5322func (s *DeleteSubscriptionFilterInput) Validate() error { 5323 invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} 5324 if s.FilterName == nil { 5325 invalidParams.Add(request.NewErrParamRequired("FilterName")) 5326 } 5327 if s.FilterName != nil && len(*s.FilterName) < 1 { 5328 invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) 5329 } 5330 if s.LogGroupName == nil { 5331 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 5332 } 5333 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5334 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5335 } 5336 5337 if invalidParams.Len() > 0 { 5338 return invalidParams 5339 } 5340 return nil 5341} 5342 5343// SetFilterName sets the FilterName field's value. 5344func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput { 5345 s.FilterName = &v 5346 return s 5347} 5348 5349// SetLogGroupName sets the LogGroupName field's value. 5350func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput { 5351 s.LogGroupName = &v 5352 return s 5353} 5354 5355type DeleteSubscriptionFilterOutput struct { 5356 _ struct{} `type:"structure"` 5357} 5358 5359// String returns the string representation 5360func (s DeleteSubscriptionFilterOutput) String() string { 5361 return awsutil.Prettify(s) 5362} 5363 5364// GoString returns the string representation 5365func (s DeleteSubscriptionFilterOutput) GoString() string { 5366 return s.String() 5367} 5368 5369type DescribeDestinationsInput struct { 5370 _ struct{} `type:"structure"` 5371 5372 // The prefix to match. If you don't specify a value, no prefix filter is applied. 5373 DestinationNamePrefix *string `min:"1" type:"string"` 5374 5375 // The maximum number of items returned. If you don't specify a value, the default 5376 // is up to 50 items. 5377 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 5378 5379 // The token for the next set of items to return. (You received this token from 5380 // a previous call.) 5381 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5382} 5383 5384// String returns the string representation 5385func (s DescribeDestinationsInput) String() string { 5386 return awsutil.Prettify(s) 5387} 5388 5389// GoString returns the string representation 5390func (s DescribeDestinationsInput) GoString() string { 5391 return s.String() 5392} 5393 5394// Validate inspects the fields of the type to determine if they are valid. 5395func (s *DescribeDestinationsInput) Validate() error { 5396 invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} 5397 if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { 5398 invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) 5399 } 5400 if s.Limit != nil && *s.Limit < 1 { 5401 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5402 } 5403 if s.NextToken != nil && len(*s.NextToken) < 1 { 5404 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5405 } 5406 5407 if invalidParams.Len() > 0 { 5408 return invalidParams 5409 } 5410 return nil 5411} 5412 5413// SetDestinationNamePrefix sets the DestinationNamePrefix field's value. 5414func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput { 5415 s.DestinationNamePrefix = &v 5416 return s 5417} 5418 5419// SetLimit sets the Limit field's value. 5420func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput { 5421 s.Limit = &v 5422 return s 5423} 5424 5425// SetNextToken sets the NextToken field's value. 5426func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput { 5427 s.NextToken = &v 5428 return s 5429} 5430 5431type DescribeDestinationsOutput struct { 5432 _ struct{} `type:"structure"` 5433 5434 // The destinations. 5435 Destinations []*Destination `locationName:"destinations" type:"list"` 5436 5437 // The token for the next set of items to return. The token expires after 24 5438 // hours. 5439 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5440} 5441 5442// String returns the string representation 5443func (s DescribeDestinationsOutput) String() string { 5444 return awsutil.Prettify(s) 5445} 5446 5447// GoString returns the string representation 5448func (s DescribeDestinationsOutput) GoString() string { 5449 return s.String() 5450} 5451 5452// SetDestinations sets the Destinations field's value. 5453func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput { 5454 s.Destinations = v 5455 return s 5456} 5457 5458// SetNextToken sets the NextToken field's value. 5459func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput { 5460 s.NextToken = &v 5461 return s 5462} 5463 5464type DescribeExportTasksInput struct { 5465 _ struct{} `type:"structure"` 5466 5467 // The maximum number of items returned. If you don't specify a value, the default 5468 // is up to 50 items. 5469 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 5470 5471 // The token for the next set of items to return. (You received this token from 5472 // a previous call.) 5473 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5474 5475 // The status code of the export task. Specifying a status code filters the 5476 // results to zero or more export tasks. 5477 StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` 5478 5479 // The ID of the export task. Specifying a task ID filters the results to zero 5480 // or one export tasks. 5481 TaskId *string `locationName:"taskId" min:"1" type:"string"` 5482} 5483 5484// String returns the string representation 5485func (s DescribeExportTasksInput) String() string { 5486 return awsutil.Prettify(s) 5487} 5488 5489// GoString returns the string representation 5490func (s DescribeExportTasksInput) GoString() string { 5491 return s.String() 5492} 5493 5494// Validate inspects the fields of the type to determine if they are valid. 5495func (s *DescribeExportTasksInput) Validate() error { 5496 invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} 5497 if s.Limit != nil && *s.Limit < 1 { 5498 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5499 } 5500 if s.NextToken != nil && len(*s.NextToken) < 1 { 5501 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5502 } 5503 if s.TaskId != nil && len(*s.TaskId) < 1 { 5504 invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) 5505 } 5506 5507 if invalidParams.Len() > 0 { 5508 return invalidParams 5509 } 5510 return nil 5511} 5512 5513// SetLimit sets the Limit field's value. 5514func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput { 5515 s.Limit = &v 5516 return s 5517} 5518 5519// SetNextToken sets the NextToken field's value. 5520func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput { 5521 s.NextToken = &v 5522 return s 5523} 5524 5525// SetStatusCode sets the StatusCode field's value. 5526func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput { 5527 s.StatusCode = &v 5528 return s 5529} 5530 5531// SetTaskId sets the TaskId field's value. 5532func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput { 5533 s.TaskId = &v 5534 return s 5535} 5536 5537type DescribeExportTasksOutput struct { 5538 _ struct{} `type:"structure"` 5539 5540 // The export tasks. 5541 ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` 5542 5543 // The token for the next set of items to return. The token expires after 24 5544 // hours. 5545 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5546} 5547 5548// String returns the string representation 5549func (s DescribeExportTasksOutput) String() string { 5550 return awsutil.Prettify(s) 5551} 5552 5553// GoString returns the string representation 5554func (s DescribeExportTasksOutput) GoString() string { 5555 return s.String() 5556} 5557 5558// SetExportTasks sets the ExportTasks field's value. 5559func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { 5560 s.ExportTasks = v 5561 return s 5562} 5563 5564// SetNextToken sets the NextToken field's value. 5565func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput { 5566 s.NextToken = &v 5567 return s 5568} 5569 5570type DescribeLogGroupsInput struct { 5571 _ struct{} `type:"structure"` 5572 5573 // The maximum number of items returned. If you don't specify a value, the default 5574 // is up to 50 items. 5575 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 5576 5577 // The prefix to match. 5578 LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` 5579 5580 // The token for the next set of items to return. (You received this token from 5581 // a previous call.) 5582 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5583} 5584 5585// String returns the string representation 5586func (s DescribeLogGroupsInput) String() string { 5587 return awsutil.Prettify(s) 5588} 5589 5590// GoString returns the string representation 5591func (s DescribeLogGroupsInput) GoString() string { 5592 return s.String() 5593} 5594 5595// Validate inspects the fields of the type to determine if they are valid. 5596func (s *DescribeLogGroupsInput) Validate() error { 5597 invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} 5598 if s.Limit != nil && *s.Limit < 1 { 5599 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5600 } 5601 if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { 5602 invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) 5603 } 5604 if s.NextToken != nil && len(*s.NextToken) < 1 { 5605 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5606 } 5607 5608 if invalidParams.Len() > 0 { 5609 return invalidParams 5610 } 5611 return nil 5612} 5613 5614// SetLimit sets the Limit field's value. 5615func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput { 5616 s.Limit = &v 5617 return s 5618} 5619 5620// SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value. 5621func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput { 5622 s.LogGroupNamePrefix = &v 5623 return s 5624} 5625 5626// SetNextToken sets the NextToken field's value. 5627func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput { 5628 s.NextToken = &v 5629 return s 5630} 5631 5632type DescribeLogGroupsOutput struct { 5633 _ struct{} `type:"structure"` 5634 5635 // The log groups. 5636 // 5637 // If the retentionInDays value if not included for a log group, then that log 5638 // group is set to have its events never expire. 5639 LogGroups []*LogGroup `locationName:"logGroups" type:"list"` 5640 5641 // The token for the next set of items to return. The token expires after 24 5642 // hours. 5643 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5644} 5645 5646// String returns the string representation 5647func (s DescribeLogGroupsOutput) String() string { 5648 return awsutil.Prettify(s) 5649} 5650 5651// GoString returns the string representation 5652func (s DescribeLogGroupsOutput) GoString() string { 5653 return s.String() 5654} 5655 5656// SetLogGroups sets the LogGroups field's value. 5657func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput { 5658 s.LogGroups = v 5659 return s 5660} 5661 5662// SetNextToken sets the NextToken field's value. 5663func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput { 5664 s.NextToken = &v 5665 return s 5666} 5667 5668type DescribeLogStreamsInput struct { 5669 _ struct{} `type:"structure"` 5670 5671 // If the value is true, results are returned in descending order. If the value 5672 // is to false, results are returned in ascending order. The default value is 5673 // false. 5674 Descending *bool `locationName:"descending" type:"boolean"` 5675 5676 // The maximum number of items returned. If you don't specify a value, the default 5677 // is up to 50 items. 5678 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 5679 5680 // The name of the log group. 5681 // 5682 // LogGroupName is a required field 5683 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 5684 5685 // The prefix to match. 5686 // 5687 // If orderBy is LastEventTime, you cannot specify this parameter. 5688 LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` 5689 5690 // The token for the next set of items to return. (You received this token from 5691 // a previous call.) 5692 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5693 5694 // If the value is LogStreamName, the results are ordered by log stream name. 5695 // If the value is LastEventTime, the results are ordered by the event time. 5696 // The default value is LogStreamName. 5697 // 5698 // If you order the results by event time, you cannot specify the logStreamNamePrefix 5699 // parameter. 5700 // 5701 // lastEventTimestamp represents the time of the most recent log event in the 5702 // log stream in CloudWatch Logs. This number is expressed as the number of 5703 // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on 5704 // an eventual consistency basis. It typically updates in less than an hour 5705 // from ingestion, but in rare situations might take longer. 5706 OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` 5707} 5708 5709// String returns the string representation 5710func (s DescribeLogStreamsInput) String() string { 5711 return awsutil.Prettify(s) 5712} 5713 5714// GoString returns the string representation 5715func (s DescribeLogStreamsInput) GoString() string { 5716 return s.String() 5717} 5718 5719// Validate inspects the fields of the type to determine if they are valid. 5720func (s *DescribeLogStreamsInput) Validate() error { 5721 invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} 5722 if s.Limit != nil && *s.Limit < 1 { 5723 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5724 } 5725 if s.LogGroupName == nil { 5726 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 5727 } 5728 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5729 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5730 } 5731 if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { 5732 invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) 5733 } 5734 if s.NextToken != nil && len(*s.NextToken) < 1 { 5735 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5736 } 5737 5738 if invalidParams.Len() > 0 { 5739 return invalidParams 5740 } 5741 return nil 5742} 5743 5744// SetDescending sets the Descending field's value. 5745func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput { 5746 s.Descending = &v 5747 return s 5748} 5749 5750// SetLimit sets the Limit field's value. 5751func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput { 5752 s.Limit = &v 5753 return s 5754} 5755 5756// SetLogGroupName sets the LogGroupName field's value. 5757func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput { 5758 s.LogGroupName = &v 5759 return s 5760} 5761 5762// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. 5763func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput { 5764 s.LogStreamNamePrefix = &v 5765 return s 5766} 5767 5768// SetNextToken sets the NextToken field's value. 5769func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput { 5770 s.NextToken = &v 5771 return s 5772} 5773 5774// SetOrderBy sets the OrderBy field's value. 5775func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput { 5776 s.OrderBy = &v 5777 return s 5778} 5779 5780type DescribeLogStreamsOutput struct { 5781 _ struct{} `type:"structure"` 5782 5783 // The log streams. 5784 LogStreams []*LogStream `locationName:"logStreams" type:"list"` 5785 5786 // The token for the next set of items to return. The token expires after 24 5787 // hours. 5788 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5789} 5790 5791// String returns the string representation 5792func (s DescribeLogStreamsOutput) String() string { 5793 return awsutil.Prettify(s) 5794} 5795 5796// GoString returns the string representation 5797func (s DescribeLogStreamsOutput) GoString() string { 5798 return s.String() 5799} 5800 5801// SetLogStreams sets the LogStreams field's value. 5802func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput { 5803 s.LogStreams = v 5804 return s 5805} 5806 5807// SetNextToken sets the NextToken field's value. 5808func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput { 5809 s.NextToken = &v 5810 return s 5811} 5812 5813type DescribeMetricFiltersInput struct { 5814 _ struct{} `type:"structure"` 5815 5816 // The prefix to match. CloudWatch Logs uses the value you set here only if 5817 // you also include the logGroupName parameter in your request. 5818 FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` 5819 5820 // The maximum number of items returned. If you don't specify a value, the default 5821 // is up to 50 items. 5822 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 5823 5824 // The name of the log group. 5825 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 5826 5827 // Filters results to include only those with the specified metric name. If 5828 // you include this parameter in your request, you must also include the metricNamespace 5829 // parameter. 5830 MetricName *string `locationName:"metricName" type:"string"` 5831 5832 // Filters results to include only those in the specified namespace. If you 5833 // include this parameter in your request, you must also include the metricName 5834 // parameter. 5835 MetricNamespace *string `locationName:"metricNamespace" type:"string"` 5836 5837 // The token for the next set of items to return. (You received this token from 5838 // a previous call.) 5839 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5840} 5841 5842// String returns the string representation 5843func (s DescribeMetricFiltersInput) String() string { 5844 return awsutil.Prettify(s) 5845} 5846 5847// GoString returns the string representation 5848func (s DescribeMetricFiltersInput) GoString() string { 5849 return s.String() 5850} 5851 5852// Validate inspects the fields of the type to determine if they are valid. 5853func (s *DescribeMetricFiltersInput) Validate() error { 5854 invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} 5855 if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { 5856 invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) 5857 } 5858 if s.Limit != nil && *s.Limit < 1 { 5859 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 5860 } 5861 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5862 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5863 } 5864 if s.NextToken != nil && len(*s.NextToken) < 1 { 5865 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5866 } 5867 5868 if invalidParams.Len() > 0 { 5869 return invalidParams 5870 } 5871 return nil 5872} 5873 5874// SetFilterNamePrefix sets the FilterNamePrefix field's value. 5875func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput { 5876 s.FilterNamePrefix = &v 5877 return s 5878} 5879 5880// SetLimit sets the Limit field's value. 5881func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput { 5882 s.Limit = &v 5883 return s 5884} 5885 5886// SetLogGroupName sets the LogGroupName field's value. 5887func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput { 5888 s.LogGroupName = &v 5889 return s 5890} 5891 5892// SetMetricName sets the MetricName field's value. 5893func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput { 5894 s.MetricName = &v 5895 return s 5896} 5897 5898// SetMetricNamespace sets the MetricNamespace field's value. 5899func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput { 5900 s.MetricNamespace = &v 5901 return s 5902} 5903 5904// SetNextToken sets the NextToken field's value. 5905func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput { 5906 s.NextToken = &v 5907 return s 5908} 5909 5910type DescribeMetricFiltersOutput struct { 5911 _ struct{} `type:"structure"` 5912 5913 // The metric filters. 5914 MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` 5915 5916 // The token for the next set of items to return. The token expires after 24 5917 // hours. 5918 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5919} 5920 5921// String returns the string representation 5922func (s DescribeMetricFiltersOutput) String() string { 5923 return awsutil.Prettify(s) 5924} 5925 5926// GoString returns the string representation 5927func (s DescribeMetricFiltersOutput) GoString() string { 5928 return s.String() 5929} 5930 5931// SetMetricFilters sets the MetricFilters field's value. 5932func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput { 5933 s.MetricFilters = v 5934 return s 5935} 5936 5937// SetNextToken sets the NextToken field's value. 5938func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput { 5939 s.NextToken = &v 5940 return s 5941} 5942 5943type DescribeQueriesInput struct { 5944 _ struct{} `type:"structure"` 5945 5946 // Limits the returned queries to only those for the specified log group. 5947 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 5948 5949 // Limits the number of returned queries to the specified number. 5950 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 5951 5952 // The token for the next set of items to return. The token expires after 24 5953 // hours. 5954 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 5955 5956 // Limits the returned queries to only those that have the specified status. 5957 // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. 5958 Status *string `locationName:"status" type:"string" enum:"QueryStatus"` 5959} 5960 5961// String returns the string representation 5962func (s DescribeQueriesInput) String() string { 5963 return awsutil.Prettify(s) 5964} 5965 5966// GoString returns the string representation 5967func (s DescribeQueriesInput) GoString() string { 5968 return s.String() 5969} 5970 5971// Validate inspects the fields of the type to determine if they are valid. 5972func (s *DescribeQueriesInput) Validate() error { 5973 invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} 5974 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 5975 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 5976 } 5977 if s.MaxResults != nil && *s.MaxResults < 1 { 5978 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5979 } 5980 if s.NextToken != nil && len(*s.NextToken) < 1 { 5981 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5982 } 5983 5984 if invalidParams.Len() > 0 { 5985 return invalidParams 5986 } 5987 return nil 5988} 5989 5990// SetLogGroupName sets the LogGroupName field's value. 5991func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { 5992 s.LogGroupName = &v 5993 return s 5994} 5995 5996// SetMaxResults sets the MaxResults field's value. 5997func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { 5998 s.MaxResults = &v 5999 return s 6000} 6001 6002// SetNextToken sets the NextToken field's value. 6003func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { 6004 s.NextToken = &v 6005 return s 6006} 6007 6008// SetStatus sets the Status field's value. 6009func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { 6010 s.Status = &v 6011 return s 6012} 6013 6014type DescribeQueriesOutput struct { 6015 _ struct{} `type:"structure"` 6016 6017 // The token for the next set of items to return. The token expires after 24 6018 // hours. 6019 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6020 6021 // The list of queries that match the request. 6022 Queries []*QueryInfo `locationName:"queries" type:"list"` 6023} 6024 6025// String returns the string representation 6026func (s DescribeQueriesOutput) String() string { 6027 return awsutil.Prettify(s) 6028} 6029 6030// GoString returns the string representation 6031func (s DescribeQueriesOutput) GoString() string { 6032 return s.String() 6033} 6034 6035// SetNextToken sets the NextToken field's value. 6036func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { 6037 s.NextToken = &v 6038 return s 6039} 6040 6041// SetQueries sets the Queries field's value. 6042func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { 6043 s.Queries = v 6044 return s 6045} 6046 6047type DescribeQueryDefinitionsInput struct { 6048 _ struct{} `type:"structure"` 6049 6050 // Limits the number of returned query definitions to the specified number. 6051 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 6052 6053 // The token for the next set of items to return. The token expires after 24 6054 // hours. 6055 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6056 6057 // Use this parameter to filter your results to only the query definitions that 6058 // have names that start with the prefix you specify. 6059 QueryDefinitionNamePrefix *string `locationName:"queryDefinitionNamePrefix" min:"1" type:"string"` 6060} 6061 6062// String returns the string representation 6063func (s DescribeQueryDefinitionsInput) String() string { 6064 return awsutil.Prettify(s) 6065} 6066 6067// GoString returns the string representation 6068func (s DescribeQueryDefinitionsInput) GoString() string { 6069 return s.String() 6070} 6071 6072// Validate inspects the fields of the type to determine if they are valid. 6073func (s *DescribeQueryDefinitionsInput) Validate() error { 6074 invalidParams := request.ErrInvalidParams{Context: "DescribeQueryDefinitionsInput"} 6075 if s.MaxResults != nil && *s.MaxResults < 1 { 6076 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 6077 } 6078 if s.NextToken != nil && len(*s.NextToken) < 1 { 6079 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6080 } 6081 if s.QueryDefinitionNamePrefix != nil && len(*s.QueryDefinitionNamePrefix) < 1 { 6082 invalidParams.Add(request.NewErrParamMinLen("QueryDefinitionNamePrefix", 1)) 6083 } 6084 6085 if invalidParams.Len() > 0 { 6086 return invalidParams 6087 } 6088 return nil 6089} 6090 6091// SetMaxResults sets the MaxResults field's value. 6092func (s *DescribeQueryDefinitionsInput) SetMaxResults(v int64) *DescribeQueryDefinitionsInput { 6093 s.MaxResults = &v 6094 return s 6095} 6096 6097// SetNextToken sets the NextToken field's value. 6098func (s *DescribeQueryDefinitionsInput) SetNextToken(v string) *DescribeQueryDefinitionsInput { 6099 s.NextToken = &v 6100 return s 6101} 6102 6103// SetQueryDefinitionNamePrefix sets the QueryDefinitionNamePrefix field's value. 6104func (s *DescribeQueryDefinitionsInput) SetQueryDefinitionNamePrefix(v string) *DescribeQueryDefinitionsInput { 6105 s.QueryDefinitionNamePrefix = &v 6106 return s 6107} 6108 6109type DescribeQueryDefinitionsOutput struct { 6110 _ struct{} `type:"structure"` 6111 6112 // The token for the next set of items to return. The token expires after 24 6113 // hours. 6114 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6115 6116 // The list of query definitions that match your request. 6117 QueryDefinitions []*QueryDefinition `locationName:"queryDefinitions" type:"list"` 6118} 6119 6120// String returns the string representation 6121func (s DescribeQueryDefinitionsOutput) String() string { 6122 return awsutil.Prettify(s) 6123} 6124 6125// GoString returns the string representation 6126func (s DescribeQueryDefinitionsOutput) GoString() string { 6127 return s.String() 6128} 6129 6130// SetNextToken sets the NextToken field's value. 6131func (s *DescribeQueryDefinitionsOutput) SetNextToken(v string) *DescribeQueryDefinitionsOutput { 6132 s.NextToken = &v 6133 return s 6134} 6135 6136// SetQueryDefinitions sets the QueryDefinitions field's value. 6137func (s *DescribeQueryDefinitionsOutput) SetQueryDefinitions(v []*QueryDefinition) *DescribeQueryDefinitionsOutput { 6138 s.QueryDefinitions = v 6139 return s 6140} 6141 6142type DescribeResourcePoliciesInput struct { 6143 _ struct{} `type:"structure"` 6144 6145 // The maximum number of resource policies to be displayed with one call of 6146 // this API. 6147 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 6148 6149 // The token for the next set of items to return. The token expires after 24 6150 // hours. 6151 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6152} 6153 6154// String returns the string representation 6155func (s DescribeResourcePoliciesInput) String() string { 6156 return awsutil.Prettify(s) 6157} 6158 6159// GoString returns the string representation 6160func (s DescribeResourcePoliciesInput) GoString() string { 6161 return s.String() 6162} 6163 6164// Validate inspects the fields of the type to determine if they are valid. 6165func (s *DescribeResourcePoliciesInput) Validate() error { 6166 invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} 6167 if s.Limit != nil && *s.Limit < 1 { 6168 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 6169 } 6170 if s.NextToken != nil && len(*s.NextToken) < 1 { 6171 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6172 } 6173 6174 if invalidParams.Len() > 0 { 6175 return invalidParams 6176 } 6177 return nil 6178} 6179 6180// SetLimit sets the Limit field's value. 6181func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { 6182 s.Limit = &v 6183 return s 6184} 6185 6186// SetNextToken sets the NextToken field's value. 6187func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { 6188 s.NextToken = &v 6189 return s 6190} 6191 6192type DescribeResourcePoliciesOutput struct { 6193 _ struct{} `type:"structure"` 6194 6195 // The token for the next set of items to return. The token expires after 24 6196 // hours. 6197 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6198 6199 // The resource policies that exist in this account. 6200 ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` 6201} 6202 6203// String returns the string representation 6204func (s DescribeResourcePoliciesOutput) String() string { 6205 return awsutil.Prettify(s) 6206} 6207 6208// GoString returns the string representation 6209func (s DescribeResourcePoliciesOutput) GoString() string { 6210 return s.String() 6211} 6212 6213// SetNextToken sets the NextToken field's value. 6214func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { 6215 s.NextToken = &v 6216 return s 6217} 6218 6219// SetResourcePolicies sets the ResourcePolicies field's value. 6220func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { 6221 s.ResourcePolicies = v 6222 return s 6223} 6224 6225type DescribeSubscriptionFiltersInput struct { 6226 _ struct{} `type:"structure"` 6227 6228 // The prefix to match. If you don't specify a value, no prefix filter is applied. 6229 FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` 6230 6231 // The maximum number of items returned. If you don't specify a value, the default 6232 // is up to 50 items. 6233 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 6234 6235 // The name of the log group. 6236 // 6237 // LogGroupName is a required field 6238 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 6239 6240 // The token for the next set of items to return. (You received this token from 6241 // a previous call.) 6242 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6243} 6244 6245// String returns the string representation 6246func (s DescribeSubscriptionFiltersInput) String() string { 6247 return awsutil.Prettify(s) 6248} 6249 6250// GoString returns the string representation 6251func (s DescribeSubscriptionFiltersInput) GoString() string { 6252 return s.String() 6253} 6254 6255// Validate inspects the fields of the type to determine if they are valid. 6256func (s *DescribeSubscriptionFiltersInput) Validate() error { 6257 invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} 6258 if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { 6259 invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) 6260 } 6261 if s.Limit != nil && *s.Limit < 1 { 6262 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 6263 } 6264 if s.LogGroupName == nil { 6265 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 6266 } 6267 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 6268 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 6269 } 6270 if s.NextToken != nil && len(*s.NextToken) < 1 { 6271 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6272 } 6273 6274 if invalidParams.Len() > 0 { 6275 return invalidParams 6276 } 6277 return nil 6278} 6279 6280// SetFilterNamePrefix sets the FilterNamePrefix field's value. 6281func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput { 6282 s.FilterNamePrefix = &v 6283 return s 6284} 6285 6286// SetLimit sets the Limit field's value. 6287func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput { 6288 s.Limit = &v 6289 return s 6290} 6291 6292// SetLogGroupName sets the LogGroupName field's value. 6293func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput { 6294 s.LogGroupName = &v 6295 return s 6296} 6297 6298// SetNextToken sets the NextToken field's value. 6299func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput { 6300 s.NextToken = &v 6301 return s 6302} 6303 6304type DescribeSubscriptionFiltersOutput struct { 6305 _ struct{} `type:"structure"` 6306 6307 // The token for the next set of items to return. The token expires after 24 6308 // hours. 6309 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6310 6311 // The subscription filters. 6312 SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` 6313} 6314 6315// String returns the string representation 6316func (s DescribeSubscriptionFiltersOutput) String() string { 6317 return awsutil.Prettify(s) 6318} 6319 6320// GoString returns the string representation 6321func (s DescribeSubscriptionFiltersOutput) GoString() string { 6322 return s.String() 6323} 6324 6325// SetNextToken sets the NextToken field's value. 6326func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput { 6327 s.NextToken = &v 6328 return s 6329} 6330 6331// SetSubscriptionFilters sets the SubscriptionFilters field's value. 6332func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput { 6333 s.SubscriptionFilters = v 6334 return s 6335} 6336 6337// Represents a cross-account destination that receives subscription log events. 6338type Destination struct { 6339 _ struct{} `type:"structure"` 6340 6341 // An IAM policy document that governs which Amazon Web Services accounts can 6342 // create subscription filters against this destination. 6343 AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` 6344 6345 // The ARN of this destination. 6346 Arn *string `locationName:"arn" type:"string"` 6347 6348 // The creation time of the destination, expressed as the number of milliseconds 6349 // after Jan 1, 1970 00:00:00 UTC. 6350 CreationTime *int64 `locationName:"creationTime" type:"long"` 6351 6352 // The name of the destination. 6353 DestinationName *string `locationName:"destinationName" min:"1" type:"string"` 6354 6355 // A role for impersonation, used when delivering log events to the target. 6356 RoleArn *string `locationName:"roleArn" min:"1" type:"string"` 6357 6358 // The Amazon Resource Name (ARN) of the physical target where the log events 6359 // are delivered (for example, a Kinesis stream). 6360 TargetArn *string `locationName:"targetArn" min:"1" type:"string"` 6361} 6362 6363// String returns the string representation 6364func (s Destination) String() string { 6365 return awsutil.Prettify(s) 6366} 6367 6368// GoString returns the string representation 6369func (s Destination) GoString() string { 6370 return s.String() 6371} 6372 6373// SetAccessPolicy sets the AccessPolicy field's value. 6374func (s *Destination) SetAccessPolicy(v string) *Destination { 6375 s.AccessPolicy = &v 6376 return s 6377} 6378 6379// SetArn sets the Arn field's value. 6380func (s *Destination) SetArn(v string) *Destination { 6381 s.Arn = &v 6382 return s 6383} 6384 6385// SetCreationTime sets the CreationTime field's value. 6386func (s *Destination) SetCreationTime(v int64) *Destination { 6387 s.CreationTime = &v 6388 return s 6389} 6390 6391// SetDestinationName sets the DestinationName field's value. 6392func (s *Destination) SetDestinationName(v string) *Destination { 6393 s.DestinationName = &v 6394 return s 6395} 6396 6397// SetRoleArn sets the RoleArn field's value. 6398func (s *Destination) SetRoleArn(v string) *Destination { 6399 s.RoleArn = &v 6400 return s 6401} 6402 6403// SetTargetArn sets the TargetArn field's value. 6404func (s *Destination) SetTargetArn(v string) *Destination { 6405 s.TargetArn = &v 6406 return s 6407} 6408 6409type DisassociateKmsKeyInput struct { 6410 _ struct{} `type:"structure"` 6411 6412 // The name of the log group. 6413 // 6414 // LogGroupName is a required field 6415 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 6416} 6417 6418// String returns the string representation 6419func (s DisassociateKmsKeyInput) String() string { 6420 return awsutil.Prettify(s) 6421} 6422 6423// GoString returns the string representation 6424func (s DisassociateKmsKeyInput) GoString() string { 6425 return s.String() 6426} 6427 6428// Validate inspects the fields of the type to determine if they are valid. 6429func (s *DisassociateKmsKeyInput) Validate() error { 6430 invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} 6431 if s.LogGroupName == nil { 6432 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 6433 } 6434 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 6435 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 6436 } 6437 6438 if invalidParams.Len() > 0 { 6439 return invalidParams 6440 } 6441 return nil 6442} 6443 6444// SetLogGroupName sets the LogGroupName field's value. 6445func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { 6446 s.LogGroupName = &v 6447 return s 6448} 6449 6450type DisassociateKmsKeyOutput struct { 6451 _ struct{} `type:"structure"` 6452} 6453 6454// String returns the string representation 6455func (s DisassociateKmsKeyOutput) String() string { 6456 return awsutil.Prettify(s) 6457} 6458 6459// GoString returns the string representation 6460func (s DisassociateKmsKeyOutput) GoString() string { 6461 return s.String() 6462} 6463 6464// Represents an export task. 6465type ExportTask struct { 6466 _ struct{} `type:"structure"` 6467 6468 // The name of the S3 bucket to which the log data was exported. 6469 Destination *string `locationName:"destination" min:"1" type:"string"` 6470 6471 // The prefix that was used as the start of Amazon S3 key for every object exported. 6472 DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` 6473 6474 // Execution information about the export task. 6475 ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` 6476 6477 // The start time, expressed as the number of milliseconds after Jan 1, 1970 6478 // 00:00:00 UTC. Events with a timestamp before this time are not exported. 6479 From *int64 `locationName:"from" type:"long"` 6480 6481 // The name of the log group from which logs data was exported. 6482 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 6483 6484 // The status of the export task. 6485 Status *ExportTaskStatus `locationName:"status" type:"structure"` 6486 6487 // The ID of the export task. 6488 TaskId *string `locationName:"taskId" min:"1" type:"string"` 6489 6490 // The name of the export task. 6491 TaskName *string `locationName:"taskName" min:"1" type:"string"` 6492 6493 // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 6494 // UTC. Events with a timestamp later than this time are not exported. 6495 To *int64 `locationName:"to" type:"long"` 6496} 6497 6498// String returns the string representation 6499func (s ExportTask) String() string { 6500 return awsutil.Prettify(s) 6501} 6502 6503// GoString returns the string representation 6504func (s ExportTask) GoString() string { 6505 return s.String() 6506} 6507 6508// SetDestination sets the Destination field's value. 6509func (s *ExportTask) SetDestination(v string) *ExportTask { 6510 s.Destination = &v 6511 return s 6512} 6513 6514// SetDestinationPrefix sets the DestinationPrefix field's value. 6515func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask { 6516 s.DestinationPrefix = &v 6517 return s 6518} 6519 6520// SetExecutionInfo sets the ExecutionInfo field's value. 6521func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask { 6522 s.ExecutionInfo = v 6523 return s 6524} 6525 6526// SetFrom sets the From field's value. 6527func (s *ExportTask) SetFrom(v int64) *ExportTask { 6528 s.From = &v 6529 return s 6530} 6531 6532// SetLogGroupName sets the LogGroupName field's value. 6533func (s *ExportTask) SetLogGroupName(v string) *ExportTask { 6534 s.LogGroupName = &v 6535 return s 6536} 6537 6538// SetStatus sets the Status field's value. 6539func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask { 6540 s.Status = v 6541 return s 6542} 6543 6544// SetTaskId sets the TaskId field's value. 6545func (s *ExportTask) SetTaskId(v string) *ExportTask { 6546 s.TaskId = &v 6547 return s 6548} 6549 6550// SetTaskName sets the TaskName field's value. 6551func (s *ExportTask) SetTaskName(v string) *ExportTask { 6552 s.TaskName = &v 6553 return s 6554} 6555 6556// SetTo sets the To field's value. 6557func (s *ExportTask) SetTo(v int64) *ExportTask { 6558 s.To = &v 6559 return s 6560} 6561 6562// Represents the status of an export task. 6563type ExportTaskExecutionInfo struct { 6564 _ struct{} `type:"structure"` 6565 6566 // The completion time of the export task, expressed as the number of milliseconds 6567 // after Jan 1, 1970 00:00:00 UTC. 6568 CompletionTime *int64 `locationName:"completionTime" type:"long"` 6569 6570 // The creation time of the export task, expressed as the number of milliseconds 6571 // after Jan 1, 1970 00:00:00 UTC. 6572 CreationTime *int64 `locationName:"creationTime" type:"long"` 6573} 6574 6575// String returns the string representation 6576func (s ExportTaskExecutionInfo) String() string { 6577 return awsutil.Prettify(s) 6578} 6579 6580// GoString returns the string representation 6581func (s ExportTaskExecutionInfo) GoString() string { 6582 return s.String() 6583} 6584 6585// SetCompletionTime sets the CompletionTime field's value. 6586func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo { 6587 s.CompletionTime = &v 6588 return s 6589} 6590 6591// SetCreationTime sets the CreationTime field's value. 6592func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo { 6593 s.CreationTime = &v 6594 return s 6595} 6596 6597// Represents the status of an export task. 6598type ExportTaskStatus struct { 6599 _ struct{} `type:"structure"` 6600 6601 // The status code of the export task. 6602 Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` 6603 6604 // The status message related to the status code. 6605 Message *string `locationName:"message" type:"string"` 6606} 6607 6608// String returns the string representation 6609func (s ExportTaskStatus) String() string { 6610 return awsutil.Prettify(s) 6611} 6612 6613// GoString returns the string representation 6614func (s ExportTaskStatus) GoString() string { 6615 return s.String() 6616} 6617 6618// SetCode sets the Code field's value. 6619func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus { 6620 s.Code = &v 6621 return s 6622} 6623 6624// SetMessage sets the Message field's value. 6625func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { 6626 s.Message = &v 6627 return s 6628} 6629 6630type FilterLogEventsInput struct { 6631 _ struct{} `type:"structure"` 6632 6633 // The end of the time range, expressed as the number of milliseconds after 6634 // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are 6635 // not returned. 6636 EndTime *int64 `locationName:"endTime" type:"long"` 6637 6638 // The filter pattern to use. For more information, see Filter and Pattern Syntax 6639 // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). 6640 // 6641 // If not provided, all the events are matched. 6642 FilterPattern *string `locationName:"filterPattern" type:"string"` 6643 6644 // If the value is true, the operation makes a best effort to provide responses 6645 // that contain events from multiple log streams within the log group, interleaved 6646 // in a single response. If the value is false, all the matched log events in 6647 // the first log stream are searched first, then those in the next log stream, 6648 // and so on. The default is false. 6649 // 6650 // Important: Starting on June 17, 2019, this parameter is ignored and the value 6651 // is assumed to be true. The response from this operation always interleaves 6652 // events from multiple log streams within a log group. 6653 // 6654 // Deprecated: Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group. 6655 Interleaved *bool `locationName:"interleaved" deprecated:"true" type:"boolean"` 6656 6657 // The maximum number of events to return. The default is 10,000 events. 6658 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 6659 6660 // The name of the log group to search. 6661 // 6662 // LogGroupName is a required field 6663 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 6664 6665 // Filters the results to include only events from log streams that have names 6666 // starting with this prefix. 6667 // 6668 // If you specify a value for both logStreamNamePrefix and logStreamNames, but 6669 // the value for logStreamNamePrefix does not match any log stream names specified 6670 // in logStreamNames, the action returns an InvalidParameterException error. 6671 LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` 6672 6673 // Filters the results to only logs from the log streams in this list. 6674 // 6675 // If you specify a value for both logStreamNamePrefix and logStreamNames, the 6676 // action returns an InvalidParameterException error. 6677 LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` 6678 6679 // The token for the next set of events to return. (You received this token 6680 // from a previous call.) 6681 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6682 6683 // The start of the time range, expressed as the number of milliseconds after 6684 // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not 6685 // returned. 6686 StartTime *int64 `locationName:"startTime" type:"long"` 6687} 6688 6689// String returns the string representation 6690func (s FilterLogEventsInput) String() string { 6691 return awsutil.Prettify(s) 6692} 6693 6694// GoString returns the string representation 6695func (s FilterLogEventsInput) GoString() string { 6696 return s.String() 6697} 6698 6699// Validate inspects the fields of the type to determine if they are valid. 6700func (s *FilterLogEventsInput) Validate() error { 6701 invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} 6702 if s.Limit != nil && *s.Limit < 1 { 6703 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 6704 } 6705 if s.LogGroupName == nil { 6706 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 6707 } 6708 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 6709 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 6710 } 6711 if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { 6712 invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) 6713 } 6714 if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { 6715 invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) 6716 } 6717 if s.NextToken != nil && len(*s.NextToken) < 1 { 6718 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6719 } 6720 6721 if invalidParams.Len() > 0 { 6722 return invalidParams 6723 } 6724 return nil 6725} 6726 6727// SetEndTime sets the EndTime field's value. 6728func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput { 6729 s.EndTime = &v 6730 return s 6731} 6732 6733// SetFilterPattern sets the FilterPattern field's value. 6734func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput { 6735 s.FilterPattern = &v 6736 return s 6737} 6738 6739// SetInterleaved sets the Interleaved field's value. 6740func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput { 6741 s.Interleaved = &v 6742 return s 6743} 6744 6745// SetLimit sets the Limit field's value. 6746func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput { 6747 s.Limit = &v 6748 return s 6749} 6750 6751// SetLogGroupName sets the LogGroupName field's value. 6752func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { 6753 s.LogGroupName = &v 6754 return s 6755} 6756 6757// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. 6758func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { 6759 s.LogStreamNamePrefix = &v 6760 return s 6761} 6762 6763// SetLogStreamNames sets the LogStreamNames field's value. 6764func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { 6765 s.LogStreamNames = v 6766 return s 6767} 6768 6769// SetNextToken sets the NextToken field's value. 6770func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput { 6771 s.NextToken = &v 6772 return s 6773} 6774 6775// SetStartTime sets the StartTime field's value. 6776func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput { 6777 s.StartTime = &v 6778 return s 6779} 6780 6781type FilterLogEventsOutput struct { 6782 _ struct{} `type:"structure"` 6783 6784 // The matched events. 6785 Events []*FilteredLogEvent `locationName:"events" type:"list"` 6786 6787 // The token to use when requesting the next set of items. The token expires 6788 // after 24 hours. 6789 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6790 6791 // IMPORTANT Starting on May 15, 2020, this parameter will be deprecated. This 6792 // parameter will be an empty list after the deprecation occurs. 6793 // 6794 // Indicates which log streams have been searched and whether each has been 6795 // searched completely. 6796 SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` 6797} 6798 6799// String returns the string representation 6800func (s FilterLogEventsOutput) String() string { 6801 return awsutil.Prettify(s) 6802} 6803 6804// GoString returns the string representation 6805func (s FilterLogEventsOutput) GoString() string { 6806 return s.String() 6807} 6808 6809// SetEvents sets the Events field's value. 6810func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput { 6811 s.Events = v 6812 return s 6813} 6814 6815// SetNextToken sets the NextToken field's value. 6816func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput { 6817 s.NextToken = &v 6818 return s 6819} 6820 6821// SetSearchedLogStreams sets the SearchedLogStreams field's value. 6822func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput { 6823 s.SearchedLogStreams = v 6824 return s 6825} 6826 6827// Represents a matched event. 6828type FilteredLogEvent struct { 6829 _ struct{} `type:"structure"` 6830 6831 // The ID of the event. 6832 EventId *string `locationName:"eventId" type:"string"` 6833 6834 // The time the event was ingested, expressed as the number of milliseconds 6835 // after Jan 1, 1970 00:00:00 UTC. 6836 IngestionTime *int64 `locationName:"ingestionTime" type:"long"` 6837 6838 // The name of the log stream to which this event belongs. 6839 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` 6840 6841 // The data contained in the log event. 6842 Message *string `locationName:"message" min:"1" type:"string"` 6843 6844 // The time the event occurred, expressed as the number of milliseconds after 6845 // Jan 1, 1970 00:00:00 UTC. 6846 Timestamp *int64 `locationName:"timestamp" type:"long"` 6847} 6848 6849// String returns the string representation 6850func (s FilteredLogEvent) String() string { 6851 return awsutil.Prettify(s) 6852} 6853 6854// GoString returns the string representation 6855func (s FilteredLogEvent) GoString() string { 6856 return s.String() 6857} 6858 6859// SetEventId sets the EventId field's value. 6860func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent { 6861 s.EventId = &v 6862 return s 6863} 6864 6865// SetIngestionTime sets the IngestionTime field's value. 6866func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent { 6867 s.IngestionTime = &v 6868 return s 6869} 6870 6871// SetLogStreamName sets the LogStreamName field's value. 6872func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent { 6873 s.LogStreamName = &v 6874 return s 6875} 6876 6877// SetMessage sets the Message field's value. 6878func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent { 6879 s.Message = &v 6880 return s 6881} 6882 6883// SetTimestamp sets the Timestamp field's value. 6884func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { 6885 s.Timestamp = &v 6886 return s 6887} 6888 6889type GetLogEventsInput struct { 6890 _ struct{} `type:"structure"` 6891 6892 // The end of the time range, expressed as the number of milliseconds after 6893 // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than 6894 // this time are not included. 6895 EndTime *int64 `locationName:"endTime" type:"long"` 6896 6897 // The maximum number of log events returned. If you don't specify a value, 6898 // the maximum is as many log events as can fit in a response size of 1 MB, 6899 // up to 10,000 log events. 6900 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 6901 6902 // The name of the log group. 6903 // 6904 // LogGroupName is a required field 6905 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 6906 6907 // The name of the log stream. 6908 // 6909 // LogStreamName is a required field 6910 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` 6911 6912 // The token for the next set of items to return. (You received this token from 6913 // a previous call.) 6914 NextToken *string `locationName:"nextToken" min:"1" type:"string"` 6915 6916 // If the value is true, the earliest log events are returned first. If the 6917 // value is false, the latest log events are returned first. The default value 6918 // is false. 6919 // 6920 // If you are using a previous nextForwardToken value as the nextToken in this 6921 // operation, you must specify true for startFromHead. 6922 StartFromHead *bool `locationName:"startFromHead" type:"boolean"` 6923 6924 // The start of the time range, expressed as the number of milliseconds after 6925 // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later 6926 // than this time are included. Events with a timestamp earlier than this time 6927 // are not included. 6928 StartTime *int64 `locationName:"startTime" type:"long"` 6929} 6930 6931// String returns the string representation 6932func (s GetLogEventsInput) String() string { 6933 return awsutil.Prettify(s) 6934} 6935 6936// GoString returns the string representation 6937func (s GetLogEventsInput) GoString() string { 6938 return s.String() 6939} 6940 6941// Validate inspects the fields of the type to determine if they are valid. 6942func (s *GetLogEventsInput) Validate() error { 6943 invalidParams := request.ErrInvalidParams{Context: "GetLogEventsInput"} 6944 if s.Limit != nil && *s.Limit < 1 { 6945 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 6946 } 6947 if s.LogGroupName == nil { 6948 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 6949 } 6950 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 6951 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 6952 } 6953 if s.LogStreamName == nil { 6954 invalidParams.Add(request.NewErrParamRequired("LogStreamName")) 6955 } 6956 if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { 6957 invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) 6958 } 6959 if s.NextToken != nil && len(*s.NextToken) < 1 { 6960 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 6961 } 6962 6963 if invalidParams.Len() > 0 { 6964 return invalidParams 6965 } 6966 return nil 6967} 6968 6969// SetEndTime sets the EndTime field's value. 6970func (s *GetLogEventsInput) SetEndTime(v int64) *GetLogEventsInput { 6971 s.EndTime = &v 6972 return s 6973} 6974 6975// SetLimit sets the Limit field's value. 6976func (s *GetLogEventsInput) SetLimit(v int64) *GetLogEventsInput { 6977 s.Limit = &v 6978 return s 6979} 6980 6981// SetLogGroupName sets the LogGroupName field's value. 6982func (s *GetLogEventsInput) SetLogGroupName(v string) *GetLogEventsInput { 6983 s.LogGroupName = &v 6984 return s 6985} 6986 6987// SetLogStreamName sets the LogStreamName field's value. 6988func (s *GetLogEventsInput) SetLogStreamName(v string) *GetLogEventsInput { 6989 s.LogStreamName = &v 6990 return s 6991} 6992 6993// SetNextToken sets the NextToken field's value. 6994func (s *GetLogEventsInput) SetNextToken(v string) *GetLogEventsInput { 6995 s.NextToken = &v 6996 return s 6997} 6998 6999// SetStartFromHead sets the StartFromHead field's value. 7000func (s *GetLogEventsInput) SetStartFromHead(v bool) *GetLogEventsInput { 7001 s.StartFromHead = &v 7002 return s 7003} 7004 7005// SetStartTime sets the StartTime field's value. 7006func (s *GetLogEventsInput) SetStartTime(v int64) *GetLogEventsInput { 7007 s.StartTime = &v 7008 return s 7009} 7010 7011type GetLogEventsOutput struct { 7012 _ struct{} `type:"structure"` 7013 7014 // The events. 7015 Events []*OutputLogEvent `locationName:"events" type:"list"` 7016 7017 // The token for the next set of items in the backward direction. The token 7018 // expires after 24 hours. This token is never null. If you have reached the 7019 // end of the stream, it returns the same token you passed in. 7020 NextBackwardToken *string `locationName:"nextBackwardToken" min:"1" type:"string"` 7021 7022 // The token for the next set of items in the forward direction. The token expires 7023 // after 24 hours. If you have reached the end of the stream, it returns the 7024 // same token you passed in. 7025 NextForwardToken *string `locationName:"nextForwardToken" min:"1" type:"string"` 7026} 7027 7028// String returns the string representation 7029func (s GetLogEventsOutput) String() string { 7030 return awsutil.Prettify(s) 7031} 7032 7033// GoString returns the string representation 7034func (s GetLogEventsOutput) GoString() string { 7035 return s.String() 7036} 7037 7038// SetEvents sets the Events field's value. 7039func (s *GetLogEventsOutput) SetEvents(v []*OutputLogEvent) *GetLogEventsOutput { 7040 s.Events = v 7041 return s 7042} 7043 7044// SetNextBackwardToken sets the NextBackwardToken field's value. 7045func (s *GetLogEventsOutput) SetNextBackwardToken(v string) *GetLogEventsOutput { 7046 s.NextBackwardToken = &v 7047 return s 7048} 7049 7050// SetNextForwardToken sets the NextForwardToken field's value. 7051func (s *GetLogEventsOutput) SetNextForwardToken(v string) *GetLogEventsOutput { 7052 s.NextForwardToken = &v 7053 return s 7054} 7055 7056type GetLogGroupFieldsInput struct { 7057 _ struct{} `type:"structure"` 7058 7059 // The name of the log group to search. 7060 // 7061 // LogGroupName is a required field 7062 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 7063 7064 // The time to set as the center of the query. If you specify time, the 15 minutes 7065 // before this time are queries. If you omit time the 8 minutes before and 8 7066 // minutes after this time are searched. 7067 // 7068 // The time value is specified as epoch time, the number of seconds since January 7069 // 1, 1970, 00:00:00 UTC. 7070 Time *int64 `locationName:"time" type:"long"` 7071} 7072 7073// String returns the string representation 7074func (s GetLogGroupFieldsInput) String() string { 7075 return awsutil.Prettify(s) 7076} 7077 7078// GoString returns the string representation 7079func (s GetLogGroupFieldsInput) GoString() string { 7080 return s.String() 7081} 7082 7083// Validate inspects the fields of the type to determine if they are valid. 7084func (s *GetLogGroupFieldsInput) Validate() error { 7085 invalidParams := request.ErrInvalidParams{Context: "GetLogGroupFieldsInput"} 7086 if s.LogGroupName == nil { 7087 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 7088 } 7089 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 7090 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 7091 } 7092 7093 if invalidParams.Len() > 0 { 7094 return invalidParams 7095 } 7096 return nil 7097} 7098 7099// SetLogGroupName sets the LogGroupName field's value. 7100func (s *GetLogGroupFieldsInput) SetLogGroupName(v string) *GetLogGroupFieldsInput { 7101 s.LogGroupName = &v 7102 return s 7103} 7104 7105// SetTime sets the Time field's value. 7106func (s *GetLogGroupFieldsInput) SetTime(v int64) *GetLogGroupFieldsInput { 7107 s.Time = &v 7108 return s 7109} 7110 7111type GetLogGroupFieldsOutput struct { 7112 _ struct{} `type:"structure"` 7113 7114 // The array of fields found in the query. Each object in the array contains 7115 // the name of the field, along with the percentage of time it appeared in the 7116 // log events that were queried. 7117 LogGroupFields []*LogGroupField `locationName:"logGroupFields" type:"list"` 7118} 7119 7120// String returns the string representation 7121func (s GetLogGroupFieldsOutput) String() string { 7122 return awsutil.Prettify(s) 7123} 7124 7125// GoString returns the string representation 7126func (s GetLogGroupFieldsOutput) GoString() string { 7127 return s.String() 7128} 7129 7130// SetLogGroupFields sets the LogGroupFields field's value. 7131func (s *GetLogGroupFieldsOutput) SetLogGroupFields(v []*LogGroupField) *GetLogGroupFieldsOutput { 7132 s.LogGroupFields = v 7133 return s 7134} 7135 7136type GetLogRecordInput struct { 7137 _ struct{} `type:"structure"` 7138 7139 // The pointer corresponding to the log event record you want to retrieve. You 7140 // get this from the response of a GetQueryResults operation. In that response, 7141 // the value of the @ptr field for a log event is the value to use as logRecordPointer 7142 // to retrieve that complete log event record. 7143 // 7144 // LogRecordPointer is a required field 7145 LogRecordPointer *string `locationName:"logRecordPointer" type:"string" required:"true"` 7146} 7147 7148// String returns the string representation 7149func (s GetLogRecordInput) String() string { 7150 return awsutil.Prettify(s) 7151} 7152 7153// GoString returns the string representation 7154func (s GetLogRecordInput) GoString() string { 7155 return s.String() 7156} 7157 7158// Validate inspects the fields of the type to determine if they are valid. 7159func (s *GetLogRecordInput) Validate() error { 7160 invalidParams := request.ErrInvalidParams{Context: "GetLogRecordInput"} 7161 if s.LogRecordPointer == nil { 7162 invalidParams.Add(request.NewErrParamRequired("LogRecordPointer")) 7163 } 7164 7165 if invalidParams.Len() > 0 { 7166 return invalidParams 7167 } 7168 return nil 7169} 7170 7171// SetLogRecordPointer sets the LogRecordPointer field's value. 7172func (s *GetLogRecordInput) SetLogRecordPointer(v string) *GetLogRecordInput { 7173 s.LogRecordPointer = &v 7174 return s 7175} 7176 7177type GetLogRecordOutput struct { 7178 _ struct{} `type:"structure"` 7179 7180 // The requested log event, as a JSON string. 7181 LogRecord map[string]*string `locationName:"logRecord" type:"map"` 7182} 7183 7184// String returns the string representation 7185func (s GetLogRecordOutput) String() string { 7186 return awsutil.Prettify(s) 7187} 7188 7189// GoString returns the string representation 7190func (s GetLogRecordOutput) GoString() string { 7191 return s.String() 7192} 7193 7194// SetLogRecord sets the LogRecord field's value. 7195func (s *GetLogRecordOutput) SetLogRecord(v map[string]*string) *GetLogRecordOutput { 7196 s.LogRecord = v 7197 return s 7198} 7199 7200type GetQueryResultsInput struct { 7201 _ struct{} `type:"structure"` 7202 7203 // The ID number of the query. 7204 // 7205 // QueryId is a required field 7206 QueryId *string `locationName:"queryId" type:"string" required:"true"` 7207} 7208 7209// String returns the string representation 7210func (s GetQueryResultsInput) String() string { 7211 return awsutil.Prettify(s) 7212} 7213 7214// GoString returns the string representation 7215func (s GetQueryResultsInput) GoString() string { 7216 return s.String() 7217} 7218 7219// Validate inspects the fields of the type to determine if they are valid. 7220func (s *GetQueryResultsInput) Validate() error { 7221 invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"} 7222 if s.QueryId == nil { 7223 invalidParams.Add(request.NewErrParamRequired("QueryId")) 7224 } 7225 7226 if invalidParams.Len() > 0 { 7227 return invalidParams 7228 } 7229 return nil 7230} 7231 7232// SetQueryId sets the QueryId field's value. 7233func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput { 7234 s.QueryId = &v 7235 return s 7236} 7237 7238type GetQueryResultsOutput struct { 7239 _ struct{} `type:"structure"` 7240 7241 // The log events that matched the query criteria during the most recent time 7242 // it ran. 7243 // 7244 // The results value is an array of arrays. Each log event is one object in 7245 // the top-level array. Each of these log event objects is an array of field/value 7246 // pairs. 7247 Results [][]*ResultField `locationName:"results" type:"list"` 7248 7249 // Includes the number of log events scanned by the query, the number of log 7250 // events that matched the query criteria, and the total number of bytes in 7251 // the log events that were scanned. These values reflect the full raw results 7252 // of the query. 7253 Statistics *QueryStatistics `locationName:"statistics" type:"structure"` 7254 7255 // The status of the most recent running of the query. Possible values are Cancelled, 7256 // Complete, Failed, Running, Scheduled, Timeout, and Unknown. 7257 // 7258 // Queries time out after 15 minutes of execution. To avoid having your queries 7259 // time out, reduce the time range being searched or partition your query into 7260 // a number of queries. 7261 Status *string `locationName:"status" type:"string" enum:"QueryStatus"` 7262} 7263 7264// String returns the string representation 7265func (s GetQueryResultsOutput) String() string { 7266 return awsutil.Prettify(s) 7267} 7268 7269// GoString returns the string representation 7270func (s GetQueryResultsOutput) GoString() string { 7271 return s.String() 7272} 7273 7274// SetResults sets the Results field's value. 7275func (s *GetQueryResultsOutput) SetResults(v [][]*ResultField) *GetQueryResultsOutput { 7276 s.Results = v 7277 return s 7278} 7279 7280// SetStatistics sets the Statistics field's value. 7281func (s *GetQueryResultsOutput) SetStatistics(v *QueryStatistics) *GetQueryResultsOutput { 7282 s.Statistics = v 7283 return s 7284} 7285 7286// SetStatus sets the Status field's value. 7287func (s *GetQueryResultsOutput) SetStatus(v string) *GetQueryResultsOutput { 7288 s.Status = &v 7289 return s 7290} 7291 7292// Represents a log event, which is a record of activity that was recorded by 7293// the application or resource being monitored. 7294type InputLogEvent struct { 7295 _ struct{} `type:"structure"` 7296 7297 // The raw event message. 7298 // 7299 // Message is a required field 7300 Message *string `locationName:"message" min:"1" type:"string" required:"true"` 7301 7302 // The time the event occurred, expressed as the number of milliseconds after 7303 // Jan 1, 1970 00:00:00 UTC. 7304 // 7305 // Timestamp is a required field 7306 Timestamp *int64 `locationName:"timestamp" type:"long" required:"true"` 7307} 7308 7309// String returns the string representation 7310func (s InputLogEvent) String() string { 7311 return awsutil.Prettify(s) 7312} 7313 7314// GoString returns the string representation 7315func (s InputLogEvent) GoString() string { 7316 return s.String() 7317} 7318 7319// Validate inspects the fields of the type to determine if they are valid. 7320func (s *InputLogEvent) Validate() error { 7321 invalidParams := request.ErrInvalidParams{Context: "InputLogEvent"} 7322 if s.Message == nil { 7323 invalidParams.Add(request.NewErrParamRequired("Message")) 7324 } 7325 if s.Message != nil && len(*s.Message) < 1 { 7326 invalidParams.Add(request.NewErrParamMinLen("Message", 1)) 7327 } 7328 if s.Timestamp == nil { 7329 invalidParams.Add(request.NewErrParamRequired("Timestamp")) 7330 } 7331 7332 if invalidParams.Len() > 0 { 7333 return invalidParams 7334 } 7335 return nil 7336} 7337 7338// SetMessage sets the Message field's value. 7339func (s *InputLogEvent) SetMessage(v string) *InputLogEvent { 7340 s.Message = &v 7341 return s 7342} 7343 7344// SetTimestamp sets the Timestamp field's value. 7345func (s *InputLogEvent) SetTimestamp(v int64) *InputLogEvent { 7346 s.Timestamp = &v 7347 return s 7348} 7349 7350// The operation is not valid on the specified resource. 7351type InvalidOperationException struct { 7352 _ struct{} `type:"structure"` 7353 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7354 7355 Message_ *string `locationName:"message" type:"string"` 7356} 7357 7358// String returns the string representation 7359func (s InvalidOperationException) String() string { 7360 return awsutil.Prettify(s) 7361} 7362 7363// GoString returns the string representation 7364func (s InvalidOperationException) GoString() string { 7365 return s.String() 7366} 7367 7368func newErrorInvalidOperationException(v protocol.ResponseMetadata) error { 7369 return &InvalidOperationException{ 7370 RespMetadata: v, 7371 } 7372} 7373 7374// Code returns the exception type name. 7375func (s *InvalidOperationException) Code() string { 7376 return "InvalidOperationException" 7377} 7378 7379// Message returns the exception's message. 7380func (s *InvalidOperationException) Message() string { 7381 if s.Message_ != nil { 7382 return *s.Message_ 7383 } 7384 return "" 7385} 7386 7387// OrigErr always returns nil, satisfies awserr.Error interface. 7388func (s *InvalidOperationException) OrigErr() error { 7389 return nil 7390} 7391 7392func (s *InvalidOperationException) Error() string { 7393 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7394} 7395 7396// Status code returns the HTTP status code for the request's response error. 7397func (s *InvalidOperationException) StatusCode() int { 7398 return s.RespMetadata.StatusCode 7399} 7400 7401// RequestID returns the service's response RequestID for request. 7402func (s *InvalidOperationException) RequestID() string { 7403 return s.RespMetadata.RequestID 7404} 7405 7406// A parameter is specified incorrectly. 7407type InvalidParameterException struct { 7408 _ struct{} `type:"structure"` 7409 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7410 7411 Message_ *string `locationName:"message" type:"string"` 7412} 7413 7414// String returns the string representation 7415func (s InvalidParameterException) String() string { 7416 return awsutil.Prettify(s) 7417} 7418 7419// GoString returns the string representation 7420func (s InvalidParameterException) GoString() string { 7421 return s.String() 7422} 7423 7424func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { 7425 return &InvalidParameterException{ 7426 RespMetadata: v, 7427 } 7428} 7429 7430// Code returns the exception type name. 7431func (s *InvalidParameterException) Code() string { 7432 return "InvalidParameterException" 7433} 7434 7435// Message returns the exception's message. 7436func (s *InvalidParameterException) Message() string { 7437 if s.Message_ != nil { 7438 return *s.Message_ 7439 } 7440 return "" 7441} 7442 7443// OrigErr always returns nil, satisfies awserr.Error interface. 7444func (s *InvalidParameterException) OrigErr() error { 7445 return nil 7446} 7447 7448func (s *InvalidParameterException) Error() string { 7449 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7450} 7451 7452// Status code returns the HTTP status code for the request's response error. 7453func (s *InvalidParameterException) StatusCode() int { 7454 return s.RespMetadata.StatusCode 7455} 7456 7457// RequestID returns the service's response RequestID for request. 7458func (s *InvalidParameterException) RequestID() string { 7459 return s.RespMetadata.RequestID 7460} 7461 7462// The sequence token is not valid. You can get the correct sequence token in 7463// the expectedSequenceToken field in the InvalidSequenceTokenException message. 7464type InvalidSequenceTokenException struct { 7465 _ struct{} `type:"structure"` 7466 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7467 7468 ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` 7469 7470 Message_ *string `locationName:"message" type:"string"` 7471} 7472 7473// String returns the string representation 7474func (s InvalidSequenceTokenException) String() string { 7475 return awsutil.Prettify(s) 7476} 7477 7478// GoString returns the string representation 7479func (s InvalidSequenceTokenException) GoString() string { 7480 return s.String() 7481} 7482 7483func newErrorInvalidSequenceTokenException(v protocol.ResponseMetadata) error { 7484 return &InvalidSequenceTokenException{ 7485 RespMetadata: v, 7486 } 7487} 7488 7489// Code returns the exception type name. 7490func (s *InvalidSequenceTokenException) Code() string { 7491 return "InvalidSequenceTokenException" 7492} 7493 7494// Message returns the exception's message. 7495func (s *InvalidSequenceTokenException) Message() string { 7496 if s.Message_ != nil { 7497 return *s.Message_ 7498 } 7499 return "" 7500} 7501 7502// OrigErr always returns nil, satisfies awserr.Error interface. 7503func (s *InvalidSequenceTokenException) OrigErr() error { 7504 return nil 7505} 7506 7507func (s *InvalidSequenceTokenException) Error() string { 7508 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 7509} 7510 7511// Status code returns the HTTP status code for the request's response error. 7512func (s *InvalidSequenceTokenException) StatusCode() int { 7513 return s.RespMetadata.StatusCode 7514} 7515 7516// RequestID returns the service's response RequestID for request. 7517func (s *InvalidSequenceTokenException) RequestID() string { 7518 return s.RespMetadata.RequestID 7519} 7520 7521// You have reached the maximum number of resources that can be created. 7522type LimitExceededException struct { 7523 _ struct{} `type:"structure"` 7524 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7525 7526 Message_ *string `locationName:"message" type:"string"` 7527} 7528 7529// String returns the string representation 7530func (s LimitExceededException) String() string { 7531 return awsutil.Prettify(s) 7532} 7533 7534// GoString returns the string representation 7535func (s LimitExceededException) GoString() string { 7536 return s.String() 7537} 7538 7539func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 7540 return &LimitExceededException{ 7541 RespMetadata: v, 7542 } 7543} 7544 7545// Code returns the exception type name. 7546func (s *LimitExceededException) Code() string { 7547 return "LimitExceededException" 7548} 7549 7550// Message returns the exception's message. 7551func (s *LimitExceededException) Message() string { 7552 if s.Message_ != nil { 7553 return *s.Message_ 7554 } 7555 return "" 7556} 7557 7558// OrigErr always returns nil, satisfies awserr.Error interface. 7559func (s *LimitExceededException) OrigErr() error { 7560 return nil 7561} 7562 7563func (s *LimitExceededException) Error() string { 7564 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7565} 7566 7567// Status code returns the HTTP status code for the request's response error. 7568func (s *LimitExceededException) StatusCode() int { 7569 return s.RespMetadata.StatusCode 7570} 7571 7572// RequestID returns the service's response RequestID for request. 7573func (s *LimitExceededException) RequestID() string { 7574 return s.RespMetadata.RequestID 7575} 7576 7577type ListTagsLogGroupInput struct { 7578 _ struct{} `type:"structure"` 7579 7580 // The name of the log group. 7581 // 7582 // LogGroupName is a required field 7583 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 7584} 7585 7586// String returns the string representation 7587func (s ListTagsLogGroupInput) String() string { 7588 return awsutil.Prettify(s) 7589} 7590 7591// GoString returns the string representation 7592func (s ListTagsLogGroupInput) GoString() string { 7593 return s.String() 7594} 7595 7596// Validate inspects the fields of the type to determine if they are valid. 7597func (s *ListTagsLogGroupInput) Validate() error { 7598 invalidParams := request.ErrInvalidParams{Context: "ListTagsLogGroupInput"} 7599 if s.LogGroupName == nil { 7600 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 7601 } 7602 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 7603 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 7604 } 7605 7606 if invalidParams.Len() > 0 { 7607 return invalidParams 7608 } 7609 return nil 7610} 7611 7612// SetLogGroupName sets the LogGroupName field's value. 7613func (s *ListTagsLogGroupInput) SetLogGroupName(v string) *ListTagsLogGroupInput { 7614 s.LogGroupName = &v 7615 return s 7616} 7617 7618type ListTagsLogGroupOutput struct { 7619 _ struct{} `type:"structure"` 7620 7621 // The tags for the log group. 7622 Tags map[string]*string `locationName:"tags" min:"1" type:"map"` 7623} 7624 7625// String returns the string representation 7626func (s ListTagsLogGroupOutput) String() string { 7627 return awsutil.Prettify(s) 7628} 7629 7630// GoString returns the string representation 7631func (s ListTagsLogGroupOutput) GoString() string { 7632 return s.String() 7633} 7634 7635// SetTags sets the Tags field's value. 7636func (s *ListTagsLogGroupOutput) SetTags(v map[string]*string) *ListTagsLogGroupOutput { 7637 s.Tags = v 7638 return s 7639} 7640 7641// Represents a log group. 7642type LogGroup struct { 7643 _ struct{} `type:"structure"` 7644 7645 // The Amazon Resource Name (ARN) of the log group. 7646 Arn *string `locationName:"arn" type:"string"` 7647 7648 // The creation time of the log group, expressed as the number of milliseconds 7649 // after Jan 1, 1970 00:00:00 UTC. 7650 CreationTime *int64 `locationName:"creationTime" type:"long"` 7651 7652 // The Amazon Resource Name (ARN) of the CMK to use when encrypting log data. 7653 KmsKeyId *string `locationName:"kmsKeyId" type:"string"` 7654 7655 // The name of the log group. 7656 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 7657 7658 // The number of metric filters. 7659 MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` 7660 7661 // The number of days to retain the log events in the specified log group. Possible 7662 // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 7663 // 1827, and 3653. 7664 // 7665 // To set a log group to never have log events expire, use DeleteRetentionPolicy 7666 // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html). 7667 RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` 7668 7669 // The number of bytes stored. 7670 StoredBytes *int64 `locationName:"storedBytes" type:"long"` 7671} 7672 7673// String returns the string representation 7674func (s LogGroup) String() string { 7675 return awsutil.Prettify(s) 7676} 7677 7678// GoString returns the string representation 7679func (s LogGroup) GoString() string { 7680 return s.String() 7681} 7682 7683// SetArn sets the Arn field's value. 7684func (s *LogGroup) SetArn(v string) *LogGroup { 7685 s.Arn = &v 7686 return s 7687} 7688 7689// SetCreationTime sets the CreationTime field's value. 7690func (s *LogGroup) SetCreationTime(v int64) *LogGroup { 7691 s.CreationTime = &v 7692 return s 7693} 7694 7695// SetKmsKeyId sets the KmsKeyId field's value. 7696func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { 7697 s.KmsKeyId = &v 7698 return s 7699} 7700 7701// SetLogGroupName sets the LogGroupName field's value. 7702func (s *LogGroup) SetLogGroupName(v string) *LogGroup { 7703 s.LogGroupName = &v 7704 return s 7705} 7706 7707// SetMetricFilterCount sets the MetricFilterCount field's value. 7708func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { 7709 s.MetricFilterCount = &v 7710 return s 7711} 7712 7713// SetRetentionInDays sets the RetentionInDays field's value. 7714func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { 7715 s.RetentionInDays = &v 7716 return s 7717} 7718 7719// SetStoredBytes sets the StoredBytes field's value. 7720func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { 7721 s.StoredBytes = &v 7722 return s 7723} 7724 7725// The fields contained in log events found by a GetLogGroupFields operation, 7726// along with the percentage of queried log events in which each field appears. 7727type LogGroupField struct { 7728 _ struct{} `type:"structure"` 7729 7730 // The name of a log field. 7731 Name *string `locationName:"name" type:"string"` 7732 7733 // The percentage of log events queried that contained the field. 7734 Percent *int64 `locationName:"percent" type:"integer"` 7735} 7736 7737// String returns the string representation 7738func (s LogGroupField) String() string { 7739 return awsutil.Prettify(s) 7740} 7741 7742// GoString returns the string representation 7743func (s LogGroupField) GoString() string { 7744 return s.String() 7745} 7746 7747// SetName sets the Name field's value. 7748func (s *LogGroupField) SetName(v string) *LogGroupField { 7749 s.Name = &v 7750 return s 7751} 7752 7753// SetPercent sets the Percent field's value. 7754func (s *LogGroupField) SetPercent(v int64) *LogGroupField { 7755 s.Percent = &v 7756 return s 7757} 7758 7759// Represents a log stream, which is a sequence of log events from a single 7760// emitter of logs. 7761type LogStream struct { 7762 _ struct{} `type:"structure"` 7763 7764 // The Amazon Resource Name (ARN) of the log stream. 7765 Arn *string `locationName:"arn" type:"string"` 7766 7767 // The creation time of the stream, expressed as the number of milliseconds 7768 // after Jan 1, 1970 00:00:00 UTC. 7769 CreationTime *int64 `locationName:"creationTime" type:"long"` 7770 7771 // The time of the first event, expressed as the number of milliseconds after 7772 // Jan 1, 1970 00:00:00 UTC. 7773 FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` 7774 7775 // The time of the most recent log event in the log stream in CloudWatch Logs. 7776 // This number is expressed as the number of milliseconds after Jan 1, 1970 7777 // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency 7778 // basis. It typically updates in less than an hour from ingestion, but in rare 7779 // situations might take longer. 7780 LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` 7781 7782 // The ingestion time, expressed as the number of milliseconds after Jan 1, 7783 // 1970 00:00:00 UTC. 7784 LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` 7785 7786 // The name of the log stream. 7787 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` 7788 7789 // The number of bytes stored. 7790 // 7791 // Important: On June 17, 2019, this parameter was deprecated for log streams, 7792 // and is always reported as zero. This change applies only to log streams. 7793 // The storedBytes parameter for log groups is not affected. 7794 // 7795 // Deprecated: Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected. 7796 StoredBytes *int64 `locationName:"storedBytes" deprecated:"true" type:"long"` 7797 7798 // The sequence token. 7799 UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` 7800} 7801 7802// String returns the string representation 7803func (s LogStream) String() string { 7804 return awsutil.Prettify(s) 7805} 7806 7807// GoString returns the string representation 7808func (s LogStream) GoString() string { 7809 return s.String() 7810} 7811 7812// SetArn sets the Arn field's value. 7813func (s *LogStream) SetArn(v string) *LogStream { 7814 s.Arn = &v 7815 return s 7816} 7817 7818// SetCreationTime sets the CreationTime field's value. 7819func (s *LogStream) SetCreationTime(v int64) *LogStream { 7820 s.CreationTime = &v 7821 return s 7822} 7823 7824// SetFirstEventTimestamp sets the FirstEventTimestamp field's value. 7825func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream { 7826 s.FirstEventTimestamp = &v 7827 return s 7828} 7829 7830// SetLastEventTimestamp sets the LastEventTimestamp field's value. 7831func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream { 7832 s.LastEventTimestamp = &v 7833 return s 7834} 7835 7836// SetLastIngestionTime sets the LastIngestionTime field's value. 7837func (s *LogStream) SetLastIngestionTime(v int64) *LogStream { 7838 s.LastIngestionTime = &v 7839 return s 7840} 7841 7842// SetLogStreamName sets the LogStreamName field's value. 7843func (s *LogStream) SetLogStreamName(v string) *LogStream { 7844 s.LogStreamName = &v 7845 return s 7846} 7847 7848// SetStoredBytes sets the StoredBytes field's value. 7849func (s *LogStream) SetStoredBytes(v int64) *LogStream { 7850 s.StoredBytes = &v 7851 return s 7852} 7853 7854// SetUploadSequenceToken sets the UploadSequenceToken field's value. 7855func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { 7856 s.UploadSequenceToken = &v 7857 return s 7858} 7859 7860// The query string is not valid. Details about this error are displayed in 7861// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). 7862// 7863// For more information about valid query syntax, see CloudWatch Logs Insights 7864// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 7865type MalformedQueryException struct { 7866 _ struct{} `type:"structure"` 7867 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7868 7869 Message_ *string `locationName:"message" type:"string"` 7870 7871 // Reserved. 7872 QueryCompileError *QueryCompileError `locationName:"queryCompileError" type:"structure"` 7873} 7874 7875// String returns the string representation 7876func (s MalformedQueryException) String() string { 7877 return awsutil.Prettify(s) 7878} 7879 7880// GoString returns the string representation 7881func (s MalformedQueryException) GoString() string { 7882 return s.String() 7883} 7884 7885func newErrorMalformedQueryException(v protocol.ResponseMetadata) error { 7886 return &MalformedQueryException{ 7887 RespMetadata: v, 7888 } 7889} 7890 7891// Code returns the exception type name. 7892func (s *MalformedQueryException) Code() string { 7893 return "MalformedQueryException" 7894} 7895 7896// Message returns the exception's message. 7897func (s *MalformedQueryException) Message() string { 7898 if s.Message_ != nil { 7899 return *s.Message_ 7900 } 7901 return "" 7902} 7903 7904// OrigErr always returns nil, satisfies awserr.Error interface. 7905func (s *MalformedQueryException) OrigErr() error { 7906 return nil 7907} 7908 7909func (s *MalformedQueryException) Error() string { 7910 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 7911} 7912 7913// Status code returns the HTTP status code for the request's response error. 7914func (s *MalformedQueryException) StatusCode() int { 7915 return s.RespMetadata.StatusCode 7916} 7917 7918// RequestID returns the service's response RequestID for request. 7919func (s *MalformedQueryException) RequestID() string { 7920 return s.RespMetadata.RequestID 7921} 7922 7923// Metric filters express how CloudWatch Logs would extract metric observations 7924// from ingested log events and transform them into metric data in a CloudWatch 7925// metric. 7926type MetricFilter struct { 7927 _ struct{} `type:"structure"` 7928 7929 // The creation time of the metric filter, expressed as the number of milliseconds 7930 // after Jan 1, 1970 00:00:00 UTC. 7931 CreationTime *int64 `locationName:"creationTime" type:"long"` 7932 7933 // The name of the metric filter. 7934 FilterName *string `locationName:"filterName" min:"1" type:"string"` 7935 7936 // A symbolic description of how CloudWatch Logs should interpret the data in 7937 // each log event. For example, a log event can contain timestamps, IP addresses, 7938 // strings, and so on. You use the filter pattern to specify what to look for 7939 // in the log event message. 7940 FilterPattern *string `locationName:"filterPattern" type:"string"` 7941 7942 // The name of the log group. 7943 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 7944 7945 // The metric transformations. 7946 MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` 7947} 7948 7949// String returns the string representation 7950func (s MetricFilter) String() string { 7951 return awsutil.Prettify(s) 7952} 7953 7954// GoString returns the string representation 7955func (s MetricFilter) GoString() string { 7956 return s.String() 7957} 7958 7959// SetCreationTime sets the CreationTime field's value. 7960func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter { 7961 s.CreationTime = &v 7962 return s 7963} 7964 7965// SetFilterName sets the FilterName field's value. 7966func (s *MetricFilter) SetFilterName(v string) *MetricFilter { 7967 s.FilterName = &v 7968 return s 7969} 7970 7971// SetFilterPattern sets the FilterPattern field's value. 7972func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter { 7973 s.FilterPattern = &v 7974 return s 7975} 7976 7977// SetLogGroupName sets the LogGroupName field's value. 7978func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter { 7979 s.LogGroupName = &v 7980 return s 7981} 7982 7983// SetMetricTransformations sets the MetricTransformations field's value. 7984func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter { 7985 s.MetricTransformations = v 7986 return s 7987} 7988 7989// Represents a matched event. 7990type MetricFilterMatchRecord struct { 7991 _ struct{} `type:"structure"` 7992 7993 // The raw event data. 7994 EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` 7995 7996 // The event number. 7997 EventNumber *int64 `locationName:"eventNumber" type:"long"` 7998 7999 // The values extracted from the event data by the filter. 8000 ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` 8001} 8002 8003// String returns the string representation 8004func (s MetricFilterMatchRecord) String() string { 8005 return awsutil.Prettify(s) 8006} 8007 8008// GoString returns the string representation 8009func (s MetricFilterMatchRecord) GoString() string { 8010 return s.String() 8011} 8012 8013// SetEventMessage sets the EventMessage field's value. 8014func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord { 8015 s.EventMessage = &v 8016 return s 8017} 8018 8019// SetEventNumber sets the EventNumber field's value. 8020func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord { 8021 s.EventNumber = &v 8022 return s 8023} 8024 8025// SetExtractedValues sets the ExtractedValues field's value. 8026func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord { 8027 s.ExtractedValues = v 8028 return s 8029} 8030 8031// Indicates how to transform ingested log events to metric data in a CloudWatch 8032// metric. 8033type MetricTransformation struct { 8034 _ struct{} `type:"structure"` 8035 8036 // (Optional) The value to emit when a filter pattern does not match a log event. 8037 // This value can be null. 8038 DefaultValue *float64 `locationName:"defaultValue" type:"double"` 8039 8040 // The fields to use as dimensions for the metric. One metric filter can include 8041 // as many as three dimensions. 8042 // 8043 // Metrics extracted from log events are charged as custom metrics. To prevent 8044 // unexpected high charges, do not specify high-cardinality fields such as IPAddress 8045 // or requestID as dimensions. Each different value found for a dimension is 8046 // treated as a separate metric and accrues charges as a separate custom metric. 8047 // 8048 // To help prevent accidental high charges, Amazon disables a metric filter 8049 // if it generates 1000 different name/value pairs for the dimensions that you 8050 // have specified within a certain amount of time. 8051 // 8052 // You can also set up a billing alarm to alert you if your charges are higher 8053 // than expected. For more information, see Creating a Billing Alarm to Monitor 8054 // Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). 8055 Dimensions map[string]*string `locationName:"dimensions" type:"map"` 8056 8057 // The name of the CloudWatch metric. 8058 // 8059 // MetricName is a required field 8060 MetricName *string `locationName:"metricName" type:"string" required:"true"` 8061 8062 // A custom namespace to contain your metric in CloudWatch. Use namespaces to 8063 // group together metrics that are similar. For more information, see Namespaces 8064 // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). 8065 // 8066 // MetricNamespace is a required field 8067 MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` 8068 8069 // The value to publish to the CloudWatch metric when a filter pattern matches 8070 // a log event. 8071 // 8072 // MetricValue is a required field 8073 MetricValue *string `locationName:"metricValue" type:"string" required:"true"` 8074 8075 // The unit to assign to the metric. If you omit this, the unit is set as None. 8076 Unit *string `locationName:"unit" type:"string" enum:"StandardUnit"` 8077} 8078 8079// String returns the string representation 8080func (s MetricTransformation) String() string { 8081 return awsutil.Prettify(s) 8082} 8083 8084// GoString returns the string representation 8085func (s MetricTransformation) GoString() string { 8086 return s.String() 8087} 8088 8089// Validate inspects the fields of the type to determine if they are valid. 8090func (s *MetricTransformation) Validate() error { 8091 invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} 8092 if s.MetricName == nil { 8093 invalidParams.Add(request.NewErrParamRequired("MetricName")) 8094 } 8095 if s.MetricNamespace == nil { 8096 invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) 8097 } 8098 if s.MetricValue == nil { 8099 invalidParams.Add(request.NewErrParamRequired("MetricValue")) 8100 } 8101 8102 if invalidParams.Len() > 0 { 8103 return invalidParams 8104 } 8105 return nil 8106} 8107 8108// SetDefaultValue sets the DefaultValue field's value. 8109func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation { 8110 s.DefaultValue = &v 8111 return s 8112} 8113 8114// SetDimensions sets the Dimensions field's value. 8115func (s *MetricTransformation) SetDimensions(v map[string]*string) *MetricTransformation { 8116 s.Dimensions = v 8117 return s 8118} 8119 8120// SetMetricName sets the MetricName field's value. 8121func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation { 8122 s.MetricName = &v 8123 return s 8124} 8125 8126// SetMetricNamespace sets the MetricNamespace field's value. 8127func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation { 8128 s.MetricNamespace = &v 8129 return s 8130} 8131 8132// SetMetricValue sets the MetricValue field's value. 8133func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { 8134 s.MetricValue = &v 8135 return s 8136} 8137 8138// SetUnit sets the Unit field's value. 8139func (s *MetricTransformation) SetUnit(v string) *MetricTransformation { 8140 s.Unit = &v 8141 return s 8142} 8143 8144// Multiple requests to update the same resource were in conflict. 8145type OperationAbortedException struct { 8146 _ struct{} `type:"structure"` 8147 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8148 8149 Message_ *string `locationName:"message" type:"string"` 8150} 8151 8152// String returns the string representation 8153func (s OperationAbortedException) String() string { 8154 return awsutil.Prettify(s) 8155} 8156 8157// GoString returns the string representation 8158func (s OperationAbortedException) GoString() string { 8159 return s.String() 8160} 8161 8162func newErrorOperationAbortedException(v protocol.ResponseMetadata) error { 8163 return &OperationAbortedException{ 8164 RespMetadata: v, 8165 } 8166} 8167 8168// Code returns the exception type name. 8169func (s *OperationAbortedException) Code() string { 8170 return "OperationAbortedException" 8171} 8172 8173// Message returns the exception's message. 8174func (s *OperationAbortedException) Message() string { 8175 if s.Message_ != nil { 8176 return *s.Message_ 8177 } 8178 return "" 8179} 8180 8181// OrigErr always returns nil, satisfies awserr.Error interface. 8182func (s *OperationAbortedException) OrigErr() error { 8183 return nil 8184} 8185 8186func (s *OperationAbortedException) Error() string { 8187 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 8188} 8189 8190// Status code returns the HTTP status code for the request's response error. 8191func (s *OperationAbortedException) StatusCode() int { 8192 return s.RespMetadata.StatusCode 8193} 8194 8195// RequestID returns the service's response RequestID for request. 8196func (s *OperationAbortedException) RequestID() string { 8197 return s.RespMetadata.RequestID 8198} 8199 8200// Represents a log event. 8201type OutputLogEvent struct { 8202 _ struct{} `type:"structure"` 8203 8204 // The time the event was ingested, expressed as the number of milliseconds 8205 // after Jan 1, 1970 00:00:00 UTC. 8206 IngestionTime *int64 `locationName:"ingestionTime" type:"long"` 8207 8208 // The data contained in the log event. 8209 Message *string `locationName:"message" min:"1" type:"string"` 8210 8211 // The time the event occurred, expressed as the number of milliseconds after 8212 // Jan 1, 1970 00:00:00 UTC. 8213 Timestamp *int64 `locationName:"timestamp" type:"long"` 8214} 8215 8216// String returns the string representation 8217func (s OutputLogEvent) String() string { 8218 return awsutil.Prettify(s) 8219} 8220 8221// GoString returns the string representation 8222func (s OutputLogEvent) GoString() string { 8223 return s.String() 8224} 8225 8226// SetIngestionTime sets the IngestionTime field's value. 8227func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent { 8228 s.IngestionTime = &v 8229 return s 8230} 8231 8232// SetMessage sets the Message field's value. 8233func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent { 8234 s.Message = &v 8235 return s 8236} 8237 8238// SetTimestamp sets the Timestamp field's value. 8239func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent { 8240 s.Timestamp = &v 8241 return s 8242} 8243 8244type PutDestinationInput struct { 8245 _ struct{} `type:"structure"` 8246 8247 // A name for the destination. 8248 // 8249 // DestinationName is a required field 8250 DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` 8251 8252 // The ARN of an IAM role that grants CloudWatch Logs permissions to call the 8253 // Amazon Kinesis PutRecord operation on the destination stream. 8254 // 8255 // RoleArn is a required field 8256 RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"` 8257 8258 // The ARN of an Amazon Kinesis stream to which to deliver matching log events. 8259 // 8260 // TargetArn is a required field 8261 TargetArn *string `locationName:"targetArn" min:"1" type:"string" required:"true"` 8262} 8263 8264// String returns the string representation 8265func (s PutDestinationInput) String() string { 8266 return awsutil.Prettify(s) 8267} 8268 8269// GoString returns the string representation 8270func (s PutDestinationInput) GoString() string { 8271 return s.String() 8272} 8273 8274// Validate inspects the fields of the type to determine if they are valid. 8275func (s *PutDestinationInput) Validate() error { 8276 invalidParams := request.ErrInvalidParams{Context: "PutDestinationInput"} 8277 if s.DestinationName == nil { 8278 invalidParams.Add(request.NewErrParamRequired("DestinationName")) 8279 } 8280 if s.DestinationName != nil && len(*s.DestinationName) < 1 { 8281 invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) 8282 } 8283 if s.RoleArn == nil { 8284 invalidParams.Add(request.NewErrParamRequired("RoleArn")) 8285 } 8286 if s.RoleArn != nil && len(*s.RoleArn) < 1 { 8287 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) 8288 } 8289 if s.TargetArn == nil { 8290 invalidParams.Add(request.NewErrParamRequired("TargetArn")) 8291 } 8292 if s.TargetArn != nil && len(*s.TargetArn) < 1 { 8293 invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) 8294 } 8295 8296 if invalidParams.Len() > 0 { 8297 return invalidParams 8298 } 8299 return nil 8300} 8301 8302// SetDestinationName sets the DestinationName field's value. 8303func (s *PutDestinationInput) SetDestinationName(v string) *PutDestinationInput { 8304 s.DestinationName = &v 8305 return s 8306} 8307 8308// SetRoleArn sets the RoleArn field's value. 8309func (s *PutDestinationInput) SetRoleArn(v string) *PutDestinationInput { 8310 s.RoleArn = &v 8311 return s 8312} 8313 8314// SetTargetArn sets the TargetArn field's value. 8315func (s *PutDestinationInput) SetTargetArn(v string) *PutDestinationInput { 8316 s.TargetArn = &v 8317 return s 8318} 8319 8320type PutDestinationOutput struct { 8321 _ struct{} `type:"structure"` 8322 8323 // The destination. 8324 Destination *Destination `locationName:"destination" type:"structure"` 8325} 8326 8327// String returns the string representation 8328func (s PutDestinationOutput) String() string { 8329 return awsutil.Prettify(s) 8330} 8331 8332// GoString returns the string representation 8333func (s PutDestinationOutput) GoString() string { 8334 return s.String() 8335} 8336 8337// SetDestination sets the Destination field's value. 8338func (s *PutDestinationOutput) SetDestination(v *Destination) *PutDestinationOutput { 8339 s.Destination = v 8340 return s 8341} 8342 8343type PutDestinationPolicyInput struct { 8344 _ struct{} `type:"structure"` 8345 8346 // An IAM policy document that authorizes cross-account users to deliver their 8347 // log events to the associated destination. This can be up to 5120 bytes. 8348 // 8349 // AccessPolicy is a required field 8350 AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string" required:"true"` 8351 8352 // A name for an existing destination. 8353 // 8354 // DestinationName is a required field 8355 DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` 8356} 8357 8358// String returns the string representation 8359func (s PutDestinationPolicyInput) String() string { 8360 return awsutil.Prettify(s) 8361} 8362 8363// GoString returns the string representation 8364func (s PutDestinationPolicyInput) GoString() string { 8365 return s.String() 8366} 8367 8368// Validate inspects the fields of the type to determine if they are valid. 8369func (s *PutDestinationPolicyInput) Validate() error { 8370 invalidParams := request.ErrInvalidParams{Context: "PutDestinationPolicyInput"} 8371 if s.AccessPolicy == nil { 8372 invalidParams.Add(request.NewErrParamRequired("AccessPolicy")) 8373 } 8374 if s.AccessPolicy != nil && len(*s.AccessPolicy) < 1 { 8375 invalidParams.Add(request.NewErrParamMinLen("AccessPolicy", 1)) 8376 } 8377 if s.DestinationName == nil { 8378 invalidParams.Add(request.NewErrParamRequired("DestinationName")) 8379 } 8380 if s.DestinationName != nil && len(*s.DestinationName) < 1 { 8381 invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) 8382 } 8383 8384 if invalidParams.Len() > 0 { 8385 return invalidParams 8386 } 8387 return nil 8388} 8389 8390// SetAccessPolicy sets the AccessPolicy field's value. 8391func (s *PutDestinationPolicyInput) SetAccessPolicy(v string) *PutDestinationPolicyInput { 8392 s.AccessPolicy = &v 8393 return s 8394} 8395 8396// SetDestinationName sets the DestinationName field's value. 8397func (s *PutDestinationPolicyInput) SetDestinationName(v string) *PutDestinationPolicyInput { 8398 s.DestinationName = &v 8399 return s 8400} 8401 8402type PutDestinationPolicyOutput struct { 8403 _ struct{} `type:"structure"` 8404} 8405 8406// String returns the string representation 8407func (s PutDestinationPolicyOutput) String() string { 8408 return awsutil.Prettify(s) 8409} 8410 8411// GoString returns the string representation 8412func (s PutDestinationPolicyOutput) GoString() string { 8413 return s.String() 8414} 8415 8416type PutLogEventsInput struct { 8417 _ struct{} `type:"structure"` 8418 8419 // The log events. 8420 // 8421 // LogEvents is a required field 8422 LogEvents []*InputLogEvent `locationName:"logEvents" min:"1" type:"list" required:"true"` 8423 8424 // The name of the log group. 8425 // 8426 // LogGroupName is a required field 8427 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 8428 8429 // The name of the log stream. 8430 // 8431 // LogStreamName is a required field 8432 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` 8433 8434 // The sequence token obtained from the response of the previous PutLogEvents 8435 // call. An upload in a newly created log stream does not require a sequence 8436 // token. You can also get the sequence token using DescribeLogStreams (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html). 8437 // If you call PutLogEvents twice within a narrow time period using the same 8438 // value for sequenceToken, both calls might be successful or one might be rejected. 8439 SequenceToken *string `locationName:"sequenceToken" min:"1" type:"string"` 8440} 8441 8442// String returns the string representation 8443func (s PutLogEventsInput) String() string { 8444 return awsutil.Prettify(s) 8445} 8446 8447// GoString returns the string representation 8448func (s PutLogEventsInput) GoString() string { 8449 return s.String() 8450} 8451 8452// Validate inspects the fields of the type to determine if they are valid. 8453func (s *PutLogEventsInput) Validate() error { 8454 invalidParams := request.ErrInvalidParams{Context: "PutLogEventsInput"} 8455 if s.LogEvents == nil { 8456 invalidParams.Add(request.NewErrParamRequired("LogEvents")) 8457 } 8458 if s.LogEvents != nil && len(s.LogEvents) < 1 { 8459 invalidParams.Add(request.NewErrParamMinLen("LogEvents", 1)) 8460 } 8461 if s.LogGroupName == nil { 8462 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 8463 } 8464 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 8465 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 8466 } 8467 if s.LogStreamName == nil { 8468 invalidParams.Add(request.NewErrParamRequired("LogStreamName")) 8469 } 8470 if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { 8471 invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) 8472 } 8473 if s.SequenceToken != nil && len(*s.SequenceToken) < 1 { 8474 invalidParams.Add(request.NewErrParamMinLen("SequenceToken", 1)) 8475 } 8476 if s.LogEvents != nil { 8477 for i, v := range s.LogEvents { 8478 if v == nil { 8479 continue 8480 } 8481 if err := v.Validate(); err != nil { 8482 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogEvents", i), err.(request.ErrInvalidParams)) 8483 } 8484 } 8485 } 8486 8487 if invalidParams.Len() > 0 { 8488 return invalidParams 8489 } 8490 return nil 8491} 8492 8493// SetLogEvents sets the LogEvents field's value. 8494func (s *PutLogEventsInput) SetLogEvents(v []*InputLogEvent) *PutLogEventsInput { 8495 s.LogEvents = v 8496 return s 8497} 8498 8499// SetLogGroupName sets the LogGroupName field's value. 8500func (s *PutLogEventsInput) SetLogGroupName(v string) *PutLogEventsInput { 8501 s.LogGroupName = &v 8502 return s 8503} 8504 8505// SetLogStreamName sets the LogStreamName field's value. 8506func (s *PutLogEventsInput) SetLogStreamName(v string) *PutLogEventsInput { 8507 s.LogStreamName = &v 8508 return s 8509} 8510 8511// SetSequenceToken sets the SequenceToken field's value. 8512func (s *PutLogEventsInput) SetSequenceToken(v string) *PutLogEventsInput { 8513 s.SequenceToken = &v 8514 return s 8515} 8516 8517type PutLogEventsOutput struct { 8518 _ struct{} `type:"structure"` 8519 8520 // The next sequence token. 8521 NextSequenceToken *string `locationName:"nextSequenceToken" min:"1" type:"string"` 8522 8523 // The rejected events. 8524 RejectedLogEventsInfo *RejectedLogEventsInfo `locationName:"rejectedLogEventsInfo" type:"structure"` 8525} 8526 8527// String returns the string representation 8528func (s PutLogEventsOutput) String() string { 8529 return awsutil.Prettify(s) 8530} 8531 8532// GoString returns the string representation 8533func (s PutLogEventsOutput) GoString() string { 8534 return s.String() 8535} 8536 8537// SetNextSequenceToken sets the NextSequenceToken field's value. 8538func (s *PutLogEventsOutput) SetNextSequenceToken(v string) *PutLogEventsOutput { 8539 s.NextSequenceToken = &v 8540 return s 8541} 8542 8543// SetRejectedLogEventsInfo sets the RejectedLogEventsInfo field's value. 8544func (s *PutLogEventsOutput) SetRejectedLogEventsInfo(v *RejectedLogEventsInfo) *PutLogEventsOutput { 8545 s.RejectedLogEventsInfo = v 8546 return s 8547} 8548 8549type PutMetricFilterInput struct { 8550 _ struct{} `type:"structure"` 8551 8552 // A name for the metric filter. 8553 // 8554 // FilterName is a required field 8555 FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` 8556 8557 // A filter pattern for extracting metric data out of ingested log events. 8558 // 8559 // FilterPattern is a required field 8560 FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` 8561 8562 // The name of the log group. 8563 // 8564 // LogGroupName is a required field 8565 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 8566 8567 // A collection of information that defines how metric data gets emitted. 8568 // 8569 // MetricTransformations is a required field 8570 MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list" required:"true"` 8571} 8572 8573// String returns the string representation 8574func (s PutMetricFilterInput) String() string { 8575 return awsutil.Prettify(s) 8576} 8577 8578// GoString returns the string representation 8579func (s PutMetricFilterInput) GoString() string { 8580 return s.String() 8581} 8582 8583// Validate inspects the fields of the type to determine if they are valid. 8584func (s *PutMetricFilterInput) Validate() error { 8585 invalidParams := request.ErrInvalidParams{Context: "PutMetricFilterInput"} 8586 if s.FilterName == nil { 8587 invalidParams.Add(request.NewErrParamRequired("FilterName")) 8588 } 8589 if s.FilterName != nil && len(*s.FilterName) < 1 { 8590 invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) 8591 } 8592 if s.FilterPattern == nil { 8593 invalidParams.Add(request.NewErrParamRequired("FilterPattern")) 8594 } 8595 if s.LogGroupName == nil { 8596 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 8597 } 8598 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 8599 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 8600 } 8601 if s.MetricTransformations == nil { 8602 invalidParams.Add(request.NewErrParamRequired("MetricTransformations")) 8603 } 8604 if s.MetricTransformations != nil && len(s.MetricTransformations) < 1 { 8605 invalidParams.Add(request.NewErrParamMinLen("MetricTransformations", 1)) 8606 } 8607 if s.MetricTransformations != nil { 8608 for i, v := range s.MetricTransformations { 8609 if v == nil { 8610 continue 8611 } 8612 if err := v.Validate(); err != nil { 8613 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricTransformations", i), err.(request.ErrInvalidParams)) 8614 } 8615 } 8616 } 8617 8618 if invalidParams.Len() > 0 { 8619 return invalidParams 8620 } 8621 return nil 8622} 8623 8624// SetFilterName sets the FilterName field's value. 8625func (s *PutMetricFilterInput) SetFilterName(v string) *PutMetricFilterInput { 8626 s.FilterName = &v 8627 return s 8628} 8629 8630// SetFilterPattern sets the FilterPattern field's value. 8631func (s *PutMetricFilterInput) SetFilterPattern(v string) *PutMetricFilterInput { 8632 s.FilterPattern = &v 8633 return s 8634} 8635 8636// SetLogGroupName sets the LogGroupName field's value. 8637func (s *PutMetricFilterInput) SetLogGroupName(v string) *PutMetricFilterInput { 8638 s.LogGroupName = &v 8639 return s 8640} 8641 8642// SetMetricTransformations sets the MetricTransformations field's value. 8643func (s *PutMetricFilterInput) SetMetricTransformations(v []*MetricTransformation) *PutMetricFilterInput { 8644 s.MetricTransformations = v 8645 return s 8646} 8647 8648type PutMetricFilterOutput struct { 8649 _ struct{} `type:"structure"` 8650} 8651 8652// String returns the string representation 8653func (s PutMetricFilterOutput) String() string { 8654 return awsutil.Prettify(s) 8655} 8656 8657// GoString returns the string representation 8658func (s PutMetricFilterOutput) GoString() string { 8659 return s.String() 8660} 8661 8662type PutQueryDefinitionInput struct { 8663 _ struct{} `type:"structure"` 8664 8665 // Use this parameter to include specific log groups as part of your query definition. 8666 // 8667 // If you are updating a query definition and you omit this parameter, then 8668 // the updated definition will contain no log groups. 8669 LogGroupNames []*string `locationName:"logGroupNames" type:"list"` 8670 8671 // A name for the query definition. If you are saving a lot of query definitions, 8672 // we recommend that you name them so that you can easily find the ones you 8673 // want by using the first part of the name as a filter in the queryDefinitionNamePrefix 8674 // parameter of DescribeQueryDefinitions (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html). 8675 // 8676 // Name is a required field 8677 Name *string `locationName:"name" min:"1" type:"string" required:"true"` 8678 8679 // If you are updating a query definition, use this parameter to specify the 8680 // ID of the query definition that you want to update. You can use DescribeQueryDefinitions 8681 // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html) 8682 // to retrieve the IDs of your saved query definitions. 8683 // 8684 // If you are creating a query definition, do not specify this parameter. CloudWatch 8685 // generates a unique ID for the new query definition and include it in the 8686 // response to this operation. 8687 QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string"` 8688 8689 // The query string to use for this definition. For more information, see CloudWatch 8690 // Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 8691 // 8692 // QueryString is a required field 8693 QueryString *string `locationName:"queryString" min:"1" type:"string" required:"true"` 8694} 8695 8696// String returns the string representation 8697func (s PutQueryDefinitionInput) String() string { 8698 return awsutil.Prettify(s) 8699} 8700 8701// GoString returns the string representation 8702func (s PutQueryDefinitionInput) GoString() string { 8703 return s.String() 8704} 8705 8706// Validate inspects the fields of the type to determine if they are valid. 8707func (s *PutQueryDefinitionInput) Validate() error { 8708 invalidParams := request.ErrInvalidParams{Context: "PutQueryDefinitionInput"} 8709 if s.Name == nil { 8710 invalidParams.Add(request.NewErrParamRequired("Name")) 8711 } 8712 if s.Name != nil && len(*s.Name) < 1 { 8713 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 8714 } 8715 if s.QueryString == nil { 8716 invalidParams.Add(request.NewErrParamRequired("QueryString")) 8717 } 8718 if s.QueryString != nil && len(*s.QueryString) < 1 { 8719 invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) 8720 } 8721 8722 if invalidParams.Len() > 0 { 8723 return invalidParams 8724 } 8725 return nil 8726} 8727 8728// SetLogGroupNames sets the LogGroupNames field's value. 8729func (s *PutQueryDefinitionInput) SetLogGroupNames(v []*string) *PutQueryDefinitionInput { 8730 s.LogGroupNames = v 8731 return s 8732} 8733 8734// SetName sets the Name field's value. 8735func (s *PutQueryDefinitionInput) SetName(v string) *PutQueryDefinitionInput { 8736 s.Name = &v 8737 return s 8738} 8739 8740// SetQueryDefinitionId sets the QueryDefinitionId field's value. 8741func (s *PutQueryDefinitionInput) SetQueryDefinitionId(v string) *PutQueryDefinitionInput { 8742 s.QueryDefinitionId = &v 8743 return s 8744} 8745 8746// SetQueryString sets the QueryString field's value. 8747func (s *PutQueryDefinitionInput) SetQueryString(v string) *PutQueryDefinitionInput { 8748 s.QueryString = &v 8749 return s 8750} 8751 8752type PutQueryDefinitionOutput struct { 8753 _ struct{} `type:"structure"` 8754 8755 // The ID of the query definition. 8756 QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string"` 8757} 8758 8759// String returns the string representation 8760func (s PutQueryDefinitionOutput) String() string { 8761 return awsutil.Prettify(s) 8762} 8763 8764// GoString returns the string representation 8765func (s PutQueryDefinitionOutput) GoString() string { 8766 return s.String() 8767} 8768 8769// SetQueryDefinitionId sets the QueryDefinitionId field's value. 8770func (s *PutQueryDefinitionOutput) SetQueryDefinitionId(v string) *PutQueryDefinitionOutput { 8771 s.QueryDefinitionId = &v 8772 return s 8773} 8774 8775type PutResourcePolicyInput struct { 8776 _ struct{} `type:"structure"` 8777 8778 // Details of the new policy, including the identity of the principal that is 8779 // enabled to put logs to this account. This is formatted as a JSON string. 8780 // This parameter is required. 8781 // 8782 // The following example creates a resource policy enabling the Route 53 service 8783 // to put DNS query logs in to the specified log group. Replace "logArn" with 8784 // the ARN of your CloudWatch Logs resource, such as a log group or log stream. 8785 // 8786 // CloudWatch Logs also supports aws:SourceArn (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn) 8787 // and aws:SourceAccount (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceaccount) 8788 // condition context keys. 8789 // 8790 // In the example resource policy, you would replace the value of SourceArn 8791 // with the resource making the call from Route 53 to CloudWatch Logs and replace 8792 // the value of SourceAccount with the Amazon Web Services account ID making 8793 // that call. 8794 // 8795 // { "Version": "2012-10-17", "Statement": [ { "Sid": "Route53LogsToCloudWatchLogs", 8796 // "Effect": "Allow", "Principal": { "Service": [ "route53.amazonaws.com" ] 8797 // }, "Action": "logs:PutLogEvents", "Resource": "logArn", "Condition": { "ArnLike": 8798 // { "aws:SourceArn": "myRoute53ResourceArn" }, "StringEquals": { "aws:SourceAccount": 8799 // "myAwsAccountId" } } } ] } 8800 PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` 8801 8802 // Name of the new policy. This parameter is required. 8803 PolicyName *string `locationName:"policyName" type:"string"` 8804} 8805 8806// String returns the string representation 8807func (s PutResourcePolicyInput) String() string { 8808 return awsutil.Prettify(s) 8809} 8810 8811// GoString returns the string representation 8812func (s PutResourcePolicyInput) GoString() string { 8813 return s.String() 8814} 8815 8816// Validate inspects the fields of the type to determine if they are valid. 8817func (s *PutResourcePolicyInput) Validate() error { 8818 invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} 8819 if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { 8820 invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) 8821 } 8822 8823 if invalidParams.Len() > 0 { 8824 return invalidParams 8825 } 8826 return nil 8827} 8828 8829// SetPolicyDocument sets the PolicyDocument field's value. 8830func (s *PutResourcePolicyInput) SetPolicyDocument(v string) *PutResourcePolicyInput { 8831 s.PolicyDocument = &v 8832 return s 8833} 8834 8835// SetPolicyName sets the PolicyName field's value. 8836func (s *PutResourcePolicyInput) SetPolicyName(v string) *PutResourcePolicyInput { 8837 s.PolicyName = &v 8838 return s 8839} 8840 8841type PutResourcePolicyOutput struct { 8842 _ struct{} `type:"structure"` 8843 8844 // The new policy. 8845 ResourcePolicy *ResourcePolicy `locationName:"resourcePolicy" type:"structure"` 8846} 8847 8848// String returns the string representation 8849func (s PutResourcePolicyOutput) String() string { 8850 return awsutil.Prettify(s) 8851} 8852 8853// GoString returns the string representation 8854func (s PutResourcePolicyOutput) GoString() string { 8855 return s.String() 8856} 8857 8858// SetResourcePolicy sets the ResourcePolicy field's value. 8859func (s *PutResourcePolicyOutput) SetResourcePolicy(v *ResourcePolicy) *PutResourcePolicyOutput { 8860 s.ResourcePolicy = v 8861 return s 8862} 8863 8864type PutRetentionPolicyInput struct { 8865 _ struct{} `type:"structure"` 8866 8867 // The name of the log group. 8868 // 8869 // LogGroupName is a required field 8870 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 8871 8872 // The number of days to retain the log events in the specified log group. Possible 8873 // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 8874 // 1827, and 3653. 8875 // 8876 // To set a log group to never have log events expire, use DeleteRetentionPolicy 8877 // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html). 8878 // 8879 // RetentionInDays is a required field 8880 RetentionInDays *int64 `locationName:"retentionInDays" type:"integer" required:"true"` 8881} 8882 8883// String returns the string representation 8884func (s PutRetentionPolicyInput) String() string { 8885 return awsutil.Prettify(s) 8886} 8887 8888// GoString returns the string representation 8889func (s PutRetentionPolicyInput) GoString() string { 8890 return s.String() 8891} 8892 8893// Validate inspects the fields of the type to determine if they are valid. 8894func (s *PutRetentionPolicyInput) Validate() error { 8895 invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"} 8896 if s.LogGroupName == nil { 8897 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 8898 } 8899 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 8900 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 8901 } 8902 if s.RetentionInDays == nil { 8903 invalidParams.Add(request.NewErrParamRequired("RetentionInDays")) 8904 } 8905 8906 if invalidParams.Len() > 0 { 8907 return invalidParams 8908 } 8909 return nil 8910} 8911 8912// SetLogGroupName sets the LogGroupName field's value. 8913func (s *PutRetentionPolicyInput) SetLogGroupName(v string) *PutRetentionPolicyInput { 8914 s.LogGroupName = &v 8915 return s 8916} 8917 8918// SetRetentionInDays sets the RetentionInDays field's value. 8919func (s *PutRetentionPolicyInput) SetRetentionInDays(v int64) *PutRetentionPolicyInput { 8920 s.RetentionInDays = &v 8921 return s 8922} 8923 8924type PutRetentionPolicyOutput struct { 8925 _ struct{} `type:"structure"` 8926} 8927 8928// String returns the string representation 8929func (s PutRetentionPolicyOutput) String() string { 8930 return awsutil.Prettify(s) 8931} 8932 8933// GoString returns the string representation 8934func (s PutRetentionPolicyOutput) GoString() string { 8935 return s.String() 8936} 8937 8938type PutSubscriptionFilterInput struct { 8939 _ struct{} `type:"structure"` 8940 8941 // The ARN of the destination to deliver matching log events to. Currently, 8942 // the supported destinations are: 8943 // 8944 // * An Amazon Kinesis stream belonging to the same account as the subscription 8945 // filter, for same-account delivery. 8946 // 8947 // * A logical destination (specified using an ARN) belonging to a different 8948 // account, for cross-account delivery. If you are setting up a cross-account 8949 // subscription, the destination must have an IAM policy associated with 8950 // it that allows the sender to send logs to the destination. For more information, 8951 // see PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html). 8952 // 8953 // * An Amazon Kinesis Firehose delivery stream belonging to the same account 8954 // as the subscription filter, for same-account delivery. 8955 // 8956 // * A Lambda function belonging to the same account as the subscription 8957 // filter, for same-account delivery. 8958 // 8959 // DestinationArn is a required field 8960 DestinationArn *string `locationName:"destinationArn" min:"1" type:"string" required:"true"` 8961 8962 // The method used to distribute log data to the destination. By default, log 8963 // data is grouped by log stream, but the grouping can be set to random for 8964 // a more even distribution. This property is only applicable when the destination 8965 // is an Amazon Kinesis stream. 8966 Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"` 8967 8968 // A name for the subscription filter. If you are updating an existing filter, 8969 // you must specify the correct name in filterName. To find the name of the 8970 // filter currently associated with a log group, use DescribeSubscriptionFilters 8971 // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeSubscriptionFilters.html). 8972 // 8973 // FilterName is a required field 8974 FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` 8975 8976 // A filter pattern for subscribing to a filtered stream of log events. 8977 // 8978 // FilterPattern is a required field 8979 FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` 8980 8981 // The name of the log group. 8982 // 8983 // LogGroupName is a required field 8984 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 8985 8986 // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver 8987 // ingested log events to the destination stream. You don't need to provide 8988 // the ARN when you are working with a logical destination for cross-account 8989 // delivery. 8990 RoleArn *string `locationName:"roleArn" min:"1" type:"string"` 8991} 8992 8993// String returns the string representation 8994func (s PutSubscriptionFilterInput) String() string { 8995 return awsutil.Prettify(s) 8996} 8997 8998// GoString returns the string representation 8999func (s PutSubscriptionFilterInput) GoString() string { 9000 return s.String() 9001} 9002 9003// Validate inspects the fields of the type to determine if they are valid. 9004func (s *PutSubscriptionFilterInput) Validate() error { 9005 invalidParams := request.ErrInvalidParams{Context: "PutSubscriptionFilterInput"} 9006 if s.DestinationArn == nil { 9007 invalidParams.Add(request.NewErrParamRequired("DestinationArn")) 9008 } 9009 if s.DestinationArn != nil && len(*s.DestinationArn) < 1 { 9010 invalidParams.Add(request.NewErrParamMinLen("DestinationArn", 1)) 9011 } 9012 if s.FilterName == nil { 9013 invalidParams.Add(request.NewErrParamRequired("FilterName")) 9014 } 9015 if s.FilterName != nil && len(*s.FilterName) < 1 { 9016 invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) 9017 } 9018 if s.FilterPattern == nil { 9019 invalidParams.Add(request.NewErrParamRequired("FilterPattern")) 9020 } 9021 if s.LogGroupName == nil { 9022 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 9023 } 9024 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 9025 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 9026 } 9027 if s.RoleArn != nil && len(*s.RoleArn) < 1 { 9028 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) 9029 } 9030 9031 if invalidParams.Len() > 0 { 9032 return invalidParams 9033 } 9034 return nil 9035} 9036 9037// SetDestinationArn sets the DestinationArn field's value. 9038func (s *PutSubscriptionFilterInput) SetDestinationArn(v string) *PutSubscriptionFilterInput { 9039 s.DestinationArn = &v 9040 return s 9041} 9042 9043// SetDistribution sets the Distribution field's value. 9044func (s *PutSubscriptionFilterInput) SetDistribution(v string) *PutSubscriptionFilterInput { 9045 s.Distribution = &v 9046 return s 9047} 9048 9049// SetFilterName sets the FilterName field's value. 9050func (s *PutSubscriptionFilterInput) SetFilterName(v string) *PutSubscriptionFilterInput { 9051 s.FilterName = &v 9052 return s 9053} 9054 9055// SetFilterPattern sets the FilterPattern field's value. 9056func (s *PutSubscriptionFilterInput) SetFilterPattern(v string) *PutSubscriptionFilterInput { 9057 s.FilterPattern = &v 9058 return s 9059} 9060 9061// SetLogGroupName sets the LogGroupName field's value. 9062func (s *PutSubscriptionFilterInput) SetLogGroupName(v string) *PutSubscriptionFilterInput { 9063 s.LogGroupName = &v 9064 return s 9065} 9066 9067// SetRoleArn sets the RoleArn field's value. 9068func (s *PutSubscriptionFilterInput) SetRoleArn(v string) *PutSubscriptionFilterInput { 9069 s.RoleArn = &v 9070 return s 9071} 9072 9073type PutSubscriptionFilterOutput struct { 9074 _ struct{} `type:"structure"` 9075} 9076 9077// String returns the string representation 9078func (s PutSubscriptionFilterOutput) String() string { 9079 return awsutil.Prettify(s) 9080} 9081 9082// GoString returns the string representation 9083func (s PutSubscriptionFilterOutput) GoString() string { 9084 return s.String() 9085} 9086 9087// Reserved. 9088type QueryCompileError struct { 9089 _ struct{} `type:"structure"` 9090 9091 // Reserved. 9092 Location *QueryCompileErrorLocation `locationName:"location" type:"structure"` 9093 9094 // Reserved. 9095 Message *string `locationName:"message" type:"string"` 9096} 9097 9098// String returns the string representation 9099func (s QueryCompileError) String() string { 9100 return awsutil.Prettify(s) 9101} 9102 9103// GoString returns the string representation 9104func (s QueryCompileError) GoString() string { 9105 return s.String() 9106} 9107 9108// SetLocation sets the Location field's value. 9109func (s *QueryCompileError) SetLocation(v *QueryCompileErrorLocation) *QueryCompileError { 9110 s.Location = v 9111 return s 9112} 9113 9114// SetMessage sets the Message field's value. 9115func (s *QueryCompileError) SetMessage(v string) *QueryCompileError { 9116 s.Message = &v 9117 return s 9118} 9119 9120// Reserved. 9121type QueryCompileErrorLocation struct { 9122 _ struct{} `type:"structure"` 9123 9124 // Reserved. 9125 EndCharOffset *int64 `locationName:"endCharOffset" type:"integer"` 9126 9127 // Reserved. 9128 StartCharOffset *int64 `locationName:"startCharOffset" type:"integer"` 9129} 9130 9131// String returns the string representation 9132func (s QueryCompileErrorLocation) String() string { 9133 return awsutil.Prettify(s) 9134} 9135 9136// GoString returns the string representation 9137func (s QueryCompileErrorLocation) GoString() string { 9138 return s.String() 9139} 9140 9141// SetEndCharOffset sets the EndCharOffset field's value. 9142func (s *QueryCompileErrorLocation) SetEndCharOffset(v int64) *QueryCompileErrorLocation { 9143 s.EndCharOffset = &v 9144 return s 9145} 9146 9147// SetStartCharOffset sets the StartCharOffset field's value. 9148func (s *QueryCompileErrorLocation) SetStartCharOffset(v int64) *QueryCompileErrorLocation { 9149 s.StartCharOffset = &v 9150 return s 9151} 9152 9153// This structure contains details about a saved CloudWatch Logs Insights query 9154// definition. 9155type QueryDefinition struct { 9156 _ struct{} `type:"structure"` 9157 9158 // The date that the query definition was most recently modified. 9159 LastModified *int64 `locationName:"lastModified" type:"long"` 9160 9161 // If this query definition contains a list of log groups that it is limited 9162 // to, that list appears here. 9163 LogGroupNames []*string `locationName:"logGroupNames" type:"list"` 9164 9165 // The name of the query definition. 9166 Name *string `locationName:"name" min:"1" type:"string"` 9167 9168 // The unique ID of the query definition. 9169 QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string"` 9170 9171 // The query string to use for this definition. For more information, see CloudWatch 9172 // Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 9173 QueryString *string `locationName:"queryString" min:"1" type:"string"` 9174} 9175 9176// String returns the string representation 9177func (s QueryDefinition) String() string { 9178 return awsutil.Prettify(s) 9179} 9180 9181// GoString returns the string representation 9182func (s QueryDefinition) GoString() string { 9183 return s.String() 9184} 9185 9186// SetLastModified sets the LastModified field's value. 9187func (s *QueryDefinition) SetLastModified(v int64) *QueryDefinition { 9188 s.LastModified = &v 9189 return s 9190} 9191 9192// SetLogGroupNames sets the LogGroupNames field's value. 9193func (s *QueryDefinition) SetLogGroupNames(v []*string) *QueryDefinition { 9194 s.LogGroupNames = v 9195 return s 9196} 9197 9198// SetName sets the Name field's value. 9199func (s *QueryDefinition) SetName(v string) *QueryDefinition { 9200 s.Name = &v 9201 return s 9202} 9203 9204// SetQueryDefinitionId sets the QueryDefinitionId field's value. 9205func (s *QueryDefinition) SetQueryDefinitionId(v string) *QueryDefinition { 9206 s.QueryDefinitionId = &v 9207 return s 9208} 9209 9210// SetQueryString sets the QueryString field's value. 9211func (s *QueryDefinition) SetQueryString(v string) *QueryDefinition { 9212 s.QueryString = &v 9213 return s 9214} 9215 9216// Information about one CloudWatch Logs Insights query that matches the request 9217// in a DescribeQueries operation. 9218type QueryInfo struct { 9219 _ struct{} `type:"structure"` 9220 9221 // The date and time that this query was created. 9222 CreateTime *int64 `locationName:"createTime" type:"long"` 9223 9224 // The name of the log group scanned by this query. 9225 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 9226 9227 // The unique ID number of this query. 9228 QueryId *string `locationName:"queryId" type:"string"` 9229 9230 // The query string used in this query. 9231 QueryString *string `locationName:"queryString" type:"string"` 9232 9233 // The status of this query. Possible values are Cancelled, Complete, Failed, 9234 // Running, Scheduled, and Unknown. 9235 Status *string `locationName:"status" type:"string" enum:"QueryStatus"` 9236} 9237 9238// String returns the string representation 9239func (s QueryInfo) String() string { 9240 return awsutil.Prettify(s) 9241} 9242 9243// GoString returns the string representation 9244func (s QueryInfo) GoString() string { 9245 return s.String() 9246} 9247 9248// SetCreateTime sets the CreateTime field's value. 9249func (s *QueryInfo) SetCreateTime(v int64) *QueryInfo { 9250 s.CreateTime = &v 9251 return s 9252} 9253 9254// SetLogGroupName sets the LogGroupName field's value. 9255func (s *QueryInfo) SetLogGroupName(v string) *QueryInfo { 9256 s.LogGroupName = &v 9257 return s 9258} 9259 9260// SetQueryId sets the QueryId field's value. 9261func (s *QueryInfo) SetQueryId(v string) *QueryInfo { 9262 s.QueryId = &v 9263 return s 9264} 9265 9266// SetQueryString sets the QueryString field's value. 9267func (s *QueryInfo) SetQueryString(v string) *QueryInfo { 9268 s.QueryString = &v 9269 return s 9270} 9271 9272// SetStatus sets the Status field's value. 9273func (s *QueryInfo) SetStatus(v string) *QueryInfo { 9274 s.Status = &v 9275 return s 9276} 9277 9278// Contains the number of log events scanned by the query, the number of log 9279// events that matched the query criteria, and the total number of bytes in 9280// the log events that were scanned. 9281type QueryStatistics struct { 9282 _ struct{} `type:"structure"` 9283 9284 // The total number of bytes in the log events scanned during the query. 9285 BytesScanned *float64 `locationName:"bytesScanned" type:"double"` 9286 9287 // The number of log events that matched the query string. 9288 RecordsMatched *float64 `locationName:"recordsMatched" type:"double"` 9289 9290 // The total number of log events scanned during the query. 9291 RecordsScanned *float64 `locationName:"recordsScanned" type:"double"` 9292} 9293 9294// String returns the string representation 9295func (s QueryStatistics) String() string { 9296 return awsutil.Prettify(s) 9297} 9298 9299// GoString returns the string representation 9300func (s QueryStatistics) GoString() string { 9301 return s.String() 9302} 9303 9304// SetBytesScanned sets the BytesScanned field's value. 9305func (s *QueryStatistics) SetBytesScanned(v float64) *QueryStatistics { 9306 s.BytesScanned = &v 9307 return s 9308} 9309 9310// SetRecordsMatched sets the RecordsMatched field's value. 9311func (s *QueryStatistics) SetRecordsMatched(v float64) *QueryStatistics { 9312 s.RecordsMatched = &v 9313 return s 9314} 9315 9316// SetRecordsScanned sets the RecordsScanned field's value. 9317func (s *QueryStatistics) SetRecordsScanned(v float64) *QueryStatistics { 9318 s.RecordsScanned = &v 9319 return s 9320} 9321 9322// Represents the rejected events. 9323type RejectedLogEventsInfo struct { 9324 _ struct{} `type:"structure"` 9325 9326 // The expired log events. 9327 ExpiredLogEventEndIndex *int64 `locationName:"expiredLogEventEndIndex" type:"integer"` 9328 9329 // The log events that are too new. 9330 TooNewLogEventStartIndex *int64 `locationName:"tooNewLogEventStartIndex" type:"integer"` 9331 9332 // The log events that are too old. 9333 TooOldLogEventEndIndex *int64 `locationName:"tooOldLogEventEndIndex" type:"integer"` 9334} 9335 9336// String returns the string representation 9337func (s RejectedLogEventsInfo) String() string { 9338 return awsutil.Prettify(s) 9339} 9340 9341// GoString returns the string representation 9342func (s RejectedLogEventsInfo) GoString() string { 9343 return s.String() 9344} 9345 9346// SetExpiredLogEventEndIndex sets the ExpiredLogEventEndIndex field's value. 9347func (s *RejectedLogEventsInfo) SetExpiredLogEventEndIndex(v int64) *RejectedLogEventsInfo { 9348 s.ExpiredLogEventEndIndex = &v 9349 return s 9350} 9351 9352// SetTooNewLogEventStartIndex sets the TooNewLogEventStartIndex field's value. 9353func (s *RejectedLogEventsInfo) SetTooNewLogEventStartIndex(v int64) *RejectedLogEventsInfo { 9354 s.TooNewLogEventStartIndex = &v 9355 return s 9356} 9357 9358// SetTooOldLogEventEndIndex sets the TooOldLogEventEndIndex field's value. 9359func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogEventsInfo { 9360 s.TooOldLogEventEndIndex = &v 9361 return s 9362} 9363 9364// The specified resource already exists. 9365type ResourceAlreadyExistsException struct { 9366 _ struct{} `type:"structure"` 9367 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9368 9369 Message_ *string `locationName:"message" type:"string"` 9370} 9371 9372// String returns the string representation 9373func (s ResourceAlreadyExistsException) String() string { 9374 return awsutil.Prettify(s) 9375} 9376 9377// GoString returns the string representation 9378func (s ResourceAlreadyExistsException) GoString() string { 9379 return s.String() 9380} 9381 9382func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { 9383 return &ResourceAlreadyExistsException{ 9384 RespMetadata: v, 9385 } 9386} 9387 9388// Code returns the exception type name. 9389func (s *ResourceAlreadyExistsException) Code() string { 9390 return "ResourceAlreadyExistsException" 9391} 9392 9393// Message returns the exception's message. 9394func (s *ResourceAlreadyExistsException) Message() string { 9395 if s.Message_ != nil { 9396 return *s.Message_ 9397 } 9398 return "" 9399} 9400 9401// OrigErr always returns nil, satisfies awserr.Error interface. 9402func (s *ResourceAlreadyExistsException) OrigErr() error { 9403 return nil 9404} 9405 9406func (s *ResourceAlreadyExistsException) Error() string { 9407 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 9408} 9409 9410// Status code returns the HTTP status code for the request's response error. 9411func (s *ResourceAlreadyExistsException) StatusCode() int { 9412 return s.RespMetadata.StatusCode 9413} 9414 9415// RequestID returns the service's response RequestID for request. 9416func (s *ResourceAlreadyExistsException) RequestID() string { 9417 return s.RespMetadata.RequestID 9418} 9419 9420// The specified resource does not exist. 9421type ResourceNotFoundException struct { 9422 _ struct{} `type:"structure"` 9423 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9424 9425 Message_ *string `locationName:"message" type:"string"` 9426} 9427 9428// String returns the string representation 9429func (s ResourceNotFoundException) String() string { 9430 return awsutil.Prettify(s) 9431} 9432 9433// GoString returns the string representation 9434func (s ResourceNotFoundException) GoString() string { 9435 return s.String() 9436} 9437 9438func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 9439 return &ResourceNotFoundException{ 9440 RespMetadata: v, 9441 } 9442} 9443 9444// Code returns the exception type name. 9445func (s *ResourceNotFoundException) Code() string { 9446 return "ResourceNotFoundException" 9447} 9448 9449// Message returns the exception's message. 9450func (s *ResourceNotFoundException) Message() string { 9451 if s.Message_ != nil { 9452 return *s.Message_ 9453 } 9454 return "" 9455} 9456 9457// OrigErr always returns nil, satisfies awserr.Error interface. 9458func (s *ResourceNotFoundException) OrigErr() error { 9459 return nil 9460} 9461 9462func (s *ResourceNotFoundException) Error() string { 9463 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 9464} 9465 9466// Status code returns the HTTP status code for the request's response error. 9467func (s *ResourceNotFoundException) StatusCode() int { 9468 return s.RespMetadata.StatusCode 9469} 9470 9471// RequestID returns the service's response RequestID for request. 9472func (s *ResourceNotFoundException) RequestID() string { 9473 return s.RespMetadata.RequestID 9474} 9475 9476// A policy enabling one or more entities to put logs to a log group in this 9477// account. 9478type ResourcePolicy struct { 9479 _ struct{} `type:"structure"` 9480 9481 // Timestamp showing when this policy was last updated, expressed as the number 9482 // of milliseconds after Jan 1, 1970 00:00:00 UTC. 9483 LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` 9484 9485 // The details of the policy. 9486 PolicyDocument *string `locationName:"policyDocument" min:"1" type:"string"` 9487 9488 // The name of the resource policy. 9489 PolicyName *string `locationName:"policyName" type:"string"` 9490} 9491 9492// String returns the string representation 9493func (s ResourcePolicy) String() string { 9494 return awsutil.Prettify(s) 9495} 9496 9497// GoString returns the string representation 9498func (s ResourcePolicy) GoString() string { 9499 return s.String() 9500} 9501 9502// SetLastUpdatedTime sets the LastUpdatedTime field's value. 9503func (s *ResourcePolicy) SetLastUpdatedTime(v int64) *ResourcePolicy { 9504 s.LastUpdatedTime = &v 9505 return s 9506} 9507 9508// SetPolicyDocument sets the PolicyDocument field's value. 9509func (s *ResourcePolicy) SetPolicyDocument(v string) *ResourcePolicy { 9510 s.PolicyDocument = &v 9511 return s 9512} 9513 9514// SetPolicyName sets the PolicyName field's value. 9515func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy { 9516 s.PolicyName = &v 9517 return s 9518} 9519 9520// Contains one field from one log event returned by a CloudWatch Logs Insights 9521// query, along with the value of that field. 9522// 9523// For more information about the fields that are generated by CloudWatch logs, 9524// see Supported Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). 9525type ResultField struct { 9526 _ struct{} `type:"structure"` 9527 9528 // The log event field. 9529 Field *string `locationName:"field" type:"string"` 9530 9531 // The value of this field. 9532 Value *string `locationName:"value" type:"string"` 9533} 9534 9535// String returns the string representation 9536func (s ResultField) String() string { 9537 return awsutil.Prettify(s) 9538} 9539 9540// GoString returns the string representation 9541func (s ResultField) GoString() string { 9542 return s.String() 9543} 9544 9545// SetField sets the Field field's value. 9546func (s *ResultField) SetField(v string) *ResultField { 9547 s.Field = &v 9548 return s 9549} 9550 9551// SetValue sets the Value field's value. 9552func (s *ResultField) SetValue(v string) *ResultField { 9553 s.Value = &v 9554 return s 9555} 9556 9557// Represents the search status of a log stream. 9558type SearchedLogStream struct { 9559 _ struct{} `type:"structure"` 9560 9561 // The name of the log stream. 9562 LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` 9563 9564 // Indicates whether all the events in this log stream were searched. 9565 SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` 9566} 9567 9568// String returns the string representation 9569func (s SearchedLogStream) String() string { 9570 return awsutil.Prettify(s) 9571} 9572 9573// GoString returns the string representation 9574func (s SearchedLogStream) GoString() string { 9575 return s.String() 9576} 9577 9578// SetLogStreamName sets the LogStreamName field's value. 9579func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream { 9580 s.LogStreamName = &v 9581 return s 9582} 9583 9584// SetSearchedCompletely sets the SearchedCompletely field's value. 9585func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { 9586 s.SearchedCompletely = &v 9587 return s 9588} 9589 9590// The service cannot complete the request. 9591type ServiceUnavailableException struct { 9592 _ struct{} `type:"structure"` 9593 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9594 9595 Message_ *string `locationName:"message" type:"string"` 9596} 9597 9598// String returns the string representation 9599func (s ServiceUnavailableException) String() string { 9600 return awsutil.Prettify(s) 9601} 9602 9603// GoString returns the string representation 9604func (s ServiceUnavailableException) GoString() string { 9605 return s.String() 9606} 9607 9608func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { 9609 return &ServiceUnavailableException{ 9610 RespMetadata: v, 9611 } 9612} 9613 9614// Code returns the exception type name. 9615func (s *ServiceUnavailableException) Code() string { 9616 return "ServiceUnavailableException" 9617} 9618 9619// Message returns the exception's message. 9620func (s *ServiceUnavailableException) Message() string { 9621 if s.Message_ != nil { 9622 return *s.Message_ 9623 } 9624 return "" 9625} 9626 9627// OrigErr always returns nil, satisfies awserr.Error interface. 9628func (s *ServiceUnavailableException) OrigErr() error { 9629 return nil 9630} 9631 9632func (s *ServiceUnavailableException) Error() string { 9633 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 9634} 9635 9636// Status code returns the HTTP status code for the request's response error. 9637func (s *ServiceUnavailableException) StatusCode() int { 9638 return s.RespMetadata.StatusCode 9639} 9640 9641// RequestID returns the service's response RequestID for request. 9642func (s *ServiceUnavailableException) RequestID() string { 9643 return s.RespMetadata.RequestID 9644} 9645 9646type StartQueryInput struct { 9647 _ struct{} `type:"structure"` 9648 9649 // The end of the time range to query. The range is inclusive, so the specified 9650 // end time is included in the query. Specified as epoch time, the number of 9651 // seconds since January 1, 1970, 00:00:00 UTC. 9652 // 9653 // EndTime is a required field 9654 EndTime *int64 `locationName:"endTime" type:"long" required:"true"` 9655 9656 // The maximum number of log events to return in the query. If the query string 9657 // uses the fields command, only the specified fields and their values are returned. 9658 // The default is 1000. 9659 Limit *int64 `locationName:"limit" min:"1" type:"integer"` 9660 9661 // The log group on which to perform the query. 9662 // 9663 // A StartQuery operation must include a logGroupNames or a logGroupName parameter, 9664 // but not both. 9665 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 9666 9667 // The list of log groups to be queried. You can include up to 20 log groups. 9668 // 9669 // A StartQuery operation must include a logGroupNames or a logGroupName parameter, 9670 // but not both. 9671 LogGroupNames []*string `locationName:"logGroupNames" type:"list"` 9672 9673 // The query string to use. For more information, see CloudWatch Logs Insights 9674 // Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). 9675 // 9676 // QueryString is a required field 9677 QueryString *string `locationName:"queryString" type:"string" required:"true"` 9678 9679 // The beginning of the time range to query. The range is inclusive, so the 9680 // specified start time is included in the query. Specified as epoch time, the 9681 // number of seconds since January 1, 1970, 00:00:00 UTC. 9682 // 9683 // StartTime is a required field 9684 StartTime *int64 `locationName:"startTime" type:"long" required:"true"` 9685} 9686 9687// String returns the string representation 9688func (s StartQueryInput) String() string { 9689 return awsutil.Prettify(s) 9690} 9691 9692// GoString returns the string representation 9693func (s StartQueryInput) GoString() string { 9694 return s.String() 9695} 9696 9697// Validate inspects the fields of the type to determine if they are valid. 9698func (s *StartQueryInput) Validate() error { 9699 invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"} 9700 if s.EndTime == nil { 9701 invalidParams.Add(request.NewErrParamRequired("EndTime")) 9702 } 9703 if s.Limit != nil && *s.Limit < 1 { 9704 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 9705 } 9706 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 9707 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 9708 } 9709 if s.QueryString == nil { 9710 invalidParams.Add(request.NewErrParamRequired("QueryString")) 9711 } 9712 if s.StartTime == nil { 9713 invalidParams.Add(request.NewErrParamRequired("StartTime")) 9714 } 9715 9716 if invalidParams.Len() > 0 { 9717 return invalidParams 9718 } 9719 return nil 9720} 9721 9722// SetEndTime sets the EndTime field's value. 9723func (s *StartQueryInput) SetEndTime(v int64) *StartQueryInput { 9724 s.EndTime = &v 9725 return s 9726} 9727 9728// SetLimit sets the Limit field's value. 9729func (s *StartQueryInput) SetLimit(v int64) *StartQueryInput { 9730 s.Limit = &v 9731 return s 9732} 9733 9734// SetLogGroupName sets the LogGroupName field's value. 9735func (s *StartQueryInput) SetLogGroupName(v string) *StartQueryInput { 9736 s.LogGroupName = &v 9737 return s 9738} 9739 9740// SetLogGroupNames sets the LogGroupNames field's value. 9741func (s *StartQueryInput) SetLogGroupNames(v []*string) *StartQueryInput { 9742 s.LogGroupNames = v 9743 return s 9744} 9745 9746// SetQueryString sets the QueryString field's value. 9747func (s *StartQueryInput) SetQueryString(v string) *StartQueryInput { 9748 s.QueryString = &v 9749 return s 9750} 9751 9752// SetStartTime sets the StartTime field's value. 9753func (s *StartQueryInput) SetStartTime(v int64) *StartQueryInput { 9754 s.StartTime = &v 9755 return s 9756} 9757 9758type StartQueryOutput struct { 9759 _ struct{} `type:"structure"` 9760 9761 // The unique ID of the query. 9762 QueryId *string `locationName:"queryId" type:"string"` 9763} 9764 9765// String returns the string representation 9766func (s StartQueryOutput) String() string { 9767 return awsutil.Prettify(s) 9768} 9769 9770// GoString returns the string representation 9771func (s StartQueryOutput) GoString() string { 9772 return s.String() 9773} 9774 9775// SetQueryId sets the QueryId field's value. 9776func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput { 9777 s.QueryId = &v 9778 return s 9779} 9780 9781type StopQueryInput struct { 9782 _ struct{} `type:"structure"` 9783 9784 // The ID number of the query to stop. To find this ID number, use DescribeQueries. 9785 // 9786 // QueryId is a required field 9787 QueryId *string `locationName:"queryId" type:"string" required:"true"` 9788} 9789 9790// String returns the string representation 9791func (s StopQueryInput) String() string { 9792 return awsutil.Prettify(s) 9793} 9794 9795// GoString returns the string representation 9796func (s StopQueryInput) GoString() string { 9797 return s.String() 9798} 9799 9800// Validate inspects the fields of the type to determine if they are valid. 9801func (s *StopQueryInput) Validate() error { 9802 invalidParams := request.ErrInvalidParams{Context: "StopQueryInput"} 9803 if s.QueryId == nil { 9804 invalidParams.Add(request.NewErrParamRequired("QueryId")) 9805 } 9806 9807 if invalidParams.Len() > 0 { 9808 return invalidParams 9809 } 9810 return nil 9811} 9812 9813// SetQueryId sets the QueryId field's value. 9814func (s *StopQueryInput) SetQueryId(v string) *StopQueryInput { 9815 s.QueryId = &v 9816 return s 9817} 9818 9819type StopQueryOutput struct { 9820 _ struct{} `type:"structure"` 9821 9822 // This is true if the query was stopped by the StopQuery operation. 9823 Success *bool `locationName:"success" type:"boolean"` 9824} 9825 9826// String returns the string representation 9827func (s StopQueryOutput) String() string { 9828 return awsutil.Prettify(s) 9829} 9830 9831// GoString returns the string representation 9832func (s StopQueryOutput) GoString() string { 9833 return s.String() 9834} 9835 9836// SetSuccess sets the Success field's value. 9837func (s *StopQueryOutput) SetSuccess(v bool) *StopQueryOutput { 9838 s.Success = &v 9839 return s 9840} 9841 9842// Represents a subscription filter. 9843type SubscriptionFilter struct { 9844 _ struct{} `type:"structure"` 9845 9846 // The creation time of the subscription filter, expressed as the number of 9847 // milliseconds after Jan 1, 1970 00:00:00 UTC. 9848 CreationTime *int64 `locationName:"creationTime" type:"long"` 9849 9850 // The Amazon Resource Name (ARN) of the destination. 9851 DestinationArn *string `locationName:"destinationArn" min:"1" type:"string"` 9852 9853 // The method used to distribute log data to the destination, which can be either 9854 // random or grouped by log stream. 9855 Distribution *string `locationName:"distribution" type:"string" enum:"Distribution"` 9856 9857 // The name of the subscription filter. 9858 FilterName *string `locationName:"filterName" min:"1" type:"string"` 9859 9860 // A symbolic description of how CloudWatch Logs should interpret the data in 9861 // each log event. For example, a log event can contain timestamps, IP addresses, 9862 // strings, and so on. You use the filter pattern to specify what to look for 9863 // in the log event message. 9864 FilterPattern *string `locationName:"filterPattern" type:"string"` 9865 9866 // The name of the log group. 9867 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` 9868 9869 RoleArn *string `locationName:"roleArn" min:"1" type:"string"` 9870} 9871 9872// String returns the string representation 9873func (s SubscriptionFilter) String() string { 9874 return awsutil.Prettify(s) 9875} 9876 9877// GoString returns the string representation 9878func (s SubscriptionFilter) GoString() string { 9879 return s.String() 9880} 9881 9882// SetCreationTime sets the CreationTime field's value. 9883func (s *SubscriptionFilter) SetCreationTime(v int64) *SubscriptionFilter { 9884 s.CreationTime = &v 9885 return s 9886} 9887 9888// SetDestinationArn sets the DestinationArn field's value. 9889func (s *SubscriptionFilter) SetDestinationArn(v string) *SubscriptionFilter { 9890 s.DestinationArn = &v 9891 return s 9892} 9893 9894// SetDistribution sets the Distribution field's value. 9895func (s *SubscriptionFilter) SetDistribution(v string) *SubscriptionFilter { 9896 s.Distribution = &v 9897 return s 9898} 9899 9900// SetFilterName sets the FilterName field's value. 9901func (s *SubscriptionFilter) SetFilterName(v string) *SubscriptionFilter { 9902 s.FilterName = &v 9903 return s 9904} 9905 9906// SetFilterPattern sets the FilterPattern field's value. 9907func (s *SubscriptionFilter) SetFilterPattern(v string) *SubscriptionFilter { 9908 s.FilterPattern = &v 9909 return s 9910} 9911 9912// SetLogGroupName sets the LogGroupName field's value. 9913func (s *SubscriptionFilter) SetLogGroupName(v string) *SubscriptionFilter { 9914 s.LogGroupName = &v 9915 return s 9916} 9917 9918// SetRoleArn sets the RoleArn field's value. 9919func (s *SubscriptionFilter) SetRoleArn(v string) *SubscriptionFilter { 9920 s.RoleArn = &v 9921 return s 9922} 9923 9924type TagLogGroupInput struct { 9925 _ struct{} `type:"structure"` 9926 9927 // The name of the log group. 9928 // 9929 // LogGroupName is a required field 9930 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 9931 9932 // The key-value pairs to use for the tags. 9933 // 9934 // Tags is a required field 9935 Tags map[string]*string `locationName:"tags" min:"1" type:"map" required:"true"` 9936} 9937 9938// String returns the string representation 9939func (s TagLogGroupInput) String() string { 9940 return awsutil.Prettify(s) 9941} 9942 9943// GoString returns the string representation 9944func (s TagLogGroupInput) GoString() string { 9945 return s.String() 9946} 9947 9948// Validate inspects the fields of the type to determine if they are valid. 9949func (s *TagLogGroupInput) Validate() error { 9950 invalidParams := request.ErrInvalidParams{Context: "TagLogGroupInput"} 9951 if s.LogGroupName == nil { 9952 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 9953 } 9954 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 9955 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 9956 } 9957 if s.Tags == nil { 9958 invalidParams.Add(request.NewErrParamRequired("Tags")) 9959 } 9960 if s.Tags != nil && len(s.Tags) < 1 { 9961 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 9962 } 9963 9964 if invalidParams.Len() > 0 { 9965 return invalidParams 9966 } 9967 return nil 9968} 9969 9970// SetLogGroupName sets the LogGroupName field's value. 9971func (s *TagLogGroupInput) SetLogGroupName(v string) *TagLogGroupInput { 9972 s.LogGroupName = &v 9973 return s 9974} 9975 9976// SetTags sets the Tags field's value. 9977func (s *TagLogGroupInput) SetTags(v map[string]*string) *TagLogGroupInput { 9978 s.Tags = v 9979 return s 9980} 9981 9982type TagLogGroupOutput struct { 9983 _ struct{} `type:"structure"` 9984} 9985 9986// String returns the string representation 9987func (s TagLogGroupOutput) String() string { 9988 return awsutil.Prettify(s) 9989} 9990 9991// GoString returns the string representation 9992func (s TagLogGroupOutput) GoString() string { 9993 return s.String() 9994} 9995 9996type TestMetricFilterInput struct { 9997 _ struct{} `type:"structure"` 9998 9999 // A symbolic description of how CloudWatch Logs should interpret the data in 10000 // each log event. For example, a log event can contain timestamps, IP addresses, 10001 // strings, and so on. You use the filter pattern to specify what to look for 10002 // in the log event message. 10003 // 10004 // FilterPattern is a required field 10005 FilterPattern *string `locationName:"filterPattern" type:"string" required:"true"` 10006 10007 // The log event messages to test. 10008 // 10009 // LogEventMessages is a required field 10010 LogEventMessages []*string `locationName:"logEventMessages" min:"1" type:"list" required:"true"` 10011} 10012 10013// String returns the string representation 10014func (s TestMetricFilterInput) String() string { 10015 return awsutil.Prettify(s) 10016} 10017 10018// GoString returns the string representation 10019func (s TestMetricFilterInput) GoString() string { 10020 return s.String() 10021} 10022 10023// Validate inspects the fields of the type to determine if they are valid. 10024func (s *TestMetricFilterInput) Validate() error { 10025 invalidParams := request.ErrInvalidParams{Context: "TestMetricFilterInput"} 10026 if s.FilterPattern == nil { 10027 invalidParams.Add(request.NewErrParamRequired("FilterPattern")) 10028 } 10029 if s.LogEventMessages == nil { 10030 invalidParams.Add(request.NewErrParamRequired("LogEventMessages")) 10031 } 10032 if s.LogEventMessages != nil && len(s.LogEventMessages) < 1 { 10033 invalidParams.Add(request.NewErrParamMinLen("LogEventMessages", 1)) 10034 } 10035 10036 if invalidParams.Len() > 0 { 10037 return invalidParams 10038 } 10039 return nil 10040} 10041 10042// SetFilterPattern sets the FilterPattern field's value. 10043func (s *TestMetricFilterInput) SetFilterPattern(v string) *TestMetricFilterInput { 10044 s.FilterPattern = &v 10045 return s 10046} 10047 10048// SetLogEventMessages sets the LogEventMessages field's value. 10049func (s *TestMetricFilterInput) SetLogEventMessages(v []*string) *TestMetricFilterInput { 10050 s.LogEventMessages = v 10051 return s 10052} 10053 10054type TestMetricFilterOutput struct { 10055 _ struct{} `type:"structure"` 10056 10057 // The matched events. 10058 Matches []*MetricFilterMatchRecord `locationName:"matches" type:"list"` 10059} 10060 10061// String returns the string representation 10062func (s TestMetricFilterOutput) String() string { 10063 return awsutil.Prettify(s) 10064} 10065 10066// GoString returns the string representation 10067func (s TestMetricFilterOutput) GoString() string { 10068 return s.String() 10069} 10070 10071// SetMatches sets the Matches field's value. 10072func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestMetricFilterOutput { 10073 s.Matches = v 10074 return s 10075} 10076 10077// The most likely cause is an invalid Amazon Web Services access key ID or 10078// secret key. 10079type UnrecognizedClientException struct { 10080 _ struct{} `type:"structure"` 10081 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 10082 10083 Message_ *string `locationName:"message" type:"string"` 10084} 10085 10086// String returns the string representation 10087func (s UnrecognizedClientException) String() string { 10088 return awsutil.Prettify(s) 10089} 10090 10091// GoString returns the string representation 10092func (s UnrecognizedClientException) GoString() string { 10093 return s.String() 10094} 10095 10096func newErrorUnrecognizedClientException(v protocol.ResponseMetadata) error { 10097 return &UnrecognizedClientException{ 10098 RespMetadata: v, 10099 } 10100} 10101 10102// Code returns the exception type name. 10103func (s *UnrecognizedClientException) Code() string { 10104 return "UnrecognizedClientException" 10105} 10106 10107// Message returns the exception's message. 10108func (s *UnrecognizedClientException) Message() string { 10109 if s.Message_ != nil { 10110 return *s.Message_ 10111 } 10112 return "" 10113} 10114 10115// OrigErr always returns nil, satisfies awserr.Error interface. 10116func (s *UnrecognizedClientException) OrigErr() error { 10117 return nil 10118} 10119 10120func (s *UnrecognizedClientException) Error() string { 10121 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10122} 10123 10124// Status code returns the HTTP status code for the request's response error. 10125func (s *UnrecognizedClientException) StatusCode() int { 10126 return s.RespMetadata.StatusCode 10127} 10128 10129// RequestID returns the service's response RequestID for request. 10130func (s *UnrecognizedClientException) RequestID() string { 10131 return s.RespMetadata.RequestID 10132} 10133 10134type UntagLogGroupInput struct { 10135 _ struct{} `type:"structure"` 10136 10137 // The name of the log group. 10138 // 10139 // LogGroupName is a required field 10140 LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` 10141 10142 // The tag keys. The corresponding tags are removed from the log group. 10143 // 10144 // Tags is a required field 10145 Tags []*string `locationName:"tags" min:"1" type:"list" required:"true"` 10146} 10147 10148// String returns the string representation 10149func (s UntagLogGroupInput) String() string { 10150 return awsutil.Prettify(s) 10151} 10152 10153// GoString returns the string representation 10154func (s UntagLogGroupInput) GoString() string { 10155 return s.String() 10156} 10157 10158// Validate inspects the fields of the type to determine if they are valid. 10159func (s *UntagLogGroupInput) Validate() error { 10160 invalidParams := request.ErrInvalidParams{Context: "UntagLogGroupInput"} 10161 if s.LogGroupName == nil { 10162 invalidParams.Add(request.NewErrParamRequired("LogGroupName")) 10163 } 10164 if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { 10165 invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) 10166 } 10167 if s.Tags == nil { 10168 invalidParams.Add(request.NewErrParamRequired("Tags")) 10169 } 10170 if s.Tags != nil && len(s.Tags) < 1 { 10171 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 10172 } 10173 10174 if invalidParams.Len() > 0 { 10175 return invalidParams 10176 } 10177 return nil 10178} 10179 10180// SetLogGroupName sets the LogGroupName field's value. 10181func (s *UntagLogGroupInput) SetLogGroupName(v string) *UntagLogGroupInput { 10182 s.LogGroupName = &v 10183 return s 10184} 10185 10186// SetTags sets the Tags field's value. 10187func (s *UntagLogGroupInput) SetTags(v []*string) *UntagLogGroupInput { 10188 s.Tags = v 10189 return s 10190} 10191 10192type UntagLogGroupOutput struct { 10193 _ struct{} `type:"structure"` 10194} 10195 10196// String returns the string representation 10197func (s UntagLogGroupOutput) String() string { 10198 return awsutil.Prettify(s) 10199} 10200 10201// GoString returns the string representation 10202func (s UntagLogGroupOutput) GoString() string { 10203 return s.String() 10204} 10205 10206// The method used to distribute log data to the destination, which can be either 10207// random or grouped by log stream. 10208const ( 10209 // DistributionRandom is a Distribution enum value 10210 DistributionRandom = "Random" 10211 10212 // DistributionByLogStream is a Distribution enum value 10213 DistributionByLogStream = "ByLogStream" 10214) 10215 10216// Distribution_Values returns all elements of the Distribution enum 10217func Distribution_Values() []string { 10218 return []string{ 10219 DistributionRandom, 10220 DistributionByLogStream, 10221 } 10222} 10223 10224const ( 10225 // ExportTaskStatusCodeCancelled is a ExportTaskStatusCode enum value 10226 ExportTaskStatusCodeCancelled = "CANCELLED" 10227 10228 // ExportTaskStatusCodeCompleted is a ExportTaskStatusCode enum value 10229 ExportTaskStatusCodeCompleted = "COMPLETED" 10230 10231 // ExportTaskStatusCodeFailed is a ExportTaskStatusCode enum value 10232 ExportTaskStatusCodeFailed = "FAILED" 10233 10234 // ExportTaskStatusCodePending is a ExportTaskStatusCode enum value 10235 ExportTaskStatusCodePending = "PENDING" 10236 10237 // ExportTaskStatusCodePendingCancel is a ExportTaskStatusCode enum value 10238 ExportTaskStatusCodePendingCancel = "PENDING_CANCEL" 10239 10240 // ExportTaskStatusCodeRunning is a ExportTaskStatusCode enum value 10241 ExportTaskStatusCodeRunning = "RUNNING" 10242) 10243 10244// ExportTaskStatusCode_Values returns all elements of the ExportTaskStatusCode enum 10245func ExportTaskStatusCode_Values() []string { 10246 return []string{ 10247 ExportTaskStatusCodeCancelled, 10248 ExportTaskStatusCodeCompleted, 10249 ExportTaskStatusCodeFailed, 10250 ExportTaskStatusCodePending, 10251 ExportTaskStatusCodePendingCancel, 10252 ExportTaskStatusCodeRunning, 10253 } 10254} 10255 10256const ( 10257 // OrderByLogStreamName is a OrderBy enum value 10258 OrderByLogStreamName = "LogStreamName" 10259 10260 // OrderByLastEventTime is a OrderBy enum value 10261 OrderByLastEventTime = "LastEventTime" 10262) 10263 10264// OrderBy_Values returns all elements of the OrderBy enum 10265func OrderBy_Values() []string { 10266 return []string{ 10267 OrderByLogStreamName, 10268 OrderByLastEventTime, 10269 } 10270} 10271 10272const ( 10273 // QueryStatusScheduled is a QueryStatus enum value 10274 QueryStatusScheduled = "Scheduled" 10275 10276 // QueryStatusRunning is a QueryStatus enum value 10277 QueryStatusRunning = "Running" 10278 10279 // QueryStatusComplete is a QueryStatus enum value 10280 QueryStatusComplete = "Complete" 10281 10282 // QueryStatusFailed is a QueryStatus enum value 10283 QueryStatusFailed = "Failed" 10284 10285 // QueryStatusCancelled is a QueryStatus enum value 10286 QueryStatusCancelled = "Cancelled" 10287 10288 // QueryStatusTimeout is a QueryStatus enum value 10289 QueryStatusTimeout = "Timeout" 10290 10291 // QueryStatusUnknown is a QueryStatus enum value 10292 QueryStatusUnknown = "Unknown" 10293) 10294 10295// QueryStatus_Values returns all elements of the QueryStatus enum 10296func QueryStatus_Values() []string { 10297 return []string{ 10298 QueryStatusScheduled, 10299 QueryStatusRunning, 10300 QueryStatusComplete, 10301 QueryStatusFailed, 10302 QueryStatusCancelled, 10303 QueryStatusTimeout, 10304 QueryStatusUnknown, 10305 } 10306} 10307 10308const ( 10309 // StandardUnitSeconds is a StandardUnit enum value 10310 StandardUnitSeconds = "Seconds" 10311 10312 // StandardUnitMicroseconds is a StandardUnit enum value 10313 StandardUnitMicroseconds = "Microseconds" 10314 10315 // StandardUnitMilliseconds is a StandardUnit enum value 10316 StandardUnitMilliseconds = "Milliseconds" 10317 10318 // StandardUnitBytes is a StandardUnit enum value 10319 StandardUnitBytes = "Bytes" 10320 10321 // StandardUnitKilobytes is a StandardUnit enum value 10322 StandardUnitKilobytes = "Kilobytes" 10323 10324 // StandardUnitMegabytes is a StandardUnit enum value 10325 StandardUnitMegabytes = "Megabytes" 10326 10327 // StandardUnitGigabytes is a StandardUnit enum value 10328 StandardUnitGigabytes = "Gigabytes" 10329 10330 // StandardUnitTerabytes is a StandardUnit enum value 10331 StandardUnitTerabytes = "Terabytes" 10332 10333 // StandardUnitBits is a StandardUnit enum value 10334 StandardUnitBits = "Bits" 10335 10336 // StandardUnitKilobits is a StandardUnit enum value 10337 StandardUnitKilobits = "Kilobits" 10338 10339 // StandardUnitMegabits is a StandardUnit enum value 10340 StandardUnitMegabits = "Megabits" 10341 10342 // StandardUnitGigabits is a StandardUnit enum value 10343 StandardUnitGigabits = "Gigabits" 10344 10345 // StandardUnitTerabits is a StandardUnit enum value 10346 StandardUnitTerabits = "Terabits" 10347 10348 // StandardUnitPercent is a StandardUnit enum value 10349 StandardUnitPercent = "Percent" 10350 10351 // StandardUnitCount is a StandardUnit enum value 10352 StandardUnitCount = "Count" 10353 10354 // StandardUnitBytesSecond is a StandardUnit enum value 10355 StandardUnitBytesSecond = "Bytes/Second" 10356 10357 // StandardUnitKilobytesSecond is a StandardUnit enum value 10358 StandardUnitKilobytesSecond = "Kilobytes/Second" 10359 10360 // StandardUnitMegabytesSecond is a StandardUnit enum value 10361 StandardUnitMegabytesSecond = "Megabytes/Second" 10362 10363 // StandardUnitGigabytesSecond is a StandardUnit enum value 10364 StandardUnitGigabytesSecond = "Gigabytes/Second" 10365 10366 // StandardUnitTerabytesSecond is a StandardUnit enum value 10367 StandardUnitTerabytesSecond = "Terabytes/Second" 10368 10369 // StandardUnitBitsSecond is a StandardUnit enum value 10370 StandardUnitBitsSecond = "Bits/Second" 10371 10372 // StandardUnitKilobitsSecond is a StandardUnit enum value 10373 StandardUnitKilobitsSecond = "Kilobits/Second" 10374 10375 // StandardUnitMegabitsSecond is a StandardUnit enum value 10376 StandardUnitMegabitsSecond = "Megabits/Second" 10377 10378 // StandardUnitGigabitsSecond is a StandardUnit enum value 10379 StandardUnitGigabitsSecond = "Gigabits/Second" 10380 10381 // StandardUnitTerabitsSecond is a StandardUnit enum value 10382 StandardUnitTerabitsSecond = "Terabits/Second" 10383 10384 // StandardUnitCountSecond is a StandardUnit enum value 10385 StandardUnitCountSecond = "Count/Second" 10386 10387 // StandardUnitNone is a StandardUnit enum value 10388 StandardUnitNone = "None" 10389) 10390 10391// StandardUnit_Values returns all elements of the StandardUnit enum 10392func StandardUnit_Values() []string { 10393 return []string{ 10394 StandardUnitSeconds, 10395 StandardUnitMicroseconds, 10396 StandardUnitMilliseconds, 10397 StandardUnitBytes, 10398 StandardUnitKilobytes, 10399 StandardUnitMegabytes, 10400 StandardUnitGigabytes, 10401 StandardUnitTerabytes, 10402 StandardUnitBits, 10403 StandardUnitKilobits, 10404 StandardUnitMegabits, 10405 StandardUnitGigabits, 10406 StandardUnitTerabits, 10407 StandardUnitPercent, 10408 StandardUnitCount, 10409 StandardUnitBytesSecond, 10410 StandardUnitKilobytesSecond, 10411 StandardUnitMegabytesSecond, 10412 StandardUnitGigabytesSecond, 10413 StandardUnitTerabytesSecond, 10414 StandardUnitBitsSecond, 10415 StandardUnitKilobitsSecond, 10416 StandardUnitMegabitsSecond, 10417 StandardUnitGigabitsSecond, 10418 StandardUnitTerabitsSecond, 10419 StandardUnitCountSecond, 10420 StandardUnitNone, 10421 } 10422} 10423