github.com/aavshr/aws-sdk-go@v1.41.3/service/synthetics/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package synthetics 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 14 ) 15 16 const opCreateCanary = "CreateCanary" 17 18 // CreateCanaryRequest generates a "aws/request.Request" representing the 19 // client's request for the CreateCanary operation. The "output" return 20 // value will be populated with the request's response once the request completes 21 // successfully. 22 // 23 // Use "Send" method on the returned Request to send the API call to the service. 24 // the "output" return value is not valid until after Send returns without error. 25 // 26 // See CreateCanary for more information on using the CreateCanary 27 // API call, and error handling. 28 // 29 // This method is useful when you want to inject custom logic or configuration 30 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 31 // 32 // 33 // // Example sending a request using the CreateCanaryRequest method. 34 // req, resp := client.CreateCanaryRequest(params) 35 // 36 // err := req.Send() 37 // if err == nil { // resp is now filled 38 // fmt.Println(resp) 39 // } 40 // 41 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateCanary 42 func (c *Synthetics) CreateCanaryRequest(input *CreateCanaryInput) (req *request.Request, output *CreateCanaryOutput) { 43 op := &request.Operation{ 44 Name: opCreateCanary, 45 HTTPMethod: "POST", 46 HTTPPath: "/canary", 47 } 48 49 if input == nil { 50 input = &CreateCanaryInput{} 51 } 52 53 output = &CreateCanaryOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // CreateCanary API operation for Synthetics. 59 // 60 // Creates a canary. Canaries are scripts that monitor your endpoints and APIs 61 // from the outside-in. Canaries help you check the availability and latency 62 // of your web services and troubleshoot anomalies by investigating load time 63 // data, screenshots of the UI, logs, and metrics. You can set up a canary to 64 // run continuously or just once. 65 // 66 // Do not use CreateCanary to modify an existing canary. Use UpdateCanary (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_UpdateCanary.html) 67 // instead. 68 // 69 // To create canaries, you must have the CloudWatchSyntheticsFullAccess policy. 70 // If you are creating a new IAM role for the canary, you also need the the 71 // iam:CreateRole, iam:CreatePolicy and iam:AttachRolePolicy permissions. For 72 // more information, see Necessary Roles and Permissions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Roles). 73 // 74 // Do not include secrets or proprietary information in your canary names. The 75 // canary name makes up part of the Amazon Resource Name (ARN) for the canary, 76 // and the ARN is included in outbound calls over the internet. For more information, 77 // see Security Considerations for Synthetics Canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). 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 Synthetics's 84 // API operation CreateCanary for usage and error information. 85 // 86 // Returned Error Types: 87 // * InternalServerException 88 // An unknown internal error occurred. 89 // 90 // * ValidationException 91 // A parameter could not be validated. 92 // 93 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateCanary 94 func (c *Synthetics) CreateCanary(input *CreateCanaryInput) (*CreateCanaryOutput, error) { 95 req, out := c.CreateCanaryRequest(input) 96 return out, req.Send() 97 } 98 99 // CreateCanaryWithContext is the same as CreateCanary with the addition of 100 // the ability to pass a context and additional request options. 101 // 102 // See CreateCanary for details on how to use this API operation. 103 // 104 // The context must be non-nil and will be used for request cancellation. If 105 // the context is nil a panic will occur. In the future the SDK may create 106 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 107 // for more information on using Contexts. 108 func (c *Synthetics) CreateCanaryWithContext(ctx aws.Context, input *CreateCanaryInput, opts ...request.Option) (*CreateCanaryOutput, error) { 109 req, out := c.CreateCanaryRequest(input) 110 req.SetContext(ctx) 111 req.ApplyOptions(opts...) 112 return out, req.Send() 113 } 114 115 const opDeleteCanary = "DeleteCanary" 116 117 // DeleteCanaryRequest generates a "aws/request.Request" representing the 118 // client's request for the DeleteCanary operation. The "output" return 119 // value will be populated with the request's response once the request completes 120 // successfully. 121 // 122 // Use "Send" method on the returned Request to send the API call to the service. 123 // the "output" return value is not valid until after Send returns without error. 124 // 125 // See DeleteCanary for more information on using the DeleteCanary 126 // API call, and error handling. 127 // 128 // This method is useful when you want to inject custom logic or configuration 129 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 130 // 131 // 132 // // Example sending a request using the DeleteCanaryRequest method. 133 // req, resp := client.DeleteCanaryRequest(params) 134 // 135 // err := req.Send() 136 // if err == nil { // resp is now filled 137 // fmt.Println(resp) 138 // } 139 // 140 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteCanary 141 func (c *Synthetics) DeleteCanaryRequest(input *DeleteCanaryInput) (req *request.Request, output *DeleteCanaryOutput) { 142 op := &request.Operation{ 143 Name: opDeleteCanary, 144 HTTPMethod: "DELETE", 145 HTTPPath: "/canary/{name}", 146 } 147 148 if input == nil { 149 input = &DeleteCanaryInput{} 150 } 151 152 output = &DeleteCanaryOutput{} 153 req = c.newRequest(op, input, output) 154 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 155 return 156 } 157 158 // DeleteCanary API operation for Synthetics. 159 // 160 // Permanently deletes the specified canary. 161 // 162 // When you delete a canary, resources used and created by the canary are not 163 // automatically deleted. After you delete a canary that you do not intend to 164 // use again, you should also delete the following: 165 // 166 // * The Lambda functions and layers used by this canary. These have the 167 // prefix cwsyn-MyCanaryName . 168 // 169 // * The CloudWatch alarms created for this canary. These alarms have a name 170 // of Synthetics-SharpDrop-Alarm-MyCanaryName . 171 // 172 // * Amazon S3 objects and buckets, such as the canary's artifact location. 173 // 174 // * IAM roles created for the canary. If they were created in the console, 175 // these roles have the name role/service-role/CloudWatchSyntheticsRole-MyCanaryName . 176 // 177 // * CloudWatch Logs log groups created for the canary. These logs groups 178 // have the name /aws/lambda/cwsyn-MyCanaryName . 179 // 180 // Before you delete a canary, you might want to use GetCanary to display the 181 // information about this canary. Make note of the information returned by this 182 // operation so that you can delete these resources after you delete the canary. 183 // 184 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 185 // with awserr.Error's Code and Message methods to get detailed information about 186 // the error. 187 // 188 // See the AWS API reference guide for Synthetics's 189 // API operation DeleteCanary for usage and error information. 190 // 191 // Returned Error Types: 192 // * InternalServerException 193 // An unknown internal error occurred. 194 // 195 // * ValidationException 196 // A parameter could not be validated. 197 // 198 // * ResourceNotFoundException 199 // One of the specified resources was not found. 200 // 201 // * ConflictException 202 // A conflicting operation is already in progress. 203 // 204 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteCanary 205 func (c *Synthetics) DeleteCanary(input *DeleteCanaryInput) (*DeleteCanaryOutput, error) { 206 req, out := c.DeleteCanaryRequest(input) 207 return out, req.Send() 208 } 209 210 // DeleteCanaryWithContext is the same as DeleteCanary with the addition of 211 // the ability to pass a context and additional request options. 212 // 213 // See DeleteCanary for details on how to use this API operation. 214 // 215 // The context must be non-nil and will be used for request cancellation. If 216 // the context is nil a panic will occur. In the future the SDK may create 217 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 218 // for more information on using Contexts. 219 func (c *Synthetics) DeleteCanaryWithContext(ctx aws.Context, input *DeleteCanaryInput, opts ...request.Option) (*DeleteCanaryOutput, error) { 220 req, out := c.DeleteCanaryRequest(input) 221 req.SetContext(ctx) 222 req.ApplyOptions(opts...) 223 return out, req.Send() 224 } 225 226 const opDescribeCanaries = "DescribeCanaries" 227 228 // DescribeCanariesRequest generates a "aws/request.Request" representing the 229 // client's request for the DescribeCanaries operation. The "output" return 230 // value will be populated with the request's response once the request completes 231 // successfully. 232 // 233 // Use "Send" method on the returned Request to send the API call to the service. 234 // the "output" return value is not valid until after Send returns without error. 235 // 236 // See DescribeCanaries for more information on using the DescribeCanaries 237 // API call, and error handling. 238 // 239 // This method is useful when you want to inject custom logic or configuration 240 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 241 // 242 // 243 // // Example sending a request using the DescribeCanariesRequest method. 244 // req, resp := client.DescribeCanariesRequest(params) 245 // 246 // err := req.Send() 247 // if err == nil { // resp is now filled 248 // fmt.Println(resp) 249 // } 250 // 251 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanaries 252 func (c *Synthetics) DescribeCanariesRequest(input *DescribeCanariesInput) (req *request.Request, output *DescribeCanariesOutput) { 253 op := &request.Operation{ 254 Name: opDescribeCanaries, 255 HTTPMethod: "POST", 256 HTTPPath: "/canaries", 257 Paginator: &request.Paginator{ 258 InputTokens: []string{"NextToken"}, 259 OutputTokens: []string{"NextToken"}, 260 LimitToken: "MaxResults", 261 TruncationToken: "", 262 }, 263 } 264 265 if input == nil { 266 input = &DescribeCanariesInput{} 267 } 268 269 output = &DescribeCanariesOutput{} 270 req = c.newRequest(op, input, output) 271 return 272 } 273 274 // DescribeCanaries API operation for Synthetics. 275 // 276 // This operation returns a list of the canaries in your account, along with 277 // full details about each canary. 278 // 279 // This operation does not have resource-level authorization, so if a user is 280 // able to use DescribeCanaries, the user can see all of the canaries in the 281 // account. A deny policy can only be used to restrict access to all canaries. 282 // It cannot be used on specific resources. 283 // 284 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 285 // with awserr.Error's Code and Message methods to get detailed information about 286 // the error. 287 // 288 // See the AWS API reference guide for Synthetics's 289 // API operation DescribeCanaries for usage and error information. 290 // 291 // Returned Error Types: 292 // * InternalServerException 293 // An unknown internal error occurred. 294 // 295 // * ValidationException 296 // A parameter could not be validated. 297 // 298 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanaries 299 func (c *Synthetics) DescribeCanaries(input *DescribeCanariesInput) (*DescribeCanariesOutput, error) { 300 req, out := c.DescribeCanariesRequest(input) 301 return out, req.Send() 302 } 303 304 // DescribeCanariesWithContext is the same as DescribeCanaries with the addition of 305 // the ability to pass a context and additional request options. 306 // 307 // See DescribeCanaries for details on how to use this API operation. 308 // 309 // The context must be non-nil and will be used for request cancellation. If 310 // the context is nil a panic will occur. In the future the SDK may create 311 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 312 // for more information on using Contexts. 313 func (c *Synthetics) DescribeCanariesWithContext(ctx aws.Context, input *DescribeCanariesInput, opts ...request.Option) (*DescribeCanariesOutput, error) { 314 req, out := c.DescribeCanariesRequest(input) 315 req.SetContext(ctx) 316 req.ApplyOptions(opts...) 317 return out, req.Send() 318 } 319 320 // DescribeCanariesPages iterates over the pages of a DescribeCanaries operation, 321 // calling the "fn" function with the response data for each page. To stop 322 // iterating, return false from the fn function. 323 // 324 // See DescribeCanaries method for more information on how to use this operation. 325 // 326 // Note: This operation can generate multiple requests to a service. 327 // 328 // // Example iterating over at most 3 pages of a DescribeCanaries operation. 329 // pageNum := 0 330 // err := client.DescribeCanariesPages(params, 331 // func(page *synthetics.DescribeCanariesOutput, lastPage bool) bool { 332 // pageNum++ 333 // fmt.Println(page) 334 // return pageNum <= 3 335 // }) 336 // 337 func (c *Synthetics) DescribeCanariesPages(input *DescribeCanariesInput, fn func(*DescribeCanariesOutput, bool) bool) error { 338 return c.DescribeCanariesPagesWithContext(aws.BackgroundContext(), input, fn) 339 } 340 341 // DescribeCanariesPagesWithContext same as DescribeCanariesPages except 342 // it takes a Context and allows setting request options on the pages. 343 // 344 // The context must be non-nil and will be used for request cancellation. If 345 // the context is nil a panic will occur. In the future the SDK may create 346 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 347 // for more information on using Contexts. 348 func (c *Synthetics) DescribeCanariesPagesWithContext(ctx aws.Context, input *DescribeCanariesInput, fn func(*DescribeCanariesOutput, bool) bool, opts ...request.Option) error { 349 p := request.Pagination{ 350 NewRequest: func() (*request.Request, error) { 351 var inCpy *DescribeCanariesInput 352 if input != nil { 353 tmp := *input 354 inCpy = &tmp 355 } 356 req, _ := c.DescribeCanariesRequest(inCpy) 357 req.SetContext(ctx) 358 req.ApplyOptions(opts...) 359 return req, nil 360 }, 361 } 362 363 for p.Next() { 364 if !fn(p.Page().(*DescribeCanariesOutput), !p.HasNextPage()) { 365 break 366 } 367 } 368 369 return p.Err() 370 } 371 372 const opDescribeCanariesLastRun = "DescribeCanariesLastRun" 373 374 // DescribeCanariesLastRunRequest generates a "aws/request.Request" representing the 375 // client's request for the DescribeCanariesLastRun operation. The "output" return 376 // value will be populated with the request's response once the request completes 377 // successfully. 378 // 379 // Use "Send" method on the returned Request to send the API call to the service. 380 // the "output" return value is not valid until after Send returns without error. 381 // 382 // See DescribeCanariesLastRun for more information on using the DescribeCanariesLastRun 383 // API call, and error handling. 384 // 385 // This method is useful when you want to inject custom logic or configuration 386 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 387 // 388 // 389 // // Example sending a request using the DescribeCanariesLastRunRequest method. 390 // req, resp := client.DescribeCanariesLastRunRequest(params) 391 // 392 // err := req.Send() 393 // if err == nil { // resp is now filled 394 // fmt.Println(resp) 395 // } 396 // 397 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanariesLastRun 398 func (c *Synthetics) DescribeCanariesLastRunRequest(input *DescribeCanariesLastRunInput) (req *request.Request, output *DescribeCanariesLastRunOutput) { 399 op := &request.Operation{ 400 Name: opDescribeCanariesLastRun, 401 HTTPMethod: "POST", 402 HTTPPath: "/canaries/last-run", 403 Paginator: &request.Paginator{ 404 InputTokens: []string{"NextToken"}, 405 OutputTokens: []string{"NextToken"}, 406 LimitToken: "MaxResults", 407 TruncationToken: "", 408 }, 409 } 410 411 if input == nil { 412 input = &DescribeCanariesLastRunInput{} 413 } 414 415 output = &DescribeCanariesLastRunOutput{} 416 req = c.newRequest(op, input, output) 417 return 418 } 419 420 // DescribeCanariesLastRun API operation for Synthetics. 421 // 422 // Use this operation to see information from the most recent run of each canary 423 // that you have created. 424 // 425 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 426 // with awserr.Error's Code and Message methods to get detailed information about 427 // the error. 428 // 429 // See the AWS API reference guide for Synthetics's 430 // API operation DescribeCanariesLastRun for usage and error information. 431 // 432 // Returned Error Types: 433 // * InternalServerException 434 // An unknown internal error occurred. 435 // 436 // * ValidationException 437 // A parameter could not be validated. 438 // 439 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanariesLastRun 440 func (c *Synthetics) DescribeCanariesLastRun(input *DescribeCanariesLastRunInput) (*DescribeCanariesLastRunOutput, error) { 441 req, out := c.DescribeCanariesLastRunRequest(input) 442 return out, req.Send() 443 } 444 445 // DescribeCanariesLastRunWithContext is the same as DescribeCanariesLastRun with the addition of 446 // the ability to pass a context and additional request options. 447 // 448 // See DescribeCanariesLastRun for details on how to use this API operation. 449 // 450 // The context must be non-nil and will be used for request cancellation. If 451 // the context is nil a panic will occur. In the future the SDK may create 452 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 453 // for more information on using Contexts. 454 func (c *Synthetics) DescribeCanariesLastRunWithContext(ctx aws.Context, input *DescribeCanariesLastRunInput, opts ...request.Option) (*DescribeCanariesLastRunOutput, error) { 455 req, out := c.DescribeCanariesLastRunRequest(input) 456 req.SetContext(ctx) 457 req.ApplyOptions(opts...) 458 return out, req.Send() 459 } 460 461 // DescribeCanariesLastRunPages iterates over the pages of a DescribeCanariesLastRun operation, 462 // calling the "fn" function with the response data for each page. To stop 463 // iterating, return false from the fn function. 464 // 465 // See DescribeCanariesLastRun method for more information on how to use this operation. 466 // 467 // Note: This operation can generate multiple requests to a service. 468 // 469 // // Example iterating over at most 3 pages of a DescribeCanariesLastRun operation. 470 // pageNum := 0 471 // err := client.DescribeCanariesLastRunPages(params, 472 // func(page *synthetics.DescribeCanariesLastRunOutput, lastPage bool) bool { 473 // pageNum++ 474 // fmt.Println(page) 475 // return pageNum <= 3 476 // }) 477 // 478 func (c *Synthetics) DescribeCanariesLastRunPages(input *DescribeCanariesLastRunInput, fn func(*DescribeCanariesLastRunOutput, bool) bool) error { 479 return c.DescribeCanariesLastRunPagesWithContext(aws.BackgroundContext(), input, fn) 480 } 481 482 // DescribeCanariesLastRunPagesWithContext same as DescribeCanariesLastRunPages except 483 // it takes a Context and allows setting request options on the pages. 484 // 485 // The context must be non-nil and will be used for request cancellation. If 486 // the context is nil a panic will occur. In the future the SDK may create 487 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 488 // for more information on using Contexts. 489 func (c *Synthetics) DescribeCanariesLastRunPagesWithContext(ctx aws.Context, input *DescribeCanariesLastRunInput, fn func(*DescribeCanariesLastRunOutput, bool) bool, opts ...request.Option) error { 490 p := request.Pagination{ 491 NewRequest: func() (*request.Request, error) { 492 var inCpy *DescribeCanariesLastRunInput 493 if input != nil { 494 tmp := *input 495 inCpy = &tmp 496 } 497 req, _ := c.DescribeCanariesLastRunRequest(inCpy) 498 req.SetContext(ctx) 499 req.ApplyOptions(opts...) 500 return req, nil 501 }, 502 } 503 504 for p.Next() { 505 if !fn(p.Page().(*DescribeCanariesLastRunOutput), !p.HasNextPage()) { 506 break 507 } 508 } 509 510 return p.Err() 511 } 512 513 const opDescribeRuntimeVersions = "DescribeRuntimeVersions" 514 515 // DescribeRuntimeVersionsRequest generates a "aws/request.Request" representing the 516 // client's request for the DescribeRuntimeVersions operation. The "output" return 517 // value will be populated with the request's response once the request completes 518 // successfully. 519 // 520 // Use "Send" method on the returned Request to send the API call to the service. 521 // the "output" return value is not valid until after Send returns without error. 522 // 523 // See DescribeRuntimeVersions for more information on using the DescribeRuntimeVersions 524 // API call, and error handling. 525 // 526 // This method is useful when you want to inject custom logic or configuration 527 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 528 // 529 // 530 // // Example sending a request using the DescribeRuntimeVersionsRequest method. 531 // req, resp := client.DescribeRuntimeVersionsRequest(params) 532 // 533 // err := req.Send() 534 // if err == nil { // resp is now filled 535 // fmt.Println(resp) 536 // } 537 // 538 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeRuntimeVersions 539 func (c *Synthetics) DescribeRuntimeVersionsRequest(input *DescribeRuntimeVersionsInput) (req *request.Request, output *DescribeRuntimeVersionsOutput) { 540 op := &request.Operation{ 541 Name: opDescribeRuntimeVersions, 542 HTTPMethod: "POST", 543 HTTPPath: "/runtime-versions", 544 Paginator: &request.Paginator{ 545 InputTokens: []string{"NextToken"}, 546 OutputTokens: []string{"NextToken"}, 547 LimitToken: "MaxResults", 548 TruncationToken: "", 549 }, 550 } 551 552 if input == nil { 553 input = &DescribeRuntimeVersionsInput{} 554 } 555 556 output = &DescribeRuntimeVersionsOutput{} 557 req = c.newRequest(op, input, output) 558 return 559 } 560 561 // DescribeRuntimeVersions API operation for Synthetics. 562 // 563 // Returns a list of Synthetics canary runtime versions. For more information, 564 // see Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). 565 // 566 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 567 // with awserr.Error's Code and Message methods to get detailed information about 568 // the error. 569 // 570 // See the AWS API reference guide for Synthetics's 571 // API operation DescribeRuntimeVersions for usage and error information. 572 // 573 // Returned Error Types: 574 // * InternalServerException 575 // An unknown internal error occurred. 576 // 577 // * ValidationException 578 // A parameter could not be validated. 579 // 580 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeRuntimeVersions 581 func (c *Synthetics) DescribeRuntimeVersions(input *DescribeRuntimeVersionsInput) (*DescribeRuntimeVersionsOutput, error) { 582 req, out := c.DescribeRuntimeVersionsRequest(input) 583 return out, req.Send() 584 } 585 586 // DescribeRuntimeVersionsWithContext is the same as DescribeRuntimeVersions with the addition of 587 // the ability to pass a context and additional request options. 588 // 589 // See DescribeRuntimeVersions for details on how to use this API operation. 590 // 591 // The context must be non-nil and will be used for request cancellation. If 592 // the context is nil a panic will occur. In the future the SDK may create 593 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 594 // for more information on using Contexts. 595 func (c *Synthetics) DescribeRuntimeVersionsWithContext(ctx aws.Context, input *DescribeRuntimeVersionsInput, opts ...request.Option) (*DescribeRuntimeVersionsOutput, error) { 596 req, out := c.DescribeRuntimeVersionsRequest(input) 597 req.SetContext(ctx) 598 req.ApplyOptions(opts...) 599 return out, req.Send() 600 } 601 602 // DescribeRuntimeVersionsPages iterates over the pages of a DescribeRuntimeVersions operation, 603 // calling the "fn" function with the response data for each page. To stop 604 // iterating, return false from the fn function. 605 // 606 // See DescribeRuntimeVersions method for more information on how to use this operation. 607 // 608 // Note: This operation can generate multiple requests to a service. 609 // 610 // // Example iterating over at most 3 pages of a DescribeRuntimeVersions operation. 611 // pageNum := 0 612 // err := client.DescribeRuntimeVersionsPages(params, 613 // func(page *synthetics.DescribeRuntimeVersionsOutput, lastPage bool) bool { 614 // pageNum++ 615 // fmt.Println(page) 616 // return pageNum <= 3 617 // }) 618 // 619 func (c *Synthetics) DescribeRuntimeVersionsPages(input *DescribeRuntimeVersionsInput, fn func(*DescribeRuntimeVersionsOutput, bool) bool) error { 620 return c.DescribeRuntimeVersionsPagesWithContext(aws.BackgroundContext(), input, fn) 621 } 622 623 // DescribeRuntimeVersionsPagesWithContext same as DescribeRuntimeVersionsPages except 624 // it takes a Context and allows setting request options on the pages. 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. 630 func (c *Synthetics) DescribeRuntimeVersionsPagesWithContext(ctx aws.Context, input *DescribeRuntimeVersionsInput, fn func(*DescribeRuntimeVersionsOutput, bool) bool, opts ...request.Option) error { 631 p := request.Pagination{ 632 NewRequest: func() (*request.Request, error) { 633 var inCpy *DescribeRuntimeVersionsInput 634 if input != nil { 635 tmp := *input 636 inCpy = &tmp 637 } 638 req, _ := c.DescribeRuntimeVersionsRequest(inCpy) 639 req.SetContext(ctx) 640 req.ApplyOptions(opts...) 641 return req, nil 642 }, 643 } 644 645 for p.Next() { 646 if !fn(p.Page().(*DescribeRuntimeVersionsOutput), !p.HasNextPage()) { 647 break 648 } 649 } 650 651 return p.Err() 652 } 653 654 const opGetCanary = "GetCanary" 655 656 // GetCanaryRequest generates a "aws/request.Request" representing the 657 // client's request for the GetCanary operation. The "output" return 658 // value will be populated with the request's response once the request completes 659 // successfully. 660 // 661 // Use "Send" method on the returned Request to send the API call to the service. 662 // the "output" return value is not valid until after Send returns without error. 663 // 664 // See GetCanary for more information on using the GetCanary 665 // API call, and error handling. 666 // 667 // This method is useful when you want to inject custom logic or configuration 668 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 669 // 670 // 671 // // Example sending a request using the GetCanaryRequest method. 672 // req, resp := client.GetCanaryRequest(params) 673 // 674 // err := req.Send() 675 // if err == nil { // resp is now filled 676 // fmt.Println(resp) 677 // } 678 // 679 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary 680 func (c *Synthetics) GetCanaryRequest(input *GetCanaryInput) (req *request.Request, output *GetCanaryOutput) { 681 op := &request.Operation{ 682 Name: opGetCanary, 683 HTTPMethod: "GET", 684 HTTPPath: "/canary/{name}", 685 } 686 687 if input == nil { 688 input = &GetCanaryInput{} 689 } 690 691 output = &GetCanaryOutput{} 692 req = c.newRequest(op, input, output) 693 return 694 } 695 696 // GetCanary API operation for Synthetics. 697 // 698 // Retrieves complete information about one canary. You must specify the name 699 // of the canary that you want. To get a list of canaries and their names, use 700 // DescribeCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). 701 // 702 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 703 // with awserr.Error's Code and Message methods to get detailed information about 704 // the error. 705 // 706 // See the AWS API reference guide for Synthetics's 707 // API operation GetCanary for usage and error information. 708 // 709 // Returned Error Types: 710 // * InternalServerException 711 // An unknown internal error occurred. 712 // 713 // * ValidationException 714 // A parameter could not be validated. 715 // 716 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary 717 func (c *Synthetics) GetCanary(input *GetCanaryInput) (*GetCanaryOutput, error) { 718 req, out := c.GetCanaryRequest(input) 719 return out, req.Send() 720 } 721 722 // GetCanaryWithContext is the same as GetCanary with the addition of 723 // the ability to pass a context and additional request options. 724 // 725 // See GetCanary for details on how to use this API operation. 726 // 727 // The context must be non-nil and will be used for request cancellation. If 728 // the context is nil a panic will occur. In the future the SDK may create 729 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 730 // for more information on using Contexts. 731 func (c *Synthetics) GetCanaryWithContext(ctx aws.Context, input *GetCanaryInput, opts ...request.Option) (*GetCanaryOutput, error) { 732 req, out := c.GetCanaryRequest(input) 733 req.SetContext(ctx) 734 req.ApplyOptions(opts...) 735 return out, req.Send() 736 } 737 738 const opGetCanaryRuns = "GetCanaryRuns" 739 740 // GetCanaryRunsRequest generates a "aws/request.Request" representing the 741 // client's request for the GetCanaryRuns operation. The "output" return 742 // value will be populated with the request's response once the request completes 743 // successfully. 744 // 745 // Use "Send" method on the returned Request to send the API call to the service. 746 // the "output" return value is not valid until after Send returns without error. 747 // 748 // See GetCanaryRuns for more information on using the GetCanaryRuns 749 // API call, and error handling. 750 // 751 // This method is useful when you want to inject custom logic or configuration 752 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 753 // 754 // 755 // // Example sending a request using the GetCanaryRunsRequest method. 756 // req, resp := client.GetCanaryRunsRequest(params) 757 // 758 // err := req.Send() 759 // if err == nil { // resp is now filled 760 // fmt.Println(resp) 761 // } 762 // 763 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns 764 func (c *Synthetics) GetCanaryRunsRequest(input *GetCanaryRunsInput) (req *request.Request, output *GetCanaryRunsOutput) { 765 op := &request.Operation{ 766 Name: opGetCanaryRuns, 767 HTTPMethod: "POST", 768 HTTPPath: "/canary/{name}/runs", 769 Paginator: &request.Paginator{ 770 InputTokens: []string{"NextToken"}, 771 OutputTokens: []string{"NextToken"}, 772 LimitToken: "MaxResults", 773 TruncationToken: "", 774 }, 775 } 776 777 if input == nil { 778 input = &GetCanaryRunsInput{} 779 } 780 781 output = &GetCanaryRunsOutput{} 782 req = c.newRequest(op, input, output) 783 return 784 } 785 786 // GetCanaryRuns API operation for Synthetics. 787 // 788 // Retrieves a list of runs for a specified canary. 789 // 790 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 791 // with awserr.Error's Code and Message methods to get detailed information about 792 // the error. 793 // 794 // See the AWS API reference guide for Synthetics's 795 // API operation GetCanaryRuns for usage and error information. 796 // 797 // Returned Error Types: 798 // * InternalServerException 799 // An unknown internal error occurred. 800 // 801 // * ValidationException 802 // A parameter could not be validated. 803 // 804 // * ResourceNotFoundException 805 // One of the specified resources was not found. 806 // 807 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns 808 func (c *Synthetics) GetCanaryRuns(input *GetCanaryRunsInput) (*GetCanaryRunsOutput, error) { 809 req, out := c.GetCanaryRunsRequest(input) 810 return out, req.Send() 811 } 812 813 // GetCanaryRunsWithContext is the same as GetCanaryRuns with the addition of 814 // the ability to pass a context and additional request options. 815 // 816 // See GetCanaryRuns for details on how to use this API operation. 817 // 818 // The context must be non-nil and will be used for request cancellation. If 819 // the context is nil a panic will occur. In the future the SDK may create 820 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 821 // for more information on using Contexts. 822 func (c *Synthetics) GetCanaryRunsWithContext(ctx aws.Context, input *GetCanaryRunsInput, opts ...request.Option) (*GetCanaryRunsOutput, error) { 823 req, out := c.GetCanaryRunsRequest(input) 824 req.SetContext(ctx) 825 req.ApplyOptions(opts...) 826 return out, req.Send() 827 } 828 829 // GetCanaryRunsPages iterates over the pages of a GetCanaryRuns operation, 830 // calling the "fn" function with the response data for each page. To stop 831 // iterating, return false from the fn function. 832 // 833 // See GetCanaryRuns method for more information on how to use this operation. 834 // 835 // Note: This operation can generate multiple requests to a service. 836 // 837 // // Example iterating over at most 3 pages of a GetCanaryRuns operation. 838 // pageNum := 0 839 // err := client.GetCanaryRunsPages(params, 840 // func(page *synthetics.GetCanaryRunsOutput, lastPage bool) bool { 841 // pageNum++ 842 // fmt.Println(page) 843 // return pageNum <= 3 844 // }) 845 // 846 func (c *Synthetics) GetCanaryRunsPages(input *GetCanaryRunsInput, fn func(*GetCanaryRunsOutput, bool) bool) error { 847 return c.GetCanaryRunsPagesWithContext(aws.BackgroundContext(), input, fn) 848 } 849 850 // GetCanaryRunsPagesWithContext same as GetCanaryRunsPages except 851 // it takes a Context and allows setting request options on the pages. 852 // 853 // The context must be non-nil and will be used for request cancellation. If 854 // the context is nil a panic will occur. In the future the SDK may create 855 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 856 // for more information on using Contexts. 857 func (c *Synthetics) GetCanaryRunsPagesWithContext(ctx aws.Context, input *GetCanaryRunsInput, fn func(*GetCanaryRunsOutput, bool) bool, opts ...request.Option) error { 858 p := request.Pagination{ 859 NewRequest: func() (*request.Request, error) { 860 var inCpy *GetCanaryRunsInput 861 if input != nil { 862 tmp := *input 863 inCpy = &tmp 864 } 865 req, _ := c.GetCanaryRunsRequest(inCpy) 866 req.SetContext(ctx) 867 req.ApplyOptions(opts...) 868 return req, nil 869 }, 870 } 871 872 for p.Next() { 873 if !fn(p.Page().(*GetCanaryRunsOutput), !p.HasNextPage()) { 874 break 875 } 876 } 877 878 return p.Err() 879 } 880 881 const opListTagsForResource = "ListTagsForResource" 882 883 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 884 // client's request for the ListTagsForResource operation. The "output" return 885 // value will be populated with the request's response once the request completes 886 // successfully. 887 // 888 // Use "Send" method on the returned Request to send the API call to the service. 889 // the "output" return value is not valid until after Send returns without error. 890 // 891 // See ListTagsForResource for more information on using the ListTagsForResource 892 // API call, and error handling. 893 // 894 // This method is useful when you want to inject custom logic or configuration 895 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 896 // 897 // 898 // // Example sending a request using the ListTagsForResourceRequest method. 899 // req, resp := client.ListTagsForResourceRequest(params) 900 // 901 // err := req.Send() 902 // if err == nil { // resp is now filled 903 // fmt.Println(resp) 904 // } 905 // 906 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource 907 func (c *Synthetics) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 908 op := &request.Operation{ 909 Name: opListTagsForResource, 910 HTTPMethod: "GET", 911 HTTPPath: "/tags/{resourceArn}", 912 } 913 914 if input == nil { 915 input = &ListTagsForResourceInput{} 916 } 917 918 output = &ListTagsForResourceOutput{} 919 req = c.newRequest(op, input, output) 920 return 921 } 922 923 // ListTagsForResource API operation for Synthetics. 924 // 925 // Displays the tags associated with a canary. 926 // 927 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 928 // with awserr.Error's Code and Message methods to get detailed information about 929 // the error. 930 // 931 // See the AWS API reference guide for Synthetics's 932 // API operation ListTagsForResource for usage and error information. 933 // 934 // Returned Error Types: 935 // * InternalServerException 936 // An unknown internal error occurred. 937 // 938 // * ResourceNotFoundException 939 // One of the specified resources was not found. 940 // 941 // * ValidationException 942 // A parameter could not be validated. 943 // 944 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource 945 func (c *Synthetics) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 946 req, out := c.ListTagsForResourceRequest(input) 947 return out, req.Send() 948 } 949 950 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 951 // the ability to pass a context and additional request options. 952 // 953 // See ListTagsForResource for details on how to use this API operation. 954 // 955 // The context must be non-nil and will be used for request cancellation. If 956 // the context is nil a panic will occur. In the future the SDK may create 957 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 958 // for more information on using Contexts. 959 func (c *Synthetics) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 960 req, out := c.ListTagsForResourceRequest(input) 961 req.SetContext(ctx) 962 req.ApplyOptions(opts...) 963 return out, req.Send() 964 } 965 966 const opStartCanary = "StartCanary" 967 968 // StartCanaryRequest generates a "aws/request.Request" representing the 969 // client's request for the StartCanary operation. The "output" return 970 // value will be populated with the request's response once the request completes 971 // successfully. 972 // 973 // Use "Send" method on the returned Request to send the API call to the service. 974 // the "output" return value is not valid until after Send returns without error. 975 // 976 // See StartCanary for more information on using the StartCanary 977 // API call, and error handling. 978 // 979 // This method is useful when you want to inject custom logic or configuration 980 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 981 // 982 // 983 // // Example sending a request using the StartCanaryRequest method. 984 // req, resp := client.StartCanaryRequest(params) 985 // 986 // err := req.Send() 987 // if err == nil { // resp is now filled 988 // fmt.Println(resp) 989 // } 990 // 991 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary 992 func (c *Synthetics) StartCanaryRequest(input *StartCanaryInput) (req *request.Request, output *StartCanaryOutput) { 993 op := &request.Operation{ 994 Name: opStartCanary, 995 HTTPMethod: "POST", 996 HTTPPath: "/canary/{name}/start", 997 } 998 999 if input == nil { 1000 input = &StartCanaryInput{} 1001 } 1002 1003 output = &StartCanaryOutput{} 1004 req = c.newRequest(op, input, output) 1005 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1006 return 1007 } 1008 1009 // StartCanary API operation for Synthetics. 1010 // 1011 // Use this operation to run a canary that has already been created. The frequency 1012 // of the canary runs is determined by the value of the canary's Schedule. To 1013 // see a canary's schedule, use GetCanary (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanary.html). 1014 // 1015 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1016 // with awserr.Error's Code and Message methods to get detailed information about 1017 // the error. 1018 // 1019 // See the AWS API reference guide for Synthetics's 1020 // API operation StartCanary for usage and error information. 1021 // 1022 // Returned Error Types: 1023 // * InternalServerException 1024 // An unknown internal error occurred. 1025 // 1026 // * ValidationException 1027 // A parameter could not be validated. 1028 // 1029 // * ResourceNotFoundException 1030 // One of the specified resources was not found. 1031 // 1032 // * ConflictException 1033 // A conflicting operation is already in progress. 1034 // 1035 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary 1036 func (c *Synthetics) StartCanary(input *StartCanaryInput) (*StartCanaryOutput, error) { 1037 req, out := c.StartCanaryRequest(input) 1038 return out, req.Send() 1039 } 1040 1041 // StartCanaryWithContext is the same as StartCanary with the addition of 1042 // the ability to pass a context and additional request options. 1043 // 1044 // See StartCanary for details on how to use this API operation. 1045 // 1046 // The context must be non-nil and will be used for request cancellation. If 1047 // the context is nil a panic will occur. In the future the SDK may create 1048 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1049 // for more information on using Contexts. 1050 func (c *Synthetics) StartCanaryWithContext(ctx aws.Context, input *StartCanaryInput, opts ...request.Option) (*StartCanaryOutput, error) { 1051 req, out := c.StartCanaryRequest(input) 1052 req.SetContext(ctx) 1053 req.ApplyOptions(opts...) 1054 return out, req.Send() 1055 } 1056 1057 const opStopCanary = "StopCanary" 1058 1059 // StopCanaryRequest generates a "aws/request.Request" representing the 1060 // client's request for the StopCanary operation. The "output" return 1061 // value will be populated with the request's response once the request completes 1062 // successfully. 1063 // 1064 // Use "Send" method on the returned Request to send the API call to the service. 1065 // the "output" return value is not valid until after Send returns without error. 1066 // 1067 // See StopCanary for more information on using the StopCanary 1068 // API call, and error handling. 1069 // 1070 // This method is useful when you want to inject custom logic or configuration 1071 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1072 // 1073 // 1074 // // Example sending a request using the StopCanaryRequest method. 1075 // req, resp := client.StopCanaryRequest(params) 1076 // 1077 // err := req.Send() 1078 // if err == nil { // resp is now filled 1079 // fmt.Println(resp) 1080 // } 1081 // 1082 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary 1083 func (c *Synthetics) StopCanaryRequest(input *StopCanaryInput) (req *request.Request, output *StopCanaryOutput) { 1084 op := &request.Operation{ 1085 Name: opStopCanary, 1086 HTTPMethod: "POST", 1087 HTTPPath: "/canary/{name}/stop", 1088 } 1089 1090 if input == nil { 1091 input = &StopCanaryInput{} 1092 } 1093 1094 output = &StopCanaryOutput{} 1095 req = c.newRequest(op, input, output) 1096 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1097 return 1098 } 1099 1100 // StopCanary API operation for Synthetics. 1101 // 1102 // Stops the canary to prevent all future runs. If the canary is currently running, 1103 // Synthetics stops waiting for the current run of the specified canary to complete. 1104 // The run that is in progress completes on its own, publishes metrics, and 1105 // uploads artifacts, but it is not recorded in Synthetics as a completed run. 1106 // 1107 // You can use StartCanary to start it running again with the canary’s current 1108 // schedule at any point in the future. 1109 // 1110 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1111 // with awserr.Error's Code and Message methods to get detailed information about 1112 // the error. 1113 // 1114 // See the AWS API reference guide for Synthetics's 1115 // API operation StopCanary for usage and error information. 1116 // 1117 // Returned Error Types: 1118 // * InternalServerException 1119 // An unknown internal error occurred. 1120 // 1121 // * ValidationException 1122 // A parameter could not be validated. 1123 // 1124 // * ResourceNotFoundException 1125 // One of the specified resources was not found. 1126 // 1127 // * ConflictException 1128 // A conflicting operation is already in progress. 1129 // 1130 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary 1131 func (c *Synthetics) StopCanary(input *StopCanaryInput) (*StopCanaryOutput, error) { 1132 req, out := c.StopCanaryRequest(input) 1133 return out, req.Send() 1134 } 1135 1136 // StopCanaryWithContext is the same as StopCanary with the addition of 1137 // the ability to pass a context and additional request options. 1138 // 1139 // See StopCanary for details on how to use this API operation. 1140 // 1141 // The context must be non-nil and will be used for request cancellation. If 1142 // the context is nil a panic will occur. In the future the SDK may create 1143 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1144 // for more information on using Contexts. 1145 func (c *Synthetics) StopCanaryWithContext(ctx aws.Context, input *StopCanaryInput, opts ...request.Option) (*StopCanaryOutput, error) { 1146 req, out := c.StopCanaryRequest(input) 1147 req.SetContext(ctx) 1148 req.ApplyOptions(opts...) 1149 return out, req.Send() 1150 } 1151 1152 const opTagResource = "TagResource" 1153 1154 // TagResourceRequest generates a "aws/request.Request" representing the 1155 // client's request for the TagResource operation. The "output" return 1156 // value will be populated with the request's response once the request completes 1157 // successfully. 1158 // 1159 // Use "Send" method on the returned Request to send the API call to the service. 1160 // the "output" return value is not valid until after Send returns without error. 1161 // 1162 // See TagResource for more information on using the TagResource 1163 // API call, and error handling. 1164 // 1165 // This method is useful when you want to inject custom logic or configuration 1166 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1167 // 1168 // 1169 // // Example sending a request using the TagResourceRequest method. 1170 // req, resp := client.TagResourceRequest(params) 1171 // 1172 // err := req.Send() 1173 // if err == nil { // resp is now filled 1174 // fmt.Println(resp) 1175 // } 1176 // 1177 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource 1178 func (c *Synthetics) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1179 op := &request.Operation{ 1180 Name: opTagResource, 1181 HTTPMethod: "POST", 1182 HTTPPath: "/tags/{resourceArn}", 1183 } 1184 1185 if input == nil { 1186 input = &TagResourceInput{} 1187 } 1188 1189 output = &TagResourceOutput{} 1190 req = c.newRequest(op, input, output) 1191 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1192 return 1193 } 1194 1195 // TagResource API operation for Synthetics. 1196 // 1197 // Assigns one or more tags (key-value pairs) to the specified canary. 1198 // 1199 // Tags can help you organize and categorize your resources. You can also use 1200 // them to scope user permissions, by granting a user permission to access or 1201 // change only resources with certain tag values. 1202 // 1203 // Tags don't have any semantic meaning to Amazon Web Services and are interpreted 1204 // strictly as strings of characters. 1205 // 1206 // You can use the TagResource action with a canary that already has tags. If 1207 // you specify a new tag key for the alarm, this tag is appended to the list 1208 // of tags associated with the alarm. If you specify a tag key that is already 1209 // associated with the alarm, the new tag value that you specify replaces the 1210 // previous value for that tag. 1211 // 1212 // You can associate as many as 50 tags with a canary. 1213 // 1214 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1215 // with awserr.Error's Code and Message methods to get detailed information about 1216 // the error. 1217 // 1218 // See the AWS API reference guide for Synthetics's 1219 // API operation TagResource for usage and error information. 1220 // 1221 // Returned Error Types: 1222 // * InternalServerException 1223 // An unknown internal error occurred. 1224 // 1225 // * ResourceNotFoundException 1226 // One of the specified resources was not found. 1227 // 1228 // * ValidationException 1229 // A parameter could not be validated. 1230 // 1231 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource 1232 func (c *Synthetics) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1233 req, out := c.TagResourceRequest(input) 1234 return out, req.Send() 1235 } 1236 1237 // TagResourceWithContext is the same as TagResource with the addition of 1238 // the ability to pass a context and additional request options. 1239 // 1240 // See TagResource for details on how to use this API operation. 1241 // 1242 // The context must be non-nil and will be used for request cancellation. If 1243 // the context is nil a panic will occur. In the future the SDK may create 1244 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1245 // for more information on using Contexts. 1246 func (c *Synthetics) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1247 req, out := c.TagResourceRequest(input) 1248 req.SetContext(ctx) 1249 req.ApplyOptions(opts...) 1250 return out, req.Send() 1251 } 1252 1253 const opUntagResource = "UntagResource" 1254 1255 // UntagResourceRequest generates a "aws/request.Request" representing the 1256 // client's request for the UntagResource operation. The "output" return 1257 // value will be populated with the request's response once the request completes 1258 // successfully. 1259 // 1260 // Use "Send" method on the returned Request to send the API call to the service. 1261 // the "output" return value is not valid until after Send returns without error. 1262 // 1263 // See UntagResource for more information on using the UntagResource 1264 // API call, and error handling. 1265 // 1266 // This method is useful when you want to inject custom logic or configuration 1267 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1268 // 1269 // 1270 // // Example sending a request using the UntagResourceRequest method. 1271 // req, resp := client.UntagResourceRequest(params) 1272 // 1273 // err := req.Send() 1274 // if err == nil { // resp is now filled 1275 // fmt.Println(resp) 1276 // } 1277 // 1278 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource 1279 func (c *Synthetics) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1280 op := &request.Operation{ 1281 Name: opUntagResource, 1282 HTTPMethod: "DELETE", 1283 HTTPPath: "/tags/{resourceArn}", 1284 } 1285 1286 if input == nil { 1287 input = &UntagResourceInput{} 1288 } 1289 1290 output = &UntagResourceOutput{} 1291 req = c.newRequest(op, input, output) 1292 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1293 return 1294 } 1295 1296 // UntagResource API operation for Synthetics. 1297 // 1298 // Removes one or more tags from the specified canary. 1299 // 1300 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1301 // with awserr.Error's Code and Message methods to get detailed information about 1302 // the error. 1303 // 1304 // See the AWS API reference guide for Synthetics's 1305 // API operation UntagResource for usage and error information. 1306 // 1307 // Returned Error Types: 1308 // * InternalServerException 1309 // An unknown internal error occurred. 1310 // 1311 // * ResourceNotFoundException 1312 // One of the specified resources was not found. 1313 // 1314 // * ValidationException 1315 // A parameter could not be validated. 1316 // 1317 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource 1318 func (c *Synthetics) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1319 req, out := c.UntagResourceRequest(input) 1320 return out, req.Send() 1321 } 1322 1323 // UntagResourceWithContext is the same as UntagResource with the addition of 1324 // the ability to pass a context and additional request options. 1325 // 1326 // See UntagResource for details on how to use this API operation. 1327 // 1328 // The context must be non-nil and will be used for request cancellation. If 1329 // the context is nil a panic will occur. In the future the SDK may create 1330 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1331 // for more information on using Contexts. 1332 func (c *Synthetics) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1333 req, out := c.UntagResourceRequest(input) 1334 req.SetContext(ctx) 1335 req.ApplyOptions(opts...) 1336 return out, req.Send() 1337 } 1338 1339 const opUpdateCanary = "UpdateCanary" 1340 1341 // UpdateCanaryRequest generates a "aws/request.Request" representing the 1342 // client's request for the UpdateCanary operation. The "output" return 1343 // value will be populated with the request's response once the request completes 1344 // successfully. 1345 // 1346 // Use "Send" method on the returned Request to send the API call to the service. 1347 // the "output" return value is not valid until after Send returns without error. 1348 // 1349 // See UpdateCanary for more information on using the UpdateCanary 1350 // API call, and error handling. 1351 // 1352 // This method is useful when you want to inject custom logic or configuration 1353 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1354 // 1355 // 1356 // // Example sending a request using the UpdateCanaryRequest method. 1357 // req, resp := client.UpdateCanaryRequest(params) 1358 // 1359 // err := req.Send() 1360 // if err == nil { // resp is now filled 1361 // fmt.Println(resp) 1362 // } 1363 // 1364 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary 1365 func (c *Synthetics) UpdateCanaryRequest(input *UpdateCanaryInput) (req *request.Request, output *UpdateCanaryOutput) { 1366 op := &request.Operation{ 1367 Name: opUpdateCanary, 1368 HTTPMethod: "PATCH", 1369 HTTPPath: "/canary/{name}", 1370 } 1371 1372 if input == nil { 1373 input = &UpdateCanaryInput{} 1374 } 1375 1376 output = &UpdateCanaryOutput{} 1377 req = c.newRequest(op, input, output) 1378 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1379 return 1380 } 1381 1382 // UpdateCanary API operation for Synthetics. 1383 // 1384 // Use this operation to change the settings of a canary that has already been 1385 // created. 1386 // 1387 // You can't use this operation to update the tags of an existing canary. To 1388 // change the tags of an existing canary, use TagResource (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_TagResource.html). 1389 // 1390 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1391 // with awserr.Error's Code and Message methods to get detailed information about 1392 // the error. 1393 // 1394 // See the AWS API reference guide for Synthetics's 1395 // API operation UpdateCanary for usage and error information. 1396 // 1397 // Returned Error Types: 1398 // * InternalServerException 1399 // An unknown internal error occurred. 1400 // 1401 // * ValidationException 1402 // A parameter could not be validated. 1403 // 1404 // * ResourceNotFoundException 1405 // One of the specified resources was not found. 1406 // 1407 // * ConflictException 1408 // A conflicting operation is already in progress. 1409 // 1410 // See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary 1411 func (c *Synthetics) UpdateCanary(input *UpdateCanaryInput) (*UpdateCanaryOutput, error) { 1412 req, out := c.UpdateCanaryRequest(input) 1413 return out, req.Send() 1414 } 1415 1416 // UpdateCanaryWithContext is the same as UpdateCanary with the addition of 1417 // the ability to pass a context and additional request options. 1418 // 1419 // See UpdateCanary for details on how to use this API operation. 1420 // 1421 // The context must be non-nil and will be used for request cancellation. If 1422 // the context is nil a panic will occur. In the future the SDK may create 1423 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1424 // for more information on using Contexts. 1425 func (c *Synthetics) UpdateCanaryWithContext(ctx aws.Context, input *UpdateCanaryInput, opts ...request.Option) (*UpdateCanaryOutput, error) { 1426 req, out := c.UpdateCanaryRequest(input) 1427 req.SetContext(ctx) 1428 req.ApplyOptions(opts...) 1429 return out, req.Send() 1430 } 1431 1432 // A structure that contains the configuration for canary artifacts, including 1433 // the encryption-at-rest settings for artifacts that the canary uploads to 1434 // Amazon S3. 1435 type ArtifactConfigInput_ struct { 1436 _ struct{} `type:"structure"` 1437 1438 // A structure that contains the configuration of the encryption-at-rest settings 1439 // for artifacts that the canary uploads to Amazon S3. Artifact encryption functionality 1440 // is available only for canaries that use Synthetics runtime version syn-nodejs-puppeteer-3.3 1441 // or later. For more information, see Encrypting canary artifacts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html) 1442 S3Encryption *S3EncryptionConfig `type:"structure"` 1443 } 1444 1445 // String returns the string representation. 1446 // 1447 // API parameter values that are decorated as "sensitive" in the API will not 1448 // be included in the string output. The member name will be present, but the 1449 // value will be replaced with "sensitive". 1450 func (s ArtifactConfigInput_) String() string { 1451 return awsutil.Prettify(s) 1452 } 1453 1454 // GoString returns the string representation. 1455 // 1456 // API parameter values that are decorated as "sensitive" in the API will not 1457 // be included in the string output. The member name will be present, but the 1458 // value will be replaced with "sensitive". 1459 func (s ArtifactConfigInput_) GoString() string { 1460 return s.String() 1461 } 1462 1463 // Validate inspects the fields of the type to determine if they are valid. 1464 func (s *ArtifactConfigInput_) Validate() error { 1465 invalidParams := request.ErrInvalidParams{Context: "ArtifactConfigInput_"} 1466 if s.S3Encryption != nil { 1467 if err := s.S3Encryption.Validate(); err != nil { 1468 invalidParams.AddNested("S3Encryption", err.(request.ErrInvalidParams)) 1469 } 1470 } 1471 1472 if invalidParams.Len() > 0 { 1473 return invalidParams 1474 } 1475 return nil 1476 } 1477 1478 // SetS3Encryption sets the S3Encryption field's value. 1479 func (s *ArtifactConfigInput_) SetS3Encryption(v *S3EncryptionConfig) *ArtifactConfigInput_ { 1480 s.S3Encryption = v 1481 return s 1482 } 1483 1484 // A structure that contains the configuration for canary artifacts, including 1485 // the encryption-at-rest settings for artifacts that the canary uploads to 1486 // Amazon S3. 1487 type ArtifactConfigOutput_ struct { 1488 _ struct{} `type:"structure"` 1489 1490 // A structure that contains the configuration of encryption settings for canary 1491 // artifacts that are stored in Amazon S3. 1492 S3Encryption *S3EncryptionConfig `type:"structure"` 1493 } 1494 1495 // String returns the string representation. 1496 // 1497 // API parameter values that are decorated as "sensitive" in the API will not 1498 // be included in the string output. The member name will be present, but the 1499 // value will be replaced with "sensitive". 1500 func (s ArtifactConfigOutput_) String() string { 1501 return awsutil.Prettify(s) 1502 } 1503 1504 // GoString returns the string representation. 1505 // 1506 // API parameter values that are decorated as "sensitive" in the API will not 1507 // be included in the string output. The member name will be present, but the 1508 // value will be replaced with "sensitive". 1509 func (s ArtifactConfigOutput_) GoString() string { 1510 return s.String() 1511 } 1512 1513 // SetS3Encryption sets the S3Encryption field's value. 1514 func (s *ArtifactConfigOutput_) SetS3Encryption(v *S3EncryptionConfig) *ArtifactConfigOutput_ { 1515 s.S3Encryption = v 1516 return s 1517 } 1518 1519 // A structure representing a screenshot that is used as a baseline during visual 1520 // monitoring comparisons made by the canary. 1521 type BaseScreenshot struct { 1522 _ struct{} `type:"structure"` 1523 1524 // Coordinates that define the part of a screen to ignore during screenshot 1525 // comparisons. To obtain the coordinates to use here, use the CloudWatch Logs 1526 // console to draw the boundaries on the screen. For more information, see {LINK} 1527 IgnoreCoordinates []*string `type:"list"` 1528 1529 // The name of the screenshot. This is generated the first time the canary is 1530 // run after the UpdateCanary operation that specified for this canary to perform 1531 // visual monitoring. 1532 // 1533 // ScreenshotName is a required field 1534 ScreenshotName *string `min:"1" type:"string" required:"true"` 1535 } 1536 1537 // String returns the string representation. 1538 // 1539 // API parameter values that are decorated as "sensitive" in the API will not 1540 // be included in the string output. The member name will be present, but the 1541 // value will be replaced with "sensitive". 1542 func (s BaseScreenshot) String() string { 1543 return awsutil.Prettify(s) 1544 } 1545 1546 // GoString returns the string representation. 1547 // 1548 // API parameter values that are decorated as "sensitive" in the API will not 1549 // be included in the string output. The member name will be present, but the 1550 // value will be replaced with "sensitive". 1551 func (s BaseScreenshot) GoString() string { 1552 return s.String() 1553 } 1554 1555 // Validate inspects the fields of the type to determine if they are valid. 1556 func (s *BaseScreenshot) Validate() error { 1557 invalidParams := request.ErrInvalidParams{Context: "BaseScreenshot"} 1558 if s.ScreenshotName == nil { 1559 invalidParams.Add(request.NewErrParamRequired("ScreenshotName")) 1560 } 1561 if s.ScreenshotName != nil && len(*s.ScreenshotName) < 1 { 1562 invalidParams.Add(request.NewErrParamMinLen("ScreenshotName", 1)) 1563 } 1564 1565 if invalidParams.Len() > 0 { 1566 return invalidParams 1567 } 1568 return nil 1569 } 1570 1571 // SetIgnoreCoordinates sets the IgnoreCoordinates field's value. 1572 func (s *BaseScreenshot) SetIgnoreCoordinates(v []*string) *BaseScreenshot { 1573 s.IgnoreCoordinates = v 1574 return s 1575 } 1576 1577 // SetScreenshotName sets the ScreenshotName field's value. 1578 func (s *BaseScreenshot) SetScreenshotName(v string) *BaseScreenshot { 1579 s.ScreenshotName = &v 1580 return s 1581 } 1582 1583 // This structure contains all information about one canary in your account. 1584 type Canary struct { 1585 _ struct{} `type:"structure"` 1586 1587 // A structure that contains the configuration for canary artifacts, including 1588 // the encryption-at-rest settings for artifacts that the canary uploads to 1589 // Amazon S3. 1590 ArtifactConfig *ArtifactConfigOutput_ `type:"structure"` 1591 1592 // The location in Amazon S3 where Synthetics stores artifacts from the runs 1593 // of this canary. Artifacts include the log file, screenshots, and HAR files. 1594 ArtifactS3Location *string `min:"1" type:"string"` 1595 1596 // This structure contains information about the canary's Lambda handler and 1597 // where its code is stored by CloudWatch Synthetics. 1598 Code *CanaryCodeOutput `type:"structure"` 1599 1600 // The ARN of the Lambda function that is used as your canary's engine. For 1601 // more information about Lambda ARN format, see Resources and Conditions for 1602 // Lambda Actions (https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html). 1603 EngineArn *string `min:"1" type:"string"` 1604 1605 // The ARN of the IAM role used to run the canary. This role must include lambda.amazonaws.com 1606 // as a principal in the trust policy. 1607 ExecutionRoleArn *string `min:"1" type:"string"` 1608 1609 // The number of days to retain data about failed runs of this canary. 1610 FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` 1611 1612 // The unique ID of this canary. 1613 Id *string `type:"string"` 1614 1615 // The name of the canary. 1616 Name *string `min:"1" type:"string"` 1617 1618 // A structure that contains information about a canary run. 1619 RunConfig *CanaryRunConfigOutput `type:"structure"` 1620 1621 // Specifies the runtime version to use for the canary. For more information 1622 // about runtime versions, see Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). 1623 RuntimeVersion *string `min:"1" type:"string"` 1624 1625 // A structure that contains information about how often the canary is to run, 1626 // and when these runs are to stop. 1627 Schedule *CanaryScheduleOutput `type:"structure"` 1628 1629 // A structure that contains information about the canary's status. 1630 Status *CanaryStatus `type:"structure"` 1631 1632 // The number of days to retain data about successful runs of this canary. 1633 SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` 1634 1635 // The list of key-value pairs that are associated with the canary. 1636 Tags map[string]*string `min:"1" type:"map"` 1637 1638 // A structure that contains information about when the canary was created, 1639 // modified, and most recently run. 1640 Timeline *CanaryTimeline `type:"structure"` 1641 1642 // If this canary performs visual monitoring by comparing screenshots, this 1643 // structure contains the ID of the canary run to use as the baseline for screenshots, 1644 // and the coordinates of any parts of the screen to ignore during the visual 1645 // monitoring comparison. 1646 VisualReference *VisualReferenceOutput_ `type:"structure"` 1647 1648 // If this canary is to test an endpoint in a VPC, this structure contains information 1649 // about the subnets and security groups of the VPC endpoint. For more information, 1650 // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). 1651 VpcConfig *VpcConfigOutput `type:"structure"` 1652 } 1653 1654 // String returns the string representation. 1655 // 1656 // API parameter values that are decorated as "sensitive" in the API will not 1657 // be included in the string output. The member name will be present, but the 1658 // value will be replaced with "sensitive". 1659 func (s Canary) String() string { 1660 return awsutil.Prettify(s) 1661 } 1662 1663 // GoString returns the string representation. 1664 // 1665 // API parameter values that are decorated as "sensitive" in the API will not 1666 // be included in the string output. The member name will be present, but the 1667 // value will be replaced with "sensitive". 1668 func (s Canary) GoString() string { 1669 return s.String() 1670 } 1671 1672 // SetArtifactConfig sets the ArtifactConfig field's value. 1673 func (s *Canary) SetArtifactConfig(v *ArtifactConfigOutput_) *Canary { 1674 s.ArtifactConfig = v 1675 return s 1676 } 1677 1678 // SetArtifactS3Location sets the ArtifactS3Location field's value. 1679 func (s *Canary) SetArtifactS3Location(v string) *Canary { 1680 s.ArtifactS3Location = &v 1681 return s 1682 } 1683 1684 // SetCode sets the Code field's value. 1685 func (s *Canary) SetCode(v *CanaryCodeOutput) *Canary { 1686 s.Code = v 1687 return s 1688 } 1689 1690 // SetEngineArn sets the EngineArn field's value. 1691 func (s *Canary) SetEngineArn(v string) *Canary { 1692 s.EngineArn = &v 1693 return s 1694 } 1695 1696 // SetExecutionRoleArn sets the ExecutionRoleArn field's value. 1697 func (s *Canary) SetExecutionRoleArn(v string) *Canary { 1698 s.ExecutionRoleArn = &v 1699 return s 1700 } 1701 1702 // SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. 1703 func (s *Canary) SetFailureRetentionPeriodInDays(v int64) *Canary { 1704 s.FailureRetentionPeriodInDays = &v 1705 return s 1706 } 1707 1708 // SetId sets the Id field's value. 1709 func (s *Canary) SetId(v string) *Canary { 1710 s.Id = &v 1711 return s 1712 } 1713 1714 // SetName sets the Name field's value. 1715 func (s *Canary) SetName(v string) *Canary { 1716 s.Name = &v 1717 return s 1718 } 1719 1720 // SetRunConfig sets the RunConfig field's value. 1721 func (s *Canary) SetRunConfig(v *CanaryRunConfigOutput) *Canary { 1722 s.RunConfig = v 1723 return s 1724 } 1725 1726 // SetRuntimeVersion sets the RuntimeVersion field's value. 1727 func (s *Canary) SetRuntimeVersion(v string) *Canary { 1728 s.RuntimeVersion = &v 1729 return s 1730 } 1731 1732 // SetSchedule sets the Schedule field's value. 1733 func (s *Canary) SetSchedule(v *CanaryScheduleOutput) *Canary { 1734 s.Schedule = v 1735 return s 1736 } 1737 1738 // SetStatus sets the Status field's value. 1739 func (s *Canary) SetStatus(v *CanaryStatus) *Canary { 1740 s.Status = v 1741 return s 1742 } 1743 1744 // SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. 1745 func (s *Canary) SetSuccessRetentionPeriodInDays(v int64) *Canary { 1746 s.SuccessRetentionPeriodInDays = &v 1747 return s 1748 } 1749 1750 // SetTags sets the Tags field's value. 1751 func (s *Canary) SetTags(v map[string]*string) *Canary { 1752 s.Tags = v 1753 return s 1754 } 1755 1756 // SetTimeline sets the Timeline field's value. 1757 func (s *Canary) SetTimeline(v *CanaryTimeline) *Canary { 1758 s.Timeline = v 1759 return s 1760 } 1761 1762 // SetVisualReference sets the VisualReference field's value. 1763 func (s *Canary) SetVisualReference(v *VisualReferenceOutput_) *Canary { 1764 s.VisualReference = v 1765 return s 1766 } 1767 1768 // SetVpcConfig sets the VpcConfig field's value. 1769 func (s *Canary) SetVpcConfig(v *VpcConfigOutput) *Canary { 1770 s.VpcConfig = v 1771 return s 1772 } 1773 1774 // Use this structure to input your script code for the canary. This structure 1775 // contains the Lambda handler with the location where the canary should start 1776 // running the script. If the script is stored in an S3 bucket, the bucket name, 1777 // key, and version are also included. If the script was passed into the canary 1778 // directly, the script code is contained in the value of Zipfile. 1779 type CanaryCodeInput struct { 1780 _ struct{} `type:"structure"` 1781 1782 // The entry point to use for the source code when running the canary. This 1783 // value must end with the string .handler. The string is limited to 29 characters 1784 // or fewer. 1785 // 1786 // Handler is a required field 1787 Handler *string `min:"1" type:"string" required:"true"` 1788 1789 // If your canary script is located in S3, specify the bucket name here. Do 1790 // not include s3:// as the start of the bucket name. 1791 S3Bucket *string `min:"1" type:"string"` 1792 1793 // The S3 key of your script. For more information, see Working with Amazon 1794 // S3 Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html). 1795 S3Key *string `min:"1" type:"string"` 1796 1797 // The S3 version ID of your script. 1798 S3Version *string `min:"1" type:"string"` 1799 1800 // If you input your canary script directly into the canary instead of referring 1801 // to an S3 location, the value of this parameter is the base64-encoded contents 1802 // of the .zip file that contains the script. It must be smaller than 256 Kb. 1803 // ZipFile is automatically base64 encoded/decoded by the SDK. 1804 ZipFile []byte `min:"1" type:"blob"` 1805 } 1806 1807 // String returns the string representation. 1808 // 1809 // API parameter values that are decorated as "sensitive" in the API will not 1810 // be included in the string output. The member name will be present, but the 1811 // value will be replaced with "sensitive". 1812 func (s CanaryCodeInput) String() string { 1813 return awsutil.Prettify(s) 1814 } 1815 1816 // GoString returns the string representation. 1817 // 1818 // API parameter values that are decorated as "sensitive" in the API will not 1819 // be included in the string output. The member name will be present, but the 1820 // value will be replaced with "sensitive". 1821 func (s CanaryCodeInput) GoString() string { 1822 return s.String() 1823 } 1824 1825 // Validate inspects the fields of the type to determine if they are valid. 1826 func (s *CanaryCodeInput) Validate() error { 1827 invalidParams := request.ErrInvalidParams{Context: "CanaryCodeInput"} 1828 if s.Handler == nil { 1829 invalidParams.Add(request.NewErrParamRequired("Handler")) 1830 } 1831 if s.Handler != nil && len(*s.Handler) < 1 { 1832 invalidParams.Add(request.NewErrParamMinLen("Handler", 1)) 1833 } 1834 if s.S3Bucket != nil && len(*s.S3Bucket) < 1 { 1835 invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 1)) 1836 } 1837 if s.S3Key != nil && len(*s.S3Key) < 1 { 1838 invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) 1839 } 1840 if s.S3Version != nil && len(*s.S3Version) < 1 { 1841 invalidParams.Add(request.NewErrParamMinLen("S3Version", 1)) 1842 } 1843 if s.ZipFile != nil && len(s.ZipFile) < 1 { 1844 invalidParams.Add(request.NewErrParamMinLen("ZipFile", 1)) 1845 } 1846 1847 if invalidParams.Len() > 0 { 1848 return invalidParams 1849 } 1850 return nil 1851 } 1852 1853 // SetHandler sets the Handler field's value. 1854 func (s *CanaryCodeInput) SetHandler(v string) *CanaryCodeInput { 1855 s.Handler = &v 1856 return s 1857 } 1858 1859 // SetS3Bucket sets the S3Bucket field's value. 1860 func (s *CanaryCodeInput) SetS3Bucket(v string) *CanaryCodeInput { 1861 s.S3Bucket = &v 1862 return s 1863 } 1864 1865 // SetS3Key sets the S3Key field's value. 1866 func (s *CanaryCodeInput) SetS3Key(v string) *CanaryCodeInput { 1867 s.S3Key = &v 1868 return s 1869 } 1870 1871 // SetS3Version sets the S3Version field's value. 1872 func (s *CanaryCodeInput) SetS3Version(v string) *CanaryCodeInput { 1873 s.S3Version = &v 1874 return s 1875 } 1876 1877 // SetZipFile sets the ZipFile field's value. 1878 func (s *CanaryCodeInput) SetZipFile(v []byte) *CanaryCodeInput { 1879 s.ZipFile = v 1880 return s 1881 } 1882 1883 // This structure contains information about the canary's Lambda handler and 1884 // where its code is stored by CloudWatch Synthetics. 1885 type CanaryCodeOutput struct { 1886 _ struct{} `type:"structure"` 1887 1888 // The entry point to use for the source code when running the canary. 1889 Handler *string `min:"1" type:"string"` 1890 1891 // The ARN of the Lambda layer where Synthetics stores the canary script code. 1892 SourceLocationArn *string `min:"1" type:"string"` 1893 } 1894 1895 // String returns the string representation. 1896 // 1897 // API parameter values that are decorated as "sensitive" in the API will not 1898 // be included in the string output. The member name will be present, but the 1899 // value will be replaced with "sensitive". 1900 func (s CanaryCodeOutput) String() string { 1901 return awsutil.Prettify(s) 1902 } 1903 1904 // GoString returns the string representation. 1905 // 1906 // API parameter values that are decorated as "sensitive" in the API will not 1907 // be included in the string output. The member name will be present, but the 1908 // value will be replaced with "sensitive". 1909 func (s CanaryCodeOutput) GoString() string { 1910 return s.String() 1911 } 1912 1913 // SetHandler sets the Handler field's value. 1914 func (s *CanaryCodeOutput) SetHandler(v string) *CanaryCodeOutput { 1915 s.Handler = &v 1916 return s 1917 } 1918 1919 // SetSourceLocationArn sets the SourceLocationArn field's value. 1920 func (s *CanaryCodeOutput) SetSourceLocationArn(v string) *CanaryCodeOutput { 1921 s.SourceLocationArn = &v 1922 return s 1923 } 1924 1925 // This structure contains information about the most recent run of a single 1926 // canary. 1927 type CanaryLastRun struct { 1928 _ struct{} `type:"structure"` 1929 1930 // The name of the canary. 1931 CanaryName *string `min:"1" type:"string"` 1932 1933 // The results from this canary's most recent run. 1934 LastRun *CanaryRun `type:"structure"` 1935 } 1936 1937 // String returns the string representation. 1938 // 1939 // API parameter values that are decorated as "sensitive" in the API will not 1940 // be included in the string output. The member name will be present, but the 1941 // value will be replaced with "sensitive". 1942 func (s CanaryLastRun) String() string { 1943 return awsutil.Prettify(s) 1944 } 1945 1946 // GoString returns the string representation. 1947 // 1948 // API parameter values that are decorated as "sensitive" in the API will not 1949 // be included in the string output. The member name will be present, but the 1950 // value will be replaced with "sensitive". 1951 func (s CanaryLastRun) GoString() string { 1952 return s.String() 1953 } 1954 1955 // SetCanaryName sets the CanaryName field's value. 1956 func (s *CanaryLastRun) SetCanaryName(v string) *CanaryLastRun { 1957 s.CanaryName = &v 1958 return s 1959 } 1960 1961 // SetLastRun sets the LastRun field's value. 1962 func (s *CanaryLastRun) SetLastRun(v *CanaryRun) *CanaryLastRun { 1963 s.LastRun = v 1964 return s 1965 } 1966 1967 // This structure contains the details about one run of one canary. 1968 type CanaryRun struct { 1969 _ struct{} `type:"structure"` 1970 1971 // The location where the canary stored artifacts from the run. Artifacts include 1972 // the log file, screenshots, and HAR files. 1973 ArtifactS3Location *string `min:"1" type:"string"` 1974 1975 // A unique ID that identifies this canary run. 1976 Id *string `type:"string"` 1977 1978 // The name of the canary. 1979 Name *string `min:"1" type:"string"` 1980 1981 // The status of this run. 1982 Status *CanaryRunStatus `type:"structure"` 1983 1984 // A structure that contains the start and end times of this run. 1985 Timeline *CanaryRunTimeline `type:"structure"` 1986 } 1987 1988 // String returns the string representation. 1989 // 1990 // API parameter values that are decorated as "sensitive" in the API will not 1991 // be included in the string output. The member name will be present, but the 1992 // value will be replaced with "sensitive". 1993 func (s CanaryRun) String() string { 1994 return awsutil.Prettify(s) 1995 } 1996 1997 // GoString returns the string representation. 1998 // 1999 // API parameter values that are decorated as "sensitive" in the API will not 2000 // be included in the string output. The member name will be present, but the 2001 // value will be replaced with "sensitive". 2002 func (s CanaryRun) GoString() string { 2003 return s.String() 2004 } 2005 2006 // SetArtifactS3Location sets the ArtifactS3Location field's value. 2007 func (s *CanaryRun) SetArtifactS3Location(v string) *CanaryRun { 2008 s.ArtifactS3Location = &v 2009 return s 2010 } 2011 2012 // SetId sets the Id field's value. 2013 func (s *CanaryRun) SetId(v string) *CanaryRun { 2014 s.Id = &v 2015 return s 2016 } 2017 2018 // SetName sets the Name field's value. 2019 func (s *CanaryRun) SetName(v string) *CanaryRun { 2020 s.Name = &v 2021 return s 2022 } 2023 2024 // SetStatus sets the Status field's value. 2025 func (s *CanaryRun) SetStatus(v *CanaryRunStatus) *CanaryRun { 2026 s.Status = v 2027 return s 2028 } 2029 2030 // SetTimeline sets the Timeline field's value. 2031 func (s *CanaryRun) SetTimeline(v *CanaryRunTimeline) *CanaryRun { 2032 s.Timeline = v 2033 return s 2034 } 2035 2036 // A structure that contains input information for a canary run. 2037 type CanaryRunConfigInput struct { 2038 _ struct{} `type:"structure"` 2039 2040 // Specifies whether this canary is to use active X-Ray tracing when it runs. 2041 // Active tracing enables this canary run to be displayed in the ServiceLens 2042 // and X-Ray service maps even if the canary does not hit an endpoint that has 2043 // X-Ray tracing enabled. Using X-Ray tracing incurs charges. For more information, 2044 // see Canaries and X-Ray tracing (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html). 2045 // 2046 // You can enable active tracing only for canaries that use version syn-nodejs-2.0 2047 // or later for their canary runtime. 2048 ActiveTracing *bool `type:"boolean"` 2049 2050 // Specifies the keys and values to use for any environment variables used in 2051 // the canary script. Use the following format: 2052 // 2053 // { "key1" : "value1", "key2" : "value2", ...} 2054 // 2055 // Keys must start with a letter and be at least two characters. The total size 2056 // of your environment variables cannot exceed 4 KB. You can't specify any Lambda 2057 // reserved environment variables as the keys for your environment variables. 2058 // For more information about reserved keys, see Runtime environment variables 2059 // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime). 2060 EnvironmentVariables map[string]*string `type:"map"` 2061 2062 // The maximum amount of memory available to the canary while it is running, 2063 // in MB. This value must be a multiple of 64. 2064 MemoryInMB *int64 `min:"960" type:"integer"` 2065 2066 // How long the canary is allowed to run before it must stop. You can't set 2067 // this time to be longer than the frequency of the runs of this canary. 2068 // 2069 // If you omit this field, the frequency of the canary is used as this value, 2070 // up to a maximum of 14 minutes. 2071 TimeoutInSeconds *int64 `min:"3" type:"integer"` 2072 } 2073 2074 // String returns the string representation. 2075 // 2076 // API parameter values that are decorated as "sensitive" in the API will not 2077 // be included in the string output. The member name will be present, but the 2078 // value will be replaced with "sensitive". 2079 func (s CanaryRunConfigInput) String() string { 2080 return awsutil.Prettify(s) 2081 } 2082 2083 // GoString returns the string representation. 2084 // 2085 // API parameter values that are decorated as "sensitive" in the API will not 2086 // be included in the string output. The member name will be present, but the 2087 // value will be replaced with "sensitive". 2088 func (s CanaryRunConfigInput) GoString() string { 2089 return s.String() 2090 } 2091 2092 // Validate inspects the fields of the type to determine if they are valid. 2093 func (s *CanaryRunConfigInput) Validate() error { 2094 invalidParams := request.ErrInvalidParams{Context: "CanaryRunConfigInput"} 2095 if s.MemoryInMB != nil && *s.MemoryInMB < 960 { 2096 invalidParams.Add(request.NewErrParamMinValue("MemoryInMB", 960)) 2097 } 2098 if s.TimeoutInSeconds != nil && *s.TimeoutInSeconds < 3 { 2099 invalidParams.Add(request.NewErrParamMinValue("TimeoutInSeconds", 3)) 2100 } 2101 2102 if invalidParams.Len() > 0 { 2103 return invalidParams 2104 } 2105 return nil 2106 } 2107 2108 // SetActiveTracing sets the ActiveTracing field's value. 2109 func (s *CanaryRunConfigInput) SetActiveTracing(v bool) *CanaryRunConfigInput { 2110 s.ActiveTracing = &v 2111 return s 2112 } 2113 2114 // SetEnvironmentVariables sets the EnvironmentVariables field's value. 2115 func (s *CanaryRunConfigInput) SetEnvironmentVariables(v map[string]*string) *CanaryRunConfigInput { 2116 s.EnvironmentVariables = v 2117 return s 2118 } 2119 2120 // SetMemoryInMB sets the MemoryInMB field's value. 2121 func (s *CanaryRunConfigInput) SetMemoryInMB(v int64) *CanaryRunConfigInput { 2122 s.MemoryInMB = &v 2123 return s 2124 } 2125 2126 // SetTimeoutInSeconds sets the TimeoutInSeconds field's value. 2127 func (s *CanaryRunConfigInput) SetTimeoutInSeconds(v int64) *CanaryRunConfigInput { 2128 s.TimeoutInSeconds = &v 2129 return s 2130 } 2131 2132 // A structure that contains information about a canary run. 2133 type CanaryRunConfigOutput struct { 2134 _ struct{} `type:"structure"` 2135 2136 // Displays whether this canary run used active X-Ray tracing. 2137 ActiveTracing *bool `type:"boolean"` 2138 2139 // The maximum amount of memory available to the canary while it is running, 2140 // in MB. This value must be a multiple of 64. 2141 MemoryInMB *int64 `min:"960" type:"integer"` 2142 2143 // How long the canary is allowed to run before it must stop. 2144 TimeoutInSeconds *int64 `min:"3" type:"integer"` 2145 } 2146 2147 // String returns the string representation. 2148 // 2149 // API parameter values that are decorated as "sensitive" in the API will not 2150 // be included in the string output. The member name will be present, but the 2151 // value will be replaced with "sensitive". 2152 func (s CanaryRunConfigOutput) String() string { 2153 return awsutil.Prettify(s) 2154 } 2155 2156 // GoString returns the string representation. 2157 // 2158 // API parameter values that are decorated as "sensitive" in the API will not 2159 // be included in the string output. The member name will be present, but the 2160 // value will be replaced with "sensitive". 2161 func (s CanaryRunConfigOutput) GoString() string { 2162 return s.String() 2163 } 2164 2165 // SetActiveTracing sets the ActiveTracing field's value. 2166 func (s *CanaryRunConfigOutput) SetActiveTracing(v bool) *CanaryRunConfigOutput { 2167 s.ActiveTracing = &v 2168 return s 2169 } 2170 2171 // SetMemoryInMB sets the MemoryInMB field's value. 2172 func (s *CanaryRunConfigOutput) SetMemoryInMB(v int64) *CanaryRunConfigOutput { 2173 s.MemoryInMB = &v 2174 return s 2175 } 2176 2177 // SetTimeoutInSeconds sets the TimeoutInSeconds field's value. 2178 func (s *CanaryRunConfigOutput) SetTimeoutInSeconds(v int64) *CanaryRunConfigOutput { 2179 s.TimeoutInSeconds = &v 2180 return s 2181 } 2182 2183 // This structure contains the status information about a canary run. 2184 type CanaryRunStatus struct { 2185 _ struct{} `type:"structure"` 2186 2187 // The current state of the run. 2188 State *string `type:"string" enum:"CanaryRunState"` 2189 2190 // If run of the canary failed, this field contains the reason for the error. 2191 StateReason *string `min:"1" type:"string"` 2192 2193 // If this value is CANARY_FAILURE, an exception occurred in the canary code. 2194 // If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics. 2195 StateReasonCode *string `type:"string" enum:"CanaryRunStateReasonCode"` 2196 } 2197 2198 // String returns the string representation. 2199 // 2200 // API parameter values that are decorated as "sensitive" in the API will not 2201 // be included in the string output. The member name will be present, but the 2202 // value will be replaced with "sensitive". 2203 func (s CanaryRunStatus) String() string { 2204 return awsutil.Prettify(s) 2205 } 2206 2207 // GoString returns the string representation. 2208 // 2209 // API parameter values that are decorated as "sensitive" in the API will not 2210 // be included in the string output. The member name will be present, but the 2211 // value will be replaced with "sensitive". 2212 func (s CanaryRunStatus) GoString() string { 2213 return s.String() 2214 } 2215 2216 // SetState sets the State field's value. 2217 func (s *CanaryRunStatus) SetState(v string) *CanaryRunStatus { 2218 s.State = &v 2219 return s 2220 } 2221 2222 // SetStateReason sets the StateReason field's value. 2223 func (s *CanaryRunStatus) SetStateReason(v string) *CanaryRunStatus { 2224 s.StateReason = &v 2225 return s 2226 } 2227 2228 // SetStateReasonCode sets the StateReasonCode field's value. 2229 func (s *CanaryRunStatus) SetStateReasonCode(v string) *CanaryRunStatus { 2230 s.StateReasonCode = &v 2231 return s 2232 } 2233 2234 // This structure contains the start and end times of a single canary run. 2235 type CanaryRunTimeline struct { 2236 _ struct{} `type:"structure"` 2237 2238 // The end time of the run. 2239 Completed *time.Time `type:"timestamp"` 2240 2241 // The start time of the run. 2242 Started *time.Time `type:"timestamp"` 2243 } 2244 2245 // String returns the string representation. 2246 // 2247 // API parameter values that are decorated as "sensitive" in the API will not 2248 // be included in the string output. The member name will be present, but the 2249 // value will be replaced with "sensitive". 2250 func (s CanaryRunTimeline) String() string { 2251 return awsutil.Prettify(s) 2252 } 2253 2254 // GoString returns the string representation. 2255 // 2256 // API parameter values that are decorated as "sensitive" in the API will not 2257 // be included in the string output. The member name will be present, but the 2258 // value will be replaced with "sensitive". 2259 func (s CanaryRunTimeline) GoString() string { 2260 return s.String() 2261 } 2262 2263 // SetCompleted sets the Completed field's value. 2264 func (s *CanaryRunTimeline) SetCompleted(v time.Time) *CanaryRunTimeline { 2265 s.Completed = &v 2266 return s 2267 } 2268 2269 // SetStarted sets the Started field's value. 2270 func (s *CanaryRunTimeline) SetStarted(v time.Time) *CanaryRunTimeline { 2271 s.Started = &v 2272 return s 2273 } 2274 2275 // This structure specifies how often a canary is to make runs and the date 2276 // and time when it should stop making runs. 2277 type CanaryScheduleInput struct { 2278 _ struct{} `type:"structure"` 2279 2280 // How long, in seconds, for the canary to continue making regular runs according 2281 // to the schedule in the Expression value. If you specify 0, the canary continues 2282 // making runs until you stop it. If you omit this field, the default of 0 is 2283 // used. 2284 DurationInSeconds *int64 `type:"long"` 2285 2286 // A rate expression or a cron expression that defines how often the canary 2287 // is to run. 2288 // 2289 // For a rate expression, The syntax is rate(number unit). unit can be minute, 2290 // minutes, or hour. 2291 // 2292 // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) 2293 // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. 2294 // You can specify a frequency between rate(1 minute) and rate(1 hour). 2295 // 2296 // Specifying rate(0 minute) or rate(0 hour) is a special value that causes 2297 // the canary to run only once when it is started. 2298 // 2299 // Use cron(expression) to specify a cron expression. You can't schedule a canary 2300 // to wait for more than a year before running. For information about the syntax 2301 // for cron expressions, see Scheduling canary runs using cron (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html). 2302 // 2303 // Expression is a required field 2304 Expression *string `min:"1" type:"string" required:"true"` 2305 } 2306 2307 // String returns the string representation. 2308 // 2309 // API parameter values that are decorated as "sensitive" in the API will not 2310 // be included in the string output. The member name will be present, but the 2311 // value will be replaced with "sensitive". 2312 func (s CanaryScheduleInput) String() string { 2313 return awsutil.Prettify(s) 2314 } 2315 2316 // GoString returns the string representation. 2317 // 2318 // API parameter values that are decorated as "sensitive" in the API will not 2319 // be included in the string output. The member name will be present, but the 2320 // value will be replaced with "sensitive". 2321 func (s CanaryScheduleInput) GoString() string { 2322 return s.String() 2323 } 2324 2325 // Validate inspects the fields of the type to determine if they are valid. 2326 func (s *CanaryScheduleInput) Validate() error { 2327 invalidParams := request.ErrInvalidParams{Context: "CanaryScheduleInput"} 2328 if s.Expression == nil { 2329 invalidParams.Add(request.NewErrParamRequired("Expression")) 2330 } 2331 if s.Expression != nil && len(*s.Expression) < 1 { 2332 invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) 2333 } 2334 2335 if invalidParams.Len() > 0 { 2336 return invalidParams 2337 } 2338 return nil 2339 } 2340 2341 // SetDurationInSeconds sets the DurationInSeconds field's value. 2342 func (s *CanaryScheduleInput) SetDurationInSeconds(v int64) *CanaryScheduleInput { 2343 s.DurationInSeconds = &v 2344 return s 2345 } 2346 2347 // SetExpression sets the Expression field's value. 2348 func (s *CanaryScheduleInput) SetExpression(v string) *CanaryScheduleInput { 2349 s.Expression = &v 2350 return s 2351 } 2352 2353 // How long, in seconds, for the canary to continue making regular runs according 2354 // to the schedule in the Expression value. 2355 type CanaryScheduleOutput struct { 2356 _ struct{} `type:"structure"` 2357 2358 // How long, in seconds, for the canary to continue making regular runs after 2359 // it was created. The runs are performed according to the schedule in the Expression 2360 // value. 2361 DurationInSeconds *int64 `type:"long"` 2362 2363 // A rate expression or a cron expression that defines how often the canary 2364 // is to run. 2365 // 2366 // For a rate expression, The syntax is rate(number unit). unit can be minute, 2367 // minutes, or hour. 2368 // 2369 // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) 2370 // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. 2371 // You can specify a frequency between rate(1 minute) and rate(1 hour). 2372 // 2373 // Specifying rate(0 minute) or rate(0 hour) is a special value that causes 2374 // the canary to run only once when it is started. 2375 // 2376 // Use cron(expression) to specify a cron expression. For information about 2377 // the syntax for cron expressions, see Scheduling canary runs using cron (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html). 2378 Expression *string `min:"1" type:"string"` 2379 } 2380 2381 // String returns the string representation. 2382 // 2383 // API parameter values that are decorated as "sensitive" in the API will not 2384 // be included in the string output. The member name will be present, but the 2385 // value will be replaced with "sensitive". 2386 func (s CanaryScheduleOutput) String() string { 2387 return awsutil.Prettify(s) 2388 } 2389 2390 // GoString returns the string representation. 2391 // 2392 // API parameter values that are decorated as "sensitive" in the API will not 2393 // be included in the string output. The member name will be present, but the 2394 // value will be replaced with "sensitive". 2395 func (s CanaryScheduleOutput) GoString() string { 2396 return s.String() 2397 } 2398 2399 // SetDurationInSeconds sets the DurationInSeconds field's value. 2400 func (s *CanaryScheduleOutput) SetDurationInSeconds(v int64) *CanaryScheduleOutput { 2401 s.DurationInSeconds = &v 2402 return s 2403 } 2404 2405 // SetExpression sets the Expression field's value. 2406 func (s *CanaryScheduleOutput) SetExpression(v string) *CanaryScheduleOutput { 2407 s.Expression = &v 2408 return s 2409 } 2410 2411 // A structure that contains the current state of the canary. 2412 type CanaryStatus struct { 2413 _ struct{} `type:"structure"` 2414 2415 // The current state of the canary. 2416 State *string `type:"string" enum:"CanaryState"` 2417 2418 // If the canary has insufficient permissions to run, this field provides more 2419 // details. 2420 StateReason *string `min:"1" type:"string"` 2421 2422 // If the canary cannot run or has failed, this field displays the reason. 2423 StateReasonCode *string `type:"string" enum:"CanaryStateReasonCode"` 2424 } 2425 2426 // String returns the string representation. 2427 // 2428 // API parameter values that are decorated as "sensitive" in the API will not 2429 // be included in the string output. The member name will be present, but the 2430 // value will be replaced with "sensitive". 2431 func (s CanaryStatus) String() string { 2432 return awsutil.Prettify(s) 2433 } 2434 2435 // GoString returns the string representation. 2436 // 2437 // API parameter values that are decorated as "sensitive" in the API will not 2438 // be included in the string output. The member name will be present, but the 2439 // value will be replaced with "sensitive". 2440 func (s CanaryStatus) GoString() string { 2441 return s.String() 2442 } 2443 2444 // SetState sets the State field's value. 2445 func (s *CanaryStatus) SetState(v string) *CanaryStatus { 2446 s.State = &v 2447 return s 2448 } 2449 2450 // SetStateReason sets the StateReason field's value. 2451 func (s *CanaryStatus) SetStateReason(v string) *CanaryStatus { 2452 s.StateReason = &v 2453 return s 2454 } 2455 2456 // SetStateReasonCode sets the StateReasonCode field's value. 2457 func (s *CanaryStatus) SetStateReasonCode(v string) *CanaryStatus { 2458 s.StateReasonCode = &v 2459 return s 2460 } 2461 2462 // This structure contains information about when the canary was created and 2463 // modified. 2464 type CanaryTimeline struct { 2465 _ struct{} `type:"structure"` 2466 2467 // The date and time the canary was created. 2468 Created *time.Time `type:"timestamp"` 2469 2470 // The date and time the canary was most recently modified. 2471 LastModified *time.Time `type:"timestamp"` 2472 2473 // The date and time that the canary's most recent run started. 2474 LastStarted *time.Time `type:"timestamp"` 2475 2476 // The date and time that the canary's most recent run ended. 2477 LastStopped *time.Time `type:"timestamp"` 2478 } 2479 2480 // String returns the string representation. 2481 // 2482 // API parameter values that are decorated as "sensitive" in the API will not 2483 // be included in the string output. The member name will be present, but the 2484 // value will be replaced with "sensitive". 2485 func (s CanaryTimeline) String() string { 2486 return awsutil.Prettify(s) 2487 } 2488 2489 // GoString returns the string representation. 2490 // 2491 // API parameter values that are decorated as "sensitive" in the API will not 2492 // be included in the string output. The member name will be present, but the 2493 // value will be replaced with "sensitive". 2494 func (s CanaryTimeline) GoString() string { 2495 return s.String() 2496 } 2497 2498 // SetCreated sets the Created field's value. 2499 func (s *CanaryTimeline) SetCreated(v time.Time) *CanaryTimeline { 2500 s.Created = &v 2501 return s 2502 } 2503 2504 // SetLastModified sets the LastModified field's value. 2505 func (s *CanaryTimeline) SetLastModified(v time.Time) *CanaryTimeline { 2506 s.LastModified = &v 2507 return s 2508 } 2509 2510 // SetLastStarted sets the LastStarted field's value. 2511 func (s *CanaryTimeline) SetLastStarted(v time.Time) *CanaryTimeline { 2512 s.LastStarted = &v 2513 return s 2514 } 2515 2516 // SetLastStopped sets the LastStopped field's value. 2517 func (s *CanaryTimeline) SetLastStopped(v time.Time) *CanaryTimeline { 2518 s.LastStopped = &v 2519 return s 2520 } 2521 2522 // A conflicting operation is already in progress. 2523 type ConflictException struct { 2524 _ struct{} `type:"structure"` 2525 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2526 2527 Message_ *string `locationName:"Message" type:"string"` 2528 } 2529 2530 // String returns the string representation. 2531 // 2532 // API parameter values that are decorated as "sensitive" in the API will not 2533 // be included in the string output. The member name will be present, but the 2534 // value will be replaced with "sensitive". 2535 func (s ConflictException) String() string { 2536 return awsutil.Prettify(s) 2537 } 2538 2539 // GoString returns the string representation. 2540 // 2541 // API parameter values that are decorated as "sensitive" in the API will not 2542 // be included in the string output. The member name will be present, but the 2543 // value will be replaced with "sensitive". 2544 func (s ConflictException) GoString() string { 2545 return s.String() 2546 } 2547 2548 func newErrorConflictException(v protocol.ResponseMetadata) error { 2549 return &ConflictException{ 2550 RespMetadata: v, 2551 } 2552 } 2553 2554 // Code returns the exception type name. 2555 func (s *ConflictException) Code() string { 2556 return "ConflictException" 2557 } 2558 2559 // Message returns the exception's message. 2560 func (s *ConflictException) Message() string { 2561 if s.Message_ != nil { 2562 return *s.Message_ 2563 } 2564 return "" 2565 } 2566 2567 // OrigErr always returns nil, satisfies awserr.Error interface. 2568 func (s *ConflictException) OrigErr() error { 2569 return nil 2570 } 2571 2572 func (s *ConflictException) Error() string { 2573 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2574 } 2575 2576 // Status code returns the HTTP status code for the request's response error. 2577 func (s *ConflictException) StatusCode() int { 2578 return s.RespMetadata.StatusCode 2579 } 2580 2581 // RequestID returns the service's response RequestID for request. 2582 func (s *ConflictException) RequestID() string { 2583 return s.RespMetadata.RequestID 2584 } 2585 2586 type CreateCanaryInput struct { 2587 _ struct{} `type:"structure"` 2588 2589 // A structure that contains the configuration for canary artifacts, including 2590 // the encryption-at-rest settings for artifacts that the canary uploads to 2591 // Amazon S3. 2592 ArtifactConfig *ArtifactConfigInput_ `type:"structure"` 2593 2594 // The location in Amazon S3 where Synthetics stores artifacts from the test 2595 // runs of this canary. Artifacts include the log file, screenshots, and HAR 2596 // files. The name of the S3 bucket can't include a period (.). 2597 // 2598 // ArtifactS3Location is a required field 2599 ArtifactS3Location *string `min:"1" type:"string" required:"true"` 2600 2601 // A structure that includes the entry point from which the canary should start 2602 // running your script. If the script is stored in an S3 bucket, the bucket 2603 // name, key, and version are also included. 2604 // 2605 // Code is a required field 2606 Code *CanaryCodeInput `type:"structure" required:"true"` 2607 2608 // The ARN of the IAM role to be used to run the canary. This role must already 2609 // exist, and must include lambda.amazonaws.com as a principal in the trust 2610 // policy. The role must also have the following permissions: 2611 // 2612 // * s3:PutObject 2613 // 2614 // * s3:GetBucketLocation 2615 // 2616 // * s3:ListAllMyBuckets 2617 // 2618 // * cloudwatch:PutMetricData 2619 // 2620 // * logs:CreateLogGroup 2621 // 2622 // * logs:CreateLogStream 2623 // 2624 // * logs:PutLogEvents 2625 // 2626 // ExecutionRoleArn is a required field 2627 ExecutionRoleArn *string `min:"1" type:"string" required:"true"` 2628 2629 // The number of days to retain data about failed runs of this canary. If you 2630 // omit this field, the default of 31 days is used. The valid range is 1 to 2631 // 455 days. 2632 FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` 2633 2634 // The name for this canary. Be sure to give it a descriptive name that distinguishes 2635 // it from other canaries in your account. 2636 // 2637 // Do not include secrets or proprietary information in your canary names. The 2638 // canary name makes up part of the canary ARN, and the ARN is included in outbound 2639 // calls over the internet. For more information, see Security Considerations 2640 // for Synthetics Canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). 2641 // 2642 // Name is a required field 2643 Name *string `min:"1" type:"string" required:"true"` 2644 2645 // A structure that contains the configuration for individual canary runs, such 2646 // as timeout value. 2647 RunConfig *CanaryRunConfigInput `type:"structure"` 2648 2649 // Specifies the runtime version to use for the canary. For a list of valid 2650 // runtime versions and more information about runtime versions, see Canary 2651 // Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). 2652 // 2653 // RuntimeVersion is a required field 2654 RuntimeVersion *string `min:"1" type:"string" required:"true"` 2655 2656 // A structure that contains information about how often the canary is to run 2657 // and when these test runs are to stop. 2658 // 2659 // Schedule is a required field 2660 Schedule *CanaryScheduleInput `type:"structure" required:"true"` 2661 2662 // The number of days to retain data about successful runs of this canary. If 2663 // you omit this field, the default of 31 days is used. The valid range is 1 2664 // to 455 days. 2665 SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` 2666 2667 // A list of key-value pairs to associate with the canary. You can associate 2668 // as many as 50 tags with a canary. 2669 // 2670 // Tags can help you organize and categorize your resources. You can also use 2671 // them to scope user permissions, by granting a user permission to access or 2672 // change only the resources that have certain tag values. 2673 Tags map[string]*string `min:"1" type:"map"` 2674 2675 // If this canary is to test an endpoint in a VPC, this structure contains information 2676 // about the subnet and security groups of the VPC endpoint. For more information, 2677 // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). 2678 VpcConfig *VpcConfigInput `type:"structure"` 2679 } 2680 2681 // String returns the string representation. 2682 // 2683 // API parameter values that are decorated as "sensitive" in the API will not 2684 // be included in the string output. The member name will be present, but the 2685 // value will be replaced with "sensitive". 2686 func (s CreateCanaryInput) String() string { 2687 return awsutil.Prettify(s) 2688 } 2689 2690 // GoString returns the string representation. 2691 // 2692 // API parameter values that are decorated as "sensitive" in the API will not 2693 // be included in the string output. The member name will be present, but the 2694 // value will be replaced with "sensitive". 2695 func (s CreateCanaryInput) GoString() string { 2696 return s.String() 2697 } 2698 2699 // Validate inspects the fields of the type to determine if they are valid. 2700 func (s *CreateCanaryInput) Validate() error { 2701 invalidParams := request.ErrInvalidParams{Context: "CreateCanaryInput"} 2702 if s.ArtifactS3Location == nil { 2703 invalidParams.Add(request.NewErrParamRequired("ArtifactS3Location")) 2704 } 2705 if s.ArtifactS3Location != nil && len(*s.ArtifactS3Location) < 1 { 2706 invalidParams.Add(request.NewErrParamMinLen("ArtifactS3Location", 1)) 2707 } 2708 if s.Code == nil { 2709 invalidParams.Add(request.NewErrParamRequired("Code")) 2710 } 2711 if s.ExecutionRoleArn == nil { 2712 invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) 2713 } 2714 if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 1 { 2715 invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 1)) 2716 } 2717 if s.FailureRetentionPeriodInDays != nil && *s.FailureRetentionPeriodInDays < 1 { 2718 invalidParams.Add(request.NewErrParamMinValue("FailureRetentionPeriodInDays", 1)) 2719 } 2720 if s.Name == nil { 2721 invalidParams.Add(request.NewErrParamRequired("Name")) 2722 } 2723 if s.Name != nil && len(*s.Name) < 1 { 2724 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2725 } 2726 if s.RuntimeVersion == nil { 2727 invalidParams.Add(request.NewErrParamRequired("RuntimeVersion")) 2728 } 2729 if s.RuntimeVersion != nil && len(*s.RuntimeVersion) < 1 { 2730 invalidParams.Add(request.NewErrParamMinLen("RuntimeVersion", 1)) 2731 } 2732 if s.Schedule == nil { 2733 invalidParams.Add(request.NewErrParamRequired("Schedule")) 2734 } 2735 if s.SuccessRetentionPeriodInDays != nil && *s.SuccessRetentionPeriodInDays < 1 { 2736 invalidParams.Add(request.NewErrParamMinValue("SuccessRetentionPeriodInDays", 1)) 2737 } 2738 if s.Tags != nil && len(s.Tags) < 1 { 2739 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 2740 } 2741 if s.ArtifactConfig != nil { 2742 if err := s.ArtifactConfig.Validate(); err != nil { 2743 invalidParams.AddNested("ArtifactConfig", err.(request.ErrInvalidParams)) 2744 } 2745 } 2746 if s.Code != nil { 2747 if err := s.Code.Validate(); err != nil { 2748 invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) 2749 } 2750 } 2751 if s.RunConfig != nil { 2752 if err := s.RunConfig.Validate(); err != nil { 2753 invalidParams.AddNested("RunConfig", err.(request.ErrInvalidParams)) 2754 } 2755 } 2756 if s.Schedule != nil { 2757 if err := s.Schedule.Validate(); err != nil { 2758 invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) 2759 } 2760 } 2761 2762 if invalidParams.Len() > 0 { 2763 return invalidParams 2764 } 2765 return nil 2766 } 2767 2768 // SetArtifactConfig sets the ArtifactConfig field's value. 2769 func (s *CreateCanaryInput) SetArtifactConfig(v *ArtifactConfigInput_) *CreateCanaryInput { 2770 s.ArtifactConfig = v 2771 return s 2772 } 2773 2774 // SetArtifactS3Location sets the ArtifactS3Location field's value. 2775 func (s *CreateCanaryInput) SetArtifactS3Location(v string) *CreateCanaryInput { 2776 s.ArtifactS3Location = &v 2777 return s 2778 } 2779 2780 // SetCode sets the Code field's value. 2781 func (s *CreateCanaryInput) SetCode(v *CanaryCodeInput) *CreateCanaryInput { 2782 s.Code = v 2783 return s 2784 } 2785 2786 // SetExecutionRoleArn sets the ExecutionRoleArn field's value. 2787 func (s *CreateCanaryInput) SetExecutionRoleArn(v string) *CreateCanaryInput { 2788 s.ExecutionRoleArn = &v 2789 return s 2790 } 2791 2792 // SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. 2793 func (s *CreateCanaryInput) SetFailureRetentionPeriodInDays(v int64) *CreateCanaryInput { 2794 s.FailureRetentionPeriodInDays = &v 2795 return s 2796 } 2797 2798 // SetName sets the Name field's value. 2799 func (s *CreateCanaryInput) SetName(v string) *CreateCanaryInput { 2800 s.Name = &v 2801 return s 2802 } 2803 2804 // SetRunConfig sets the RunConfig field's value. 2805 func (s *CreateCanaryInput) SetRunConfig(v *CanaryRunConfigInput) *CreateCanaryInput { 2806 s.RunConfig = v 2807 return s 2808 } 2809 2810 // SetRuntimeVersion sets the RuntimeVersion field's value. 2811 func (s *CreateCanaryInput) SetRuntimeVersion(v string) *CreateCanaryInput { 2812 s.RuntimeVersion = &v 2813 return s 2814 } 2815 2816 // SetSchedule sets the Schedule field's value. 2817 func (s *CreateCanaryInput) SetSchedule(v *CanaryScheduleInput) *CreateCanaryInput { 2818 s.Schedule = v 2819 return s 2820 } 2821 2822 // SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. 2823 func (s *CreateCanaryInput) SetSuccessRetentionPeriodInDays(v int64) *CreateCanaryInput { 2824 s.SuccessRetentionPeriodInDays = &v 2825 return s 2826 } 2827 2828 // SetTags sets the Tags field's value. 2829 func (s *CreateCanaryInput) SetTags(v map[string]*string) *CreateCanaryInput { 2830 s.Tags = v 2831 return s 2832 } 2833 2834 // SetVpcConfig sets the VpcConfig field's value. 2835 func (s *CreateCanaryInput) SetVpcConfig(v *VpcConfigInput) *CreateCanaryInput { 2836 s.VpcConfig = v 2837 return s 2838 } 2839 2840 type CreateCanaryOutput struct { 2841 _ struct{} `type:"structure"` 2842 2843 // The full details about the canary you have created. 2844 Canary *Canary `type:"structure"` 2845 } 2846 2847 // String returns the string representation. 2848 // 2849 // API parameter values that are decorated as "sensitive" in the API will not 2850 // be included in the string output. The member name will be present, but the 2851 // value will be replaced with "sensitive". 2852 func (s CreateCanaryOutput) String() string { 2853 return awsutil.Prettify(s) 2854 } 2855 2856 // GoString returns the string representation. 2857 // 2858 // API parameter values that are decorated as "sensitive" in the API will not 2859 // be included in the string output. The member name will be present, but the 2860 // value will be replaced with "sensitive". 2861 func (s CreateCanaryOutput) GoString() string { 2862 return s.String() 2863 } 2864 2865 // SetCanary sets the Canary field's value. 2866 func (s *CreateCanaryOutput) SetCanary(v *Canary) *CreateCanaryOutput { 2867 s.Canary = v 2868 return s 2869 } 2870 2871 type DeleteCanaryInput struct { 2872 _ struct{} `type:"structure" nopayload:"true"` 2873 2874 // The name of the canary that you want to delete. To find the names of your 2875 // canaries, use DescribeCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). 2876 // 2877 // Name is a required field 2878 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 2879 } 2880 2881 // String returns the string representation. 2882 // 2883 // API parameter values that are decorated as "sensitive" in the API will not 2884 // be included in the string output. The member name will be present, but the 2885 // value will be replaced with "sensitive". 2886 func (s DeleteCanaryInput) String() string { 2887 return awsutil.Prettify(s) 2888 } 2889 2890 // GoString returns the string representation. 2891 // 2892 // API parameter values that are decorated as "sensitive" in the API will not 2893 // be included in the string output. The member name will be present, but the 2894 // value will be replaced with "sensitive". 2895 func (s DeleteCanaryInput) GoString() string { 2896 return s.String() 2897 } 2898 2899 // Validate inspects the fields of the type to determine if they are valid. 2900 func (s *DeleteCanaryInput) Validate() error { 2901 invalidParams := request.ErrInvalidParams{Context: "DeleteCanaryInput"} 2902 if s.Name == nil { 2903 invalidParams.Add(request.NewErrParamRequired("Name")) 2904 } 2905 if s.Name != nil && len(*s.Name) < 1 { 2906 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2907 } 2908 2909 if invalidParams.Len() > 0 { 2910 return invalidParams 2911 } 2912 return nil 2913 } 2914 2915 // SetName sets the Name field's value. 2916 func (s *DeleteCanaryInput) SetName(v string) *DeleteCanaryInput { 2917 s.Name = &v 2918 return s 2919 } 2920 2921 type DeleteCanaryOutput struct { 2922 _ struct{} `type:"structure" nopayload:"true"` 2923 } 2924 2925 // String returns the string representation. 2926 // 2927 // API parameter values that are decorated as "sensitive" in the API will not 2928 // be included in the string output. The member name will be present, but the 2929 // value will be replaced with "sensitive". 2930 func (s DeleteCanaryOutput) String() string { 2931 return awsutil.Prettify(s) 2932 } 2933 2934 // GoString returns the string representation. 2935 // 2936 // API parameter values that are decorated as "sensitive" in the API will not 2937 // be included in the string output. The member name will be present, but the 2938 // value will be replaced with "sensitive". 2939 func (s DeleteCanaryOutput) GoString() string { 2940 return s.String() 2941 } 2942 2943 type DescribeCanariesInput struct { 2944 _ struct{} `type:"structure"` 2945 2946 // Specify this parameter to limit how many canaries are returned each time 2947 // you use the DescribeCanaries operation. If you omit this parameter, the default 2948 // of 100 is used. 2949 MaxResults *int64 `min:"1" type:"integer"` 2950 2951 // A token that indicates that there is more data available. You can use this 2952 // token in a subsequent operation to retrieve the next set of results. 2953 NextToken *string `min:"4" type:"string"` 2954 } 2955 2956 // String returns the string representation. 2957 // 2958 // API parameter values that are decorated as "sensitive" in the API will not 2959 // be included in the string output. The member name will be present, but the 2960 // value will be replaced with "sensitive". 2961 func (s DescribeCanariesInput) String() string { 2962 return awsutil.Prettify(s) 2963 } 2964 2965 // GoString returns the string representation. 2966 // 2967 // API parameter values that are decorated as "sensitive" in the API will not 2968 // be included in the string output. The member name will be present, but the 2969 // value will be replaced with "sensitive". 2970 func (s DescribeCanariesInput) GoString() string { 2971 return s.String() 2972 } 2973 2974 // Validate inspects the fields of the type to determine if they are valid. 2975 func (s *DescribeCanariesInput) Validate() error { 2976 invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesInput"} 2977 if s.MaxResults != nil && *s.MaxResults < 1 { 2978 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2979 } 2980 if s.NextToken != nil && len(*s.NextToken) < 4 { 2981 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 2982 } 2983 2984 if invalidParams.Len() > 0 { 2985 return invalidParams 2986 } 2987 return nil 2988 } 2989 2990 // SetMaxResults sets the MaxResults field's value. 2991 func (s *DescribeCanariesInput) SetMaxResults(v int64) *DescribeCanariesInput { 2992 s.MaxResults = &v 2993 return s 2994 } 2995 2996 // SetNextToken sets the NextToken field's value. 2997 func (s *DescribeCanariesInput) SetNextToken(v string) *DescribeCanariesInput { 2998 s.NextToken = &v 2999 return s 3000 } 3001 3002 type DescribeCanariesLastRunInput struct { 3003 _ struct{} `type:"structure"` 3004 3005 // Specify this parameter to limit how many runs are returned each time you 3006 // use the DescribeLastRun operation. If you omit this parameter, the default 3007 // of 100 is used. 3008 MaxResults *int64 `min:"1" type:"integer"` 3009 3010 // A token that indicates that there is more data available. You can use this 3011 // token in a subsequent DescribeCanaries operation to retrieve the next set 3012 // of results. 3013 NextToken *string `min:"4" type:"string"` 3014 } 3015 3016 // String returns the string representation. 3017 // 3018 // API parameter values that are decorated as "sensitive" in the API will not 3019 // be included in the string output. The member name will be present, but the 3020 // value will be replaced with "sensitive". 3021 func (s DescribeCanariesLastRunInput) String() string { 3022 return awsutil.Prettify(s) 3023 } 3024 3025 // GoString returns the string representation. 3026 // 3027 // API parameter values that are decorated as "sensitive" in the API will not 3028 // be included in the string output. The member name will be present, but the 3029 // value will be replaced with "sensitive". 3030 func (s DescribeCanariesLastRunInput) GoString() string { 3031 return s.String() 3032 } 3033 3034 // Validate inspects the fields of the type to determine if they are valid. 3035 func (s *DescribeCanariesLastRunInput) Validate() error { 3036 invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesLastRunInput"} 3037 if s.MaxResults != nil && *s.MaxResults < 1 { 3038 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3039 } 3040 if s.NextToken != nil && len(*s.NextToken) < 4 { 3041 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 3042 } 3043 3044 if invalidParams.Len() > 0 { 3045 return invalidParams 3046 } 3047 return nil 3048 } 3049 3050 // SetMaxResults sets the MaxResults field's value. 3051 func (s *DescribeCanariesLastRunInput) SetMaxResults(v int64) *DescribeCanariesLastRunInput { 3052 s.MaxResults = &v 3053 return s 3054 } 3055 3056 // SetNextToken sets the NextToken field's value. 3057 func (s *DescribeCanariesLastRunInput) SetNextToken(v string) *DescribeCanariesLastRunInput { 3058 s.NextToken = &v 3059 return s 3060 } 3061 3062 type DescribeCanariesLastRunOutput struct { 3063 _ struct{} `type:"structure"` 3064 3065 // An array that contains the information from the most recent run of each canary. 3066 CanariesLastRun []*CanaryLastRun `type:"list"` 3067 3068 // A token that indicates that there is more data available. You can use this 3069 // token in a subsequent DescribeCanariesLastRun operation to retrieve the next 3070 // set of results. 3071 NextToken *string `min:"4" type:"string"` 3072 } 3073 3074 // String returns the string representation. 3075 // 3076 // API parameter values that are decorated as "sensitive" in the API will not 3077 // be included in the string output. The member name will be present, but the 3078 // value will be replaced with "sensitive". 3079 func (s DescribeCanariesLastRunOutput) String() string { 3080 return awsutil.Prettify(s) 3081 } 3082 3083 // GoString returns the string representation. 3084 // 3085 // API parameter values that are decorated as "sensitive" in the API will not 3086 // be included in the string output. The member name will be present, but the 3087 // value will be replaced with "sensitive". 3088 func (s DescribeCanariesLastRunOutput) GoString() string { 3089 return s.String() 3090 } 3091 3092 // SetCanariesLastRun sets the CanariesLastRun field's value. 3093 func (s *DescribeCanariesLastRunOutput) SetCanariesLastRun(v []*CanaryLastRun) *DescribeCanariesLastRunOutput { 3094 s.CanariesLastRun = v 3095 return s 3096 } 3097 3098 // SetNextToken sets the NextToken field's value. 3099 func (s *DescribeCanariesLastRunOutput) SetNextToken(v string) *DescribeCanariesLastRunOutput { 3100 s.NextToken = &v 3101 return s 3102 } 3103 3104 type DescribeCanariesOutput struct { 3105 _ struct{} `type:"structure"` 3106 3107 // Returns an array. Each item in the array contains the full information about 3108 // one canary. 3109 Canaries []*Canary `type:"list"` 3110 3111 // A token that indicates that there is more data available. You can use this 3112 // token in a subsequent DescribeCanaries operation to retrieve the next set 3113 // of results. 3114 NextToken *string `min:"4" type:"string"` 3115 } 3116 3117 // String returns the string representation. 3118 // 3119 // API parameter values that are decorated as "sensitive" in the API will not 3120 // be included in the string output. The member name will be present, but the 3121 // value will be replaced with "sensitive". 3122 func (s DescribeCanariesOutput) String() string { 3123 return awsutil.Prettify(s) 3124 } 3125 3126 // GoString returns the string representation. 3127 // 3128 // API parameter values that are decorated as "sensitive" in the API will not 3129 // be included in the string output. The member name will be present, but the 3130 // value will be replaced with "sensitive". 3131 func (s DescribeCanariesOutput) GoString() string { 3132 return s.String() 3133 } 3134 3135 // SetCanaries sets the Canaries field's value. 3136 func (s *DescribeCanariesOutput) SetCanaries(v []*Canary) *DescribeCanariesOutput { 3137 s.Canaries = v 3138 return s 3139 } 3140 3141 // SetNextToken sets the NextToken field's value. 3142 func (s *DescribeCanariesOutput) SetNextToken(v string) *DescribeCanariesOutput { 3143 s.NextToken = &v 3144 return s 3145 } 3146 3147 type DescribeRuntimeVersionsInput struct { 3148 _ struct{} `type:"structure"` 3149 3150 // Specify this parameter to limit how many runs are returned each time you 3151 // use the DescribeRuntimeVersions operation. If you omit this parameter, the 3152 // default of 100 is used. 3153 MaxResults *int64 `min:"1" type:"integer"` 3154 3155 // A token that indicates that there is more data available. You can use this 3156 // token in a subsequent DescribeRuntimeVersions operation to retrieve the next 3157 // set of results. 3158 NextToken *string `min:"4" type:"string"` 3159 } 3160 3161 // String returns the string representation. 3162 // 3163 // API parameter values that are decorated as "sensitive" in the API will not 3164 // be included in the string output. The member name will be present, but the 3165 // value will be replaced with "sensitive". 3166 func (s DescribeRuntimeVersionsInput) String() string { 3167 return awsutil.Prettify(s) 3168 } 3169 3170 // GoString returns the string representation. 3171 // 3172 // API parameter values that are decorated as "sensitive" in the API will not 3173 // be included in the string output. The member name will be present, but the 3174 // value will be replaced with "sensitive". 3175 func (s DescribeRuntimeVersionsInput) GoString() string { 3176 return s.String() 3177 } 3178 3179 // Validate inspects the fields of the type to determine if they are valid. 3180 func (s *DescribeRuntimeVersionsInput) Validate() error { 3181 invalidParams := request.ErrInvalidParams{Context: "DescribeRuntimeVersionsInput"} 3182 if s.MaxResults != nil && *s.MaxResults < 1 { 3183 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3184 } 3185 if s.NextToken != nil && len(*s.NextToken) < 4 { 3186 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 3187 } 3188 3189 if invalidParams.Len() > 0 { 3190 return invalidParams 3191 } 3192 return nil 3193 } 3194 3195 // SetMaxResults sets the MaxResults field's value. 3196 func (s *DescribeRuntimeVersionsInput) SetMaxResults(v int64) *DescribeRuntimeVersionsInput { 3197 s.MaxResults = &v 3198 return s 3199 } 3200 3201 // SetNextToken sets the NextToken field's value. 3202 func (s *DescribeRuntimeVersionsInput) SetNextToken(v string) *DescribeRuntimeVersionsInput { 3203 s.NextToken = &v 3204 return s 3205 } 3206 3207 type DescribeRuntimeVersionsOutput struct { 3208 _ struct{} `type:"structure"` 3209 3210 // A token that indicates that there is more data available. You can use this 3211 // token in a subsequent DescribeRuntimeVersions operation to retrieve the next 3212 // set of results. 3213 NextToken *string `min:"4" type:"string"` 3214 3215 // An array of objects that display the details about each Synthetics canary 3216 // runtime version. 3217 RuntimeVersions []*RuntimeVersion `type:"list"` 3218 } 3219 3220 // String returns the string representation. 3221 // 3222 // API parameter values that are decorated as "sensitive" in the API will not 3223 // be included in the string output. The member name will be present, but the 3224 // value will be replaced with "sensitive". 3225 func (s DescribeRuntimeVersionsOutput) String() string { 3226 return awsutil.Prettify(s) 3227 } 3228 3229 // GoString returns the string representation. 3230 // 3231 // API parameter values that are decorated as "sensitive" in the API will not 3232 // be included in the string output. The member name will be present, but the 3233 // value will be replaced with "sensitive". 3234 func (s DescribeRuntimeVersionsOutput) GoString() string { 3235 return s.String() 3236 } 3237 3238 // SetNextToken sets the NextToken field's value. 3239 func (s *DescribeRuntimeVersionsOutput) SetNextToken(v string) *DescribeRuntimeVersionsOutput { 3240 s.NextToken = &v 3241 return s 3242 } 3243 3244 // SetRuntimeVersions sets the RuntimeVersions field's value. 3245 func (s *DescribeRuntimeVersionsOutput) SetRuntimeVersions(v []*RuntimeVersion) *DescribeRuntimeVersionsOutput { 3246 s.RuntimeVersions = v 3247 return s 3248 } 3249 3250 type GetCanaryInput struct { 3251 _ struct{} `type:"structure" nopayload:"true"` 3252 3253 // The name of the canary that you want details for. 3254 // 3255 // Name is a required field 3256 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 3257 } 3258 3259 // String returns the string representation. 3260 // 3261 // API parameter values that are decorated as "sensitive" in the API will not 3262 // be included in the string output. The member name will be present, but the 3263 // value will be replaced with "sensitive". 3264 func (s GetCanaryInput) String() string { 3265 return awsutil.Prettify(s) 3266 } 3267 3268 // GoString returns the string representation. 3269 // 3270 // API parameter values that are decorated as "sensitive" in the API will not 3271 // be included in the string output. The member name will be present, but the 3272 // value will be replaced with "sensitive". 3273 func (s GetCanaryInput) GoString() string { 3274 return s.String() 3275 } 3276 3277 // Validate inspects the fields of the type to determine if they are valid. 3278 func (s *GetCanaryInput) Validate() error { 3279 invalidParams := request.ErrInvalidParams{Context: "GetCanaryInput"} 3280 if s.Name == nil { 3281 invalidParams.Add(request.NewErrParamRequired("Name")) 3282 } 3283 if s.Name != nil && len(*s.Name) < 1 { 3284 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3285 } 3286 3287 if invalidParams.Len() > 0 { 3288 return invalidParams 3289 } 3290 return nil 3291 } 3292 3293 // SetName sets the Name field's value. 3294 func (s *GetCanaryInput) SetName(v string) *GetCanaryInput { 3295 s.Name = &v 3296 return s 3297 } 3298 3299 type GetCanaryOutput struct { 3300 _ struct{} `type:"structure"` 3301 3302 // A strucure that contains the full information about the canary. 3303 Canary *Canary `type:"structure"` 3304 } 3305 3306 // String returns the string representation. 3307 // 3308 // API parameter values that are decorated as "sensitive" in the API will not 3309 // be included in the string output. The member name will be present, but the 3310 // value will be replaced with "sensitive". 3311 func (s GetCanaryOutput) String() string { 3312 return awsutil.Prettify(s) 3313 } 3314 3315 // GoString returns the string representation. 3316 // 3317 // API parameter values that are decorated as "sensitive" in the API will not 3318 // be included in the string output. The member name will be present, but the 3319 // value will be replaced with "sensitive". 3320 func (s GetCanaryOutput) GoString() string { 3321 return s.String() 3322 } 3323 3324 // SetCanary sets the Canary field's value. 3325 func (s *GetCanaryOutput) SetCanary(v *Canary) *GetCanaryOutput { 3326 s.Canary = v 3327 return s 3328 } 3329 3330 type GetCanaryRunsInput struct { 3331 _ struct{} `type:"structure"` 3332 3333 // Specify this parameter to limit how many runs are returned each time you 3334 // use the GetCanaryRuns operation. If you omit this parameter, the default 3335 // of 100 is used. 3336 MaxResults *int64 `min:"1" type:"integer"` 3337 3338 // The name of the canary that you want to see runs for. 3339 // 3340 // Name is a required field 3341 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 3342 3343 // A token that indicates that there is more data available. You can use this 3344 // token in a subsequent GetCanaryRuns operation to retrieve the next set of 3345 // results. 3346 NextToken *string `min:"4" type:"string"` 3347 } 3348 3349 // String returns the string representation. 3350 // 3351 // API parameter values that are decorated as "sensitive" in the API will not 3352 // be included in the string output. The member name will be present, but the 3353 // value will be replaced with "sensitive". 3354 func (s GetCanaryRunsInput) String() string { 3355 return awsutil.Prettify(s) 3356 } 3357 3358 // GoString returns the string representation. 3359 // 3360 // API parameter values that are decorated as "sensitive" in the API will not 3361 // be included in the string output. The member name will be present, but the 3362 // value will be replaced with "sensitive". 3363 func (s GetCanaryRunsInput) GoString() string { 3364 return s.String() 3365 } 3366 3367 // Validate inspects the fields of the type to determine if they are valid. 3368 func (s *GetCanaryRunsInput) Validate() error { 3369 invalidParams := request.ErrInvalidParams{Context: "GetCanaryRunsInput"} 3370 if s.MaxResults != nil && *s.MaxResults < 1 { 3371 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3372 } 3373 if s.Name == nil { 3374 invalidParams.Add(request.NewErrParamRequired("Name")) 3375 } 3376 if s.Name != nil && len(*s.Name) < 1 { 3377 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3378 } 3379 if s.NextToken != nil && len(*s.NextToken) < 4 { 3380 invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) 3381 } 3382 3383 if invalidParams.Len() > 0 { 3384 return invalidParams 3385 } 3386 return nil 3387 } 3388 3389 // SetMaxResults sets the MaxResults field's value. 3390 func (s *GetCanaryRunsInput) SetMaxResults(v int64) *GetCanaryRunsInput { 3391 s.MaxResults = &v 3392 return s 3393 } 3394 3395 // SetName sets the Name field's value. 3396 func (s *GetCanaryRunsInput) SetName(v string) *GetCanaryRunsInput { 3397 s.Name = &v 3398 return s 3399 } 3400 3401 // SetNextToken sets the NextToken field's value. 3402 func (s *GetCanaryRunsInput) SetNextToken(v string) *GetCanaryRunsInput { 3403 s.NextToken = &v 3404 return s 3405 } 3406 3407 type GetCanaryRunsOutput struct { 3408 _ struct{} `type:"structure"` 3409 3410 // An array of structures. Each structure contains the details of one of the 3411 // retrieved canary runs. 3412 CanaryRuns []*CanaryRun `type:"list"` 3413 3414 // A token that indicates that there is more data available. You can use this 3415 // token in a subsequent GetCanaryRuns operation to retrieve the next set of 3416 // results. 3417 NextToken *string `min:"4" type:"string"` 3418 } 3419 3420 // String returns the string representation. 3421 // 3422 // API parameter values that are decorated as "sensitive" in the API will not 3423 // be included in the string output. The member name will be present, but the 3424 // value will be replaced with "sensitive". 3425 func (s GetCanaryRunsOutput) String() string { 3426 return awsutil.Prettify(s) 3427 } 3428 3429 // GoString returns the string representation. 3430 // 3431 // API parameter values that are decorated as "sensitive" in the API will not 3432 // be included in the string output. The member name will be present, but the 3433 // value will be replaced with "sensitive". 3434 func (s GetCanaryRunsOutput) GoString() string { 3435 return s.String() 3436 } 3437 3438 // SetCanaryRuns sets the CanaryRuns field's value. 3439 func (s *GetCanaryRunsOutput) SetCanaryRuns(v []*CanaryRun) *GetCanaryRunsOutput { 3440 s.CanaryRuns = v 3441 return s 3442 } 3443 3444 // SetNextToken sets the NextToken field's value. 3445 func (s *GetCanaryRunsOutput) SetNextToken(v string) *GetCanaryRunsOutput { 3446 s.NextToken = &v 3447 return s 3448 } 3449 3450 // An unknown internal error occurred. 3451 type InternalServerException struct { 3452 _ struct{} `type:"structure"` 3453 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3454 3455 Message_ *string `locationName:"Message" type:"string"` 3456 } 3457 3458 // String returns the string representation. 3459 // 3460 // API parameter values that are decorated as "sensitive" in the API will not 3461 // be included in the string output. The member name will be present, but the 3462 // value will be replaced with "sensitive". 3463 func (s InternalServerException) String() string { 3464 return awsutil.Prettify(s) 3465 } 3466 3467 // GoString returns the string representation. 3468 // 3469 // API parameter values that are decorated as "sensitive" in the API will not 3470 // be included in the string output. The member name will be present, but the 3471 // value will be replaced with "sensitive". 3472 func (s InternalServerException) GoString() string { 3473 return s.String() 3474 } 3475 3476 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 3477 return &InternalServerException{ 3478 RespMetadata: v, 3479 } 3480 } 3481 3482 // Code returns the exception type name. 3483 func (s *InternalServerException) Code() string { 3484 return "InternalServerException" 3485 } 3486 3487 // Message returns the exception's message. 3488 func (s *InternalServerException) Message() string { 3489 if s.Message_ != nil { 3490 return *s.Message_ 3491 } 3492 return "" 3493 } 3494 3495 // OrigErr always returns nil, satisfies awserr.Error interface. 3496 func (s *InternalServerException) OrigErr() error { 3497 return nil 3498 } 3499 3500 func (s *InternalServerException) Error() string { 3501 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3502 } 3503 3504 // Status code returns the HTTP status code for the request's response error. 3505 func (s *InternalServerException) StatusCode() int { 3506 return s.RespMetadata.StatusCode 3507 } 3508 3509 // RequestID returns the service's response RequestID for request. 3510 func (s *InternalServerException) RequestID() string { 3511 return s.RespMetadata.RequestID 3512 } 3513 3514 type ListTagsForResourceInput struct { 3515 _ struct{} `type:"structure" nopayload:"true"` 3516 3517 // The ARN of the canary that you want to view tags for. 3518 // 3519 // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . 3520 // 3521 // ResourceArn is a required field 3522 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 3523 } 3524 3525 // String returns the string representation. 3526 // 3527 // API parameter values that are decorated as "sensitive" in the API will not 3528 // be included in the string output. The member name will be present, but the 3529 // value will be replaced with "sensitive". 3530 func (s ListTagsForResourceInput) String() string { 3531 return awsutil.Prettify(s) 3532 } 3533 3534 // GoString returns the string representation. 3535 // 3536 // API parameter values that are decorated as "sensitive" in the API will not 3537 // be included in the string output. The member name will be present, but the 3538 // value will be replaced with "sensitive". 3539 func (s ListTagsForResourceInput) GoString() string { 3540 return s.String() 3541 } 3542 3543 // Validate inspects the fields of the type to determine if they are valid. 3544 func (s *ListTagsForResourceInput) Validate() error { 3545 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3546 if s.ResourceArn == nil { 3547 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3548 } 3549 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 3550 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 3551 } 3552 3553 if invalidParams.Len() > 0 { 3554 return invalidParams 3555 } 3556 return nil 3557 } 3558 3559 // SetResourceArn sets the ResourceArn field's value. 3560 func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 3561 s.ResourceArn = &v 3562 return s 3563 } 3564 3565 type ListTagsForResourceOutput struct { 3566 _ struct{} `type:"structure"` 3567 3568 // The list of tag keys and values associated with the canary that you specified. 3569 Tags map[string]*string `min:"1" type:"map"` 3570 } 3571 3572 // String returns the string representation. 3573 // 3574 // API parameter values that are decorated as "sensitive" in the API will not 3575 // be included in the string output. The member name will be present, but the 3576 // value will be replaced with "sensitive". 3577 func (s ListTagsForResourceOutput) String() string { 3578 return awsutil.Prettify(s) 3579 } 3580 3581 // GoString returns the string representation. 3582 // 3583 // API parameter values that are decorated as "sensitive" in the API will not 3584 // be included in the string output. The member name will be present, but the 3585 // value will be replaced with "sensitive". 3586 func (s ListTagsForResourceOutput) GoString() string { 3587 return s.String() 3588 } 3589 3590 // SetTags sets the Tags field's value. 3591 func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 3592 s.Tags = v 3593 return s 3594 } 3595 3596 // One of the specified resources was not found. 3597 type ResourceNotFoundException struct { 3598 _ struct{} `type:"structure"` 3599 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3600 3601 Message_ *string `locationName:"Message" type:"string"` 3602 } 3603 3604 // String returns the string representation. 3605 // 3606 // API parameter values that are decorated as "sensitive" in the API will not 3607 // be included in the string output. The member name will be present, but the 3608 // value will be replaced with "sensitive". 3609 func (s ResourceNotFoundException) String() string { 3610 return awsutil.Prettify(s) 3611 } 3612 3613 // GoString returns the string representation. 3614 // 3615 // API parameter values that are decorated as "sensitive" in the API will not 3616 // be included in the string output. The member name will be present, but the 3617 // value will be replaced with "sensitive". 3618 func (s ResourceNotFoundException) GoString() string { 3619 return s.String() 3620 } 3621 3622 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 3623 return &ResourceNotFoundException{ 3624 RespMetadata: v, 3625 } 3626 } 3627 3628 // Code returns the exception type name. 3629 func (s *ResourceNotFoundException) Code() string { 3630 return "ResourceNotFoundException" 3631 } 3632 3633 // Message returns the exception's message. 3634 func (s *ResourceNotFoundException) Message() string { 3635 if s.Message_ != nil { 3636 return *s.Message_ 3637 } 3638 return "" 3639 } 3640 3641 // OrigErr always returns nil, satisfies awserr.Error interface. 3642 func (s *ResourceNotFoundException) OrigErr() error { 3643 return nil 3644 } 3645 3646 func (s *ResourceNotFoundException) Error() string { 3647 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3648 } 3649 3650 // Status code returns the HTTP status code for the request's response error. 3651 func (s *ResourceNotFoundException) StatusCode() int { 3652 return s.RespMetadata.StatusCode 3653 } 3654 3655 // RequestID returns the service's response RequestID for request. 3656 func (s *ResourceNotFoundException) RequestID() string { 3657 return s.RespMetadata.RequestID 3658 } 3659 3660 // This structure contains information about one canary runtime version. For 3661 // more information about runtime versions, see Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). 3662 type RuntimeVersion struct { 3663 _ struct{} `type:"structure"` 3664 3665 // If this runtime version is deprecated, this value is the date of deprecation. 3666 DeprecationDate *time.Time `type:"timestamp"` 3667 3668 // A description of the runtime version, created by Amazon. 3669 Description *string `min:"1" type:"string"` 3670 3671 // The date that the runtime version was released. 3672 ReleaseDate *time.Time `type:"timestamp"` 3673 3674 // The name of the runtime version. For a list of valid runtime versions, see 3675 // Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). 3676 VersionName *string `min:"1" type:"string"` 3677 } 3678 3679 // String returns the string representation. 3680 // 3681 // API parameter values that are decorated as "sensitive" in the API will not 3682 // be included in the string output. The member name will be present, but the 3683 // value will be replaced with "sensitive". 3684 func (s RuntimeVersion) String() string { 3685 return awsutil.Prettify(s) 3686 } 3687 3688 // GoString returns the string representation. 3689 // 3690 // API parameter values that are decorated as "sensitive" in the API will not 3691 // be included in the string output. The member name will be present, but the 3692 // value will be replaced with "sensitive". 3693 func (s RuntimeVersion) GoString() string { 3694 return s.String() 3695 } 3696 3697 // SetDeprecationDate sets the DeprecationDate field's value. 3698 func (s *RuntimeVersion) SetDeprecationDate(v time.Time) *RuntimeVersion { 3699 s.DeprecationDate = &v 3700 return s 3701 } 3702 3703 // SetDescription sets the Description field's value. 3704 func (s *RuntimeVersion) SetDescription(v string) *RuntimeVersion { 3705 s.Description = &v 3706 return s 3707 } 3708 3709 // SetReleaseDate sets the ReleaseDate field's value. 3710 func (s *RuntimeVersion) SetReleaseDate(v time.Time) *RuntimeVersion { 3711 s.ReleaseDate = &v 3712 return s 3713 } 3714 3715 // SetVersionName sets the VersionName field's value. 3716 func (s *RuntimeVersion) SetVersionName(v string) *RuntimeVersion { 3717 s.VersionName = &v 3718 return s 3719 } 3720 3721 // A structure that contains the configuration of encryption-at-rest settings 3722 // for canary artifacts that the canary uploads to Amazon S3. 3723 // 3724 // For more information, see Encrypting canary artifacts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html) 3725 type S3EncryptionConfig struct { 3726 _ struct{} `type:"structure"` 3727 3728 // The encryption method to use for artifacts created by this canary. Specify 3729 // SSE_S3 to use server-side encryption (SSE) with an Amazon S3-managed key. 3730 // Specify SSE-KMS to use server-side encryption with a customer-managed KMS 3731 // key. 3732 // 3733 // If you omit this parameter, an Amazon Web Services-managed KMS key is used. 3734 EncryptionMode *string `type:"string" enum:"EncryptionMode"` 3735 3736 // The ARN of the customer-managed KMS key to use, if you specify SSE-KMS for 3737 // EncryptionMode 3738 KmsKeyArn *string `min:"1" type:"string"` 3739 } 3740 3741 // String returns the string representation. 3742 // 3743 // API parameter values that are decorated as "sensitive" in the API will not 3744 // be included in the string output. The member name will be present, but the 3745 // value will be replaced with "sensitive". 3746 func (s S3EncryptionConfig) String() string { 3747 return awsutil.Prettify(s) 3748 } 3749 3750 // GoString returns the string representation. 3751 // 3752 // API parameter values that are decorated as "sensitive" in the API will not 3753 // be included in the string output. The member name will be present, but the 3754 // value will be replaced with "sensitive". 3755 func (s S3EncryptionConfig) GoString() string { 3756 return s.String() 3757 } 3758 3759 // Validate inspects the fields of the type to determine if they are valid. 3760 func (s *S3EncryptionConfig) Validate() error { 3761 invalidParams := request.ErrInvalidParams{Context: "S3EncryptionConfig"} 3762 if s.KmsKeyArn != nil && len(*s.KmsKeyArn) < 1 { 3763 invalidParams.Add(request.NewErrParamMinLen("KmsKeyArn", 1)) 3764 } 3765 3766 if invalidParams.Len() > 0 { 3767 return invalidParams 3768 } 3769 return nil 3770 } 3771 3772 // SetEncryptionMode sets the EncryptionMode field's value. 3773 func (s *S3EncryptionConfig) SetEncryptionMode(v string) *S3EncryptionConfig { 3774 s.EncryptionMode = &v 3775 return s 3776 } 3777 3778 // SetKmsKeyArn sets the KmsKeyArn field's value. 3779 func (s *S3EncryptionConfig) SetKmsKeyArn(v string) *S3EncryptionConfig { 3780 s.KmsKeyArn = &v 3781 return s 3782 } 3783 3784 type StartCanaryInput struct { 3785 _ struct{} `type:"structure" nopayload:"true"` 3786 3787 // The name of the canary that you want to run. To find canary names, use DescribeCanaries 3788 // (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). 3789 // 3790 // Name is a required field 3791 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 3792 } 3793 3794 // String returns the string representation. 3795 // 3796 // API parameter values that are decorated as "sensitive" in the API will not 3797 // be included in the string output. The member name will be present, but the 3798 // value will be replaced with "sensitive". 3799 func (s StartCanaryInput) String() string { 3800 return awsutil.Prettify(s) 3801 } 3802 3803 // GoString returns the string representation. 3804 // 3805 // API parameter values that are decorated as "sensitive" in the API will not 3806 // be included in the string output. The member name will be present, but the 3807 // value will be replaced with "sensitive". 3808 func (s StartCanaryInput) GoString() string { 3809 return s.String() 3810 } 3811 3812 // Validate inspects the fields of the type to determine if they are valid. 3813 func (s *StartCanaryInput) Validate() error { 3814 invalidParams := request.ErrInvalidParams{Context: "StartCanaryInput"} 3815 if s.Name == nil { 3816 invalidParams.Add(request.NewErrParamRequired("Name")) 3817 } 3818 if s.Name != nil && len(*s.Name) < 1 { 3819 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3820 } 3821 3822 if invalidParams.Len() > 0 { 3823 return invalidParams 3824 } 3825 return nil 3826 } 3827 3828 // SetName sets the Name field's value. 3829 func (s *StartCanaryInput) SetName(v string) *StartCanaryInput { 3830 s.Name = &v 3831 return s 3832 } 3833 3834 type StartCanaryOutput struct { 3835 _ struct{} `type:"structure" nopayload:"true"` 3836 } 3837 3838 // String returns the string representation. 3839 // 3840 // API parameter values that are decorated as "sensitive" in the API will not 3841 // be included in the string output. The member name will be present, but the 3842 // value will be replaced with "sensitive". 3843 func (s StartCanaryOutput) String() string { 3844 return awsutil.Prettify(s) 3845 } 3846 3847 // GoString returns the string representation. 3848 // 3849 // API parameter values that are decorated as "sensitive" in the API will not 3850 // be included in the string output. The member name will be present, but the 3851 // value will be replaced with "sensitive". 3852 func (s StartCanaryOutput) GoString() string { 3853 return s.String() 3854 } 3855 3856 type StopCanaryInput struct { 3857 _ struct{} `type:"structure" nopayload:"true"` 3858 3859 // The name of the canary that you want to stop. To find the names of your canaries, 3860 // use DescribeCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). 3861 // 3862 // Name is a required field 3863 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 3864 } 3865 3866 // String returns the string representation. 3867 // 3868 // API parameter values that are decorated as "sensitive" in the API will not 3869 // be included in the string output. The member name will be present, but the 3870 // value will be replaced with "sensitive". 3871 func (s StopCanaryInput) String() string { 3872 return awsutil.Prettify(s) 3873 } 3874 3875 // GoString returns the string representation. 3876 // 3877 // API parameter values that are decorated as "sensitive" in the API will not 3878 // be included in the string output. The member name will be present, but the 3879 // value will be replaced with "sensitive". 3880 func (s StopCanaryInput) GoString() string { 3881 return s.String() 3882 } 3883 3884 // Validate inspects the fields of the type to determine if they are valid. 3885 func (s *StopCanaryInput) Validate() error { 3886 invalidParams := request.ErrInvalidParams{Context: "StopCanaryInput"} 3887 if s.Name == nil { 3888 invalidParams.Add(request.NewErrParamRequired("Name")) 3889 } 3890 if s.Name != nil && len(*s.Name) < 1 { 3891 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3892 } 3893 3894 if invalidParams.Len() > 0 { 3895 return invalidParams 3896 } 3897 return nil 3898 } 3899 3900 // SetName sets the Name field's value. 3901 func (s *StopCanaryInput) SetName(v string) *StopCanaryInput { 3902 s.Name = &v 3903 return s 3904 } 3905 3906 type StopCanaryOutput struct { 3907 _ struct{} `type:"structure" nopayload:"true"` 3908 } 3909 3910 // String returns the string representation. 3911 // 3912 // API parameter values that are decorated as "sensitive" in the API will not 3913 // be included in the string output. The member name will be present, but the 3914 // value will be replaced with "sensitive". 3915 func (s StopCanaryOutput) String() string { 3916 return awsutil.Prettify(s) 3917 } 3918 3919 // GoString returns the string representation. 3920 // 3921 // API parameter values that are decorated as "sensitive" in the API will not 3922 // be included in the string output. The member name will be present, but the 3923 // value will be replaced with "sensitive". 3924 func (s StopCanaryOutput) GoString() string { 3925 return s.String() 3926 } 3927 3928 type TagResourceInput struct { 3929 _ struct{} `type:"structure"` 3930 3931 // The ARN of the canary that you're adding tags to. 3932 // 3933 // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . 3934 // 3935 // ResourceArn is a required field 3936 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 3937 3938 // The list of key-value pairs to associate with the canary. 3939 // 3940 // Tags is a required field 3941 Tags map[string]*string `min:"1" type:"map" required:"true"` 3942 } 3943 3944 // String returns the string representation. 3945 // 3946 // API parameter values that are decorated as "sensitive" in the API will not 3947 // be included in the string output. The member name will be present, but the 3948 // value will be replaced with "sensitive". 3949 func (s TagResourceInput) String() string { 3950 return awsutil.Prettify(s) 3951 } 3952 3953 // GoString returns the string representation. 3954 // 3955 // API parameter values that are decorated as "sensitive" in the API will not 3956 // be included in the string output. The member name will be present, but the 3957 // value will be replaced with "sensitive". 3958 func (s TagResourceInput) GoString() string { 3959 return s.String() 3960 } 3961 3962 // Validate inspects the fields of the type to determine if they are valid. 3963 func (s *TagResourceInput) Validate() error { 3964 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 3965 if s.ResourceArn == nil { 3966 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3967 } 3968 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 3969 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 3970 } 3971 if s.Tags == nil { 3972 invalidParams.Add(request.NewErrParamRequired("Tags")) 3973 } 3974 if s.Tags != nil && len(s.Tags) < 1 { 3975 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 3976 } 3977 3978 if invalidParams.Len() > 0 { 3979 return invalidParams 3980 } 3981 return nil 3982 } 3983 3984 // SetResourceArn sets the ResourceArn field's value. 3985 func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 3986 s.ResourceArn = &v 3987 return s 3988 } 3989 3990 // SetTags sets the Tags field's value. 3991 func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 3992 s.Tags = v 3993 return s 3994 } 3995 3996 type TagResourceOutput struct { 3997 _ struct{} `type:"structure" nopayload:"true"` 3998 } 3999 4000 // String returns the string representation. 4001 // 4002 // API parameter values that are decorated as "sensitive" in the API will not 4003 // be included in the string output. The member name will be present, but the 4004 // value will be replaced with "sensitive". 4005 func (s TagResourceOutput) String() string { 4006 return awsutil.Prettify(s) 4007 } 4008 4009 // GoString returns the string representation. 4010 // 4011 // API parameter values that are decorated as "sensitive" in the API will not 4012 // be included in the string output. The member name will be present, but the 4013 // value will be replaced with "sensitive". 4014 func (s TagResourceOutput) GoString() string { 4015 return s.String() 4016 } 4017 4018 type UntagResourceInput struct { 4019 _ struct{} `type:"structure" nopayload:"true"` 4020 4021 // The ARN of the canary that you're removing tags from. 4022 // 4023 // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . 4024 // 4025 // ResourceArn is a required field 4026 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 4027 4028 // The list of tag keys to remove from the resource. 4029 // 4030 // TagKeys is a required field 4031 TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"` 4032 } 4033 4034 // String returns the string representation. 4035 // 4036 // API parameter values that are decorated as "sensitive" in the API will not 4037 // be included in the string output. The member name will be present, but the 4038 // value will be replaced with "sensitive". 4039 func (s UntagResourceInput) String() string { 4040 return awsutil.Prettify(s) 4041 } 4042 4043 // GoString returns the string representation. 4044 // 4045 // API parameter values that are decorated as "sensitive" in the API will not 4046 // be included in the string output. The member name will be present, but the 4047 // value will be replaced with "sensitive". 4048 func (s UntagResourceInput) GoString() string { 4049 return s.String() 4050 } 4051 4052 // Validate inspects the fields of the type to determine if they are valid. 4053 func (s *UntagResourceInput) Validate() error { 4054 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4055 if s.ResourceArn == nil { 4056 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4057 } 4058 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4059 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4060 } 4061 if s.TagKeys == nil { 4062 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4063 } 4064 if s.TagKeys != nil && len(s.TagKeys) < 1 { 4065 invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) 4066 } 4067 4068 if invalidParams.Len() > 0 { 4069 return invalidParams 4070 } 4071 return nil 4072 } 4073 4074 // SetResourceArn sets the ResourceArn field's value. 4075 func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 4076 s.ResourceArn = &v 4077 return s 4078 } 4079 4080 // SetTagKeys sets the TagKeys field's value. 4081 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4082 s.TagKeys = v 4083 return s 4084 } 4085 4086 type UntagResourceOutput struct { 4087 _ struct{} `type:"structure" nopayload:"true"` 4088 } 4089 4090 // String returns the string representation. 4091 // 4092 // API parameter values that are decorated as "sensitive" in the API will not 4093 // be included in the string output. The member name will be present, but the 4094 // value will be replaced with "sensitive". 4095 func (s UntagResourceOutput) String() string { 4096 return awsutil.Prettify(s) 4097 } 4098 4099 // GoString returns the string representation. 4100 // 4101 // API parameter values that are decorated as "sensitive" in the API will not 4102 // be included in the string output. The member name will be present, but the 4103 // value will be replaced with "sensitive". 4104 func (s UntagResourceOutput) GoString() string { 4105 return s.String() 4106 } 4107 4108 type UpdateCanaryInput struct { 4109 _ struct{} `type:"structure"` 4110 4111 // A structure that contains the configuration for canary artifacts, including 4112 // the encryption-at-rest settings for artifacts that the canary uploads to 4113 // Amazon S3. 4114 ArtifactConfig *ArtifactConfigInput_ `type:"structure"` 4115 4116 // The location in Amazon S3 where Synthetics stores artifacts from the test 4117 // runs of this canary. Artifacts include the log file, screenshots, and HAR 4118 // files. The name of the S3 bucket can't include a period (.). 4119 ArtifactS3Location *string `min:"1" type:"string"` 4120 4121 // A structure that includes the entry point from which the canary should start 4122 // running your script. If the script is stored in an S3 bucket, the bucket 4123 // name, key, and version are also included. 4124 Code *CanaryCodeInput `type:"structure"` 4125 4126 // The ARN of the IAM role to be used to run the canary. This role must already 4127 // exist, and must include lambda.amazonaws.com as a principal in the trust 4128 // policy. The role must also have the following permissions: 4129 // 4130 // * s3:PutObject 4131 // 4132 // * s3:GetBucketLocation 4133 // 4134 // * s3:ListAllMyBuckets 4135 // 4136 // * cloudwatch:PutMetricData 4137 // 4138 // * logs:CreateLogGroup 4139 // 4140 // * logs:CreateLogStream 4141 // 4142 // * logs:CreateLogStream 4143 ExecutionRoleArn *string `min:"1" type:"string"` 4144 4145 // The number of days to retain data about failed runs of this canary. 4146 FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` 4147 4148 // The name of the canary that you want to update. To find the names of your 4149 // canaries, use DescribeCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). 4150 // 4151 // You cannot change the name of a canary that has already been created. 4152 // 4153 // Name is a required field 4154 Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` 4155 4156 // A structure that contains the timeout value that is used for each individual 4157 // run of the canary. 4158 RunConfig *CanaryRunConfigInput `type:"structure"` 4159 4160 // Specifies the runtime version to use for the canary. For a list of valid 4161 // runtime versions and for more information about runtime versions, see Canary 4162 // Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). 4163 RuntimeVersion *string `min:"1" type:"string"` 4164 4165 // A structure that contains information about how often the canary is to run, 4166 // and when these runs are to stop. 4167 Schedule *CanaryScheduleInput `type:"structure"` 4168 4169 // The number of days to retain data about successful runs of this canary. 4170 SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` 4171 4172 // Defines the screenshots to use as the baseline for comparisons during visual 4173 // monitoring comparisons during future runs of this canary. If you omit this 4174 // parameter, no changes are made to any baseline screenshots that the canary 4175 // might be using already. 4176 // 4177 // Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 4178 // runtime or later. For more information, see Visual monitoring (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html) 4179 // and Visual monitoring blueprint (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html) 4180 VisualReference *VisualReferenceInput_ `type:"structure"` 4181 4182 // If this canary is to test an endpoint in a VPC, this structure contains information 4183 // about the subnet and security groups of the VPC endpoint. For more information, 4184 // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). 4185 VpcConfig *VpcConfigInput `type:"structure"` 4186 } 4187 4188 // String returns the string representation. 4189 // 4190 // API parameter values that are decorated as "sensitive" in the API will not 4191 // be included in the string output. The member name will be present, but the 4192 // value will be replaced with "sensitive". 4193 func (s UpdateCanaryInput) String() string { 4194 return awsutil.Prettify(s) 4195 } 4196 4197 // GoString returns the string representation. 4198 // 4199 // API parameter values that are decorated as "sensitive" in the API will not 4200 // be included in the string output. The member name will be present, but the 4201 // value will be replaced with "sensitive". 4202 func (s UpdateCanaryInput) GoString() string { 4203 return s.String() 4204 } 4205 4206 // Validate inspects the fields of the type to determine if they are valid. 4207 func (s *UpdateCanaryInput) Validate() error { 4208 invalidParams := request.ErrInvalidParams{Context: "UpdateCanaryInput"} 4209 if s.ArtifactS3Location != nil && len(*s.ArtifactS3Location) < 1 { 4210 invalidParams.Add(request.NewErrParamMinLen("ArtifactS3Location", 1)) 4211 } 4212 if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 1 { 4213 invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 1)) 4214 } 4215 if s.FailureRetentionPeriodInDays != nil && *s.FailureRetentionPeriodInDays < 1 { 4216 invalidParams.Add(request.NewErrParamMinValue("FailureRetentionPeriodInDays", 1)) 4217 } 4218 if s.Name == nil { 4219 invalidParams.Add(request.NewErrParamRequired("Name")) 4220 } 4221 if s.Name != nil && len(*s.Name) < 1 { 4222 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4223 } 4224 if s.RuntimeVersion != nil && len(*s.RuntimeVersion) < 1 { 4225 invalidParams.Add(request.NewErrParamMinLen("RuntimeVersion", 1)) 4226 } 4227 if s.SuccessRetentionPeriodInDays != nil && *s.SuccessRetentionPeriodInDays < 1 { 4228 invalidParams.Add(request.NewErrParamMinValue("SuccessRetentionPeriodInDays", 1)) 4229 } 4230 if s.ArtifactConfig != nil { 4231 if err := s.ArtifactConfig.Validate(); err != nil { 4232 invalidParams.AddNested("ArtifactConfig", err.(request.ErrInvalidParams)) 4233 } 4234 } 4235 if s.Code != nil { 4236 if err := s.Code.Validate(); err != nil { 4237 invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) 4238 } 4239 } 4240 if s.RunConfig != nil { 4241 if err := s.RunConfig.Validate(); err != nil { 4242 invalidParams.AddNested("RunConfig", err.(request.ErrInvalidParams)) 4243 } 4244 } 4245 if s.Schedule != nil { 4246 if err := s.Schedule.Validate(); err != nil { 4247 invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) 4248 } 4249 } 4250 if s.VisualReference != nil { 4251 if err := s.VisualReference.Validate(); err != nil { 4252 invalidParams.AddNested("VisualReference", err.(request.ErrInvalidParams)) 4253 } 4254 } 4255 4256 if invalidParams.Len() > 0 { 4257 return invalidParams 4258 } 4259 return nil 4260 } 4261 4262 // SetArtifactConfig sets the ArtifactConfig field's value. 4263 func (s *UpdateCanaryInput) SetArtifactConfig(v *ArtifactConfigInput_) *UpdateCanaryInput { 4264 s.ArtifactConfig = v 4265 return s 4266 } 4267 4268 // SetArtifactS3Location sets the ArtifactS3Location field's value. 4269 func (s *UpdateCanaryInput) SetArtifactS3Location(v string) *UpdateCanaryInput { 4270 s.ArtifactS3Location = &v 4271 return s 4272 } 4273 4274 // SetCode sets the Code field's value. 4275 func (s *UpdateCanaryInput) SetCode(v *CanaryCodeInput) *UpdateCanaryInput { 4276 s.Code = v 4277 return s 4278 } 4279 4280 // SetExecutionRoleArn sets the ExecutionRoleArn field's value. 4281 func (s *UpdateCanaryInput) SetExecutionRoleArn(v string) *UpdateCanaryInput { 4282 s.ExecutionRoleArn = &v 4283 return s 4284 } 4285 4286 // SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. 4287 func (s *UpdateCanaryInput) SetFailureRetentionPeriodInDays(v int64) *UpdateCanaryInput { 4288 s.FailureRetentionPeriodInDays = &v 4289 return s 4290 } 4291 4292 // SetName sets the Name field's value. 4293 func (s *UpdateCanaryInput) SetName(v string) *UpdateCanaryInput { 4294 s.Name = &v 4295 return s 4296 } 4297 4298 // SetRunConfig sets the RunConfig field's value. 4299 func (s *UpdateCanaryInput) SetRunConfig(v *CanaryRunConfigInput) *UpdateCanaryInput { 4300 s.RunConfig = v 4301 return s 4302 } 4303 4304 // SetRuntimeVersion sets the RuntimeVersion field's value. 4305 func (s *UpdateCanaryInput) SetRuntimeVersion(v string) *UpdateCanaryInput { 4306 s.RuntimeVersion = &v 4307 return s 4308 } 4309 4310 // SetSchedule sets the Schedule field's value. 4311 func (s *UpdateCanaryInput) SetSchedule(v *CanaryScheduleInput) *UpdateCanaryInput { 4312 s.Schedule = v 4313 return s 4314 } 4315 4316 // SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. 4317 func (s *UpdateCanaryInput) SetSuccessRetentionPeriodInDays(v int64) *UpdateCanaryInput { 4318 s.SuccessRetentionPeriodInDays = &v 4319 return s 4320 } 4321 4322 // SetVisualReference sets the VisualReference field's value. 4323 func (s *UpdateCanaryInput) SetVisualReference(v *VisualReferenceInput_) *UpdateCanaryInput { 4324 s.VisualReference = v 4325 return s 4326 } 4327 4328 // SetVpcConfig sets the VpcConfig field's value. 4329 func (s *UpdateCanaryInput) SetVpcConfig(v *VpcConfigInput) *UpdateCanaryInput { 4330 s.VpcConfig = v 4331 return s 4332 } 4333 4334 type UpdateCanaryOutput struct { 4335 _ struct{} `type:"structure" nopayload:"true"` 4336 } 4337 4338 // String returns the string representation. 4339 // 4340 // API parameter values that are decorated as "sensitive" in the API will not 4341 // be included in the string output. The member name will be present, but the 4342 // value will be replaced with "sensitive". 4343 func (s UpdateCanaryOutput) String() string { 4344 return awsutil.Prettify(s) 4345 } 4346 4347 // GoString returns the string representation. 4348 // 4349 // API parameter values that are decorated as "sensitive" in the API will not 4350 // be included in the string output. The member name will be present, but the 4351 // value will be replaced with "sensitive". 4352 func (s UpdateCanaryOutput) GoString() string { 4353 return s.String() 4354 } 4355 4356 // A parameter could not be validated. 4357 type ValidationException struct { 4358 _ struct{} `type:"structure"` 4359 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4360 4361 Message_ *string `locationName:"Message" type:"string"` 4362 } 4363 4364 // String returns the string representation. 4365 // 4366 // API parameter values that are decorated as "sensitive" in the API will not 4367 // be included in the string output. The member name will be present, but the 4368 // value will be replaced with "sensitive". 4369 func (s ValidationException) String() string { 4370 return awsutil.Prettify(s) 4371 } 4372 4373 // GoString returns the string representation. 4374 // 4375 // API parameter values that are decorated as "sensitive" in the API will not 4376 // be included in the string output. The member name will be present, but the 4377 // value will be replaced with "sensitive". 4378 func (s ValidationException) GoString() string { 4379 return s.String() 4380 } 4381 4382 func newErrorValidationException(v protocol.ResponseMetadata) error { 4383 return &ValidationException{ 4384 RespMetadata: v, 4385 } 4386 } 4387 4388 // Code returns the exception type name. 4389 func (s *ValidationException) Code() string { 4390 return "ValidationException" 4391 } 4392 4393 // Message returns the exception's message. 4394 func (s *ValidationException) Message() string { 4395 if s.Message_ != nil { 4396 return *s.Message_ 4397 } 4398 return "" 4399 } 4400 4401 // OrigErr always returns nil, satisfies awserr.Error interface. 4402 func (s *ValidationException) OrigErr() error { 4403 return nil 4404 } 4405 4406 func (s *ValidationException) Error() string { 4407 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4408 } 4409 4410 // Status code returns the HTTP status code for the request's response error. 4411 func (s *ValidationException) StatusCode() int { 4412 return s.RespMetadata.StatusCode 4413 } 4414 4415 // RequestID returns the service's response RequestID for request. 4416 func (s *ValidationException) RequestID() string { 4417 return s.RespMetadata.RequestID 4418 } 4419 4420 // An object that specifies what screenshots to use as a baseline for visual 4421 // monitoring by this canary, and optionally the parts of the screenshots to 4422 // ignore during the visual monitoring comparison. 4423 // 4424 // Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 4425 // runtime or later. For more information, see Visual monitoring (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html) 4426 // and Visual monitoring blueprint (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html) 4427 type VisualReferenceInput_ struct { 4428 _ struct{} `type:"structure"` 4429 4430 // Specifies which canary run to use the screenshots from as the baseline for 4431 // future visual monitoring with this canary. Valid values are nextrun to use 4432 // the screenshots from the next run after this update is made, lastrun to use 4433 // the screenshots from the most recent run before this update was made, or 4434 // the value of Id in the CanaryRun (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRun.html) 4435 // from any past run of this canary. 4436 // 4437 // BaseCanaryRunId is a required field 4438 BaseCanaryRunId *string `min:"1" type:"string" required:"true"` 4439 4440 // An array of screenshots that will be used as the baseline for visual monitoring 4441 // in future runs of this canary. If there is a screenshot that you don't want 4442 // to be used for visual monitoring, remove it from this array. 4443 BaseScreenshots []*BaseScreenshot `type:"list"` 4444 } 4445 4446 // String returns the string representation. 4447 // 4448 // API parameter values that are decorated as "sensitive" in the API will not 4449 // be included in the string output. The member name will be present, but the 4450 // value will be replaced with "sensitive". 4451 func (s VisualReferenceInput_) String() string { 4452 return awsutil.Prettify(s) 4453 } 4454 4455 // GoString returns the string representation. 4456 // 4457 // API parameter values that are decorated as "sensitive" in the API will not 4458 // be included in the string output. The member name will be present, but the 4459 // value will be replaced with "sensitive". 4460 func (s VisualReferenceInput_) GoString() string { 4461 return s.String() 4462 } 4463 4464 // Validate inspects the fields of the type to determine if they are valid. 4465 func (s *VisualReferenceInput_) Validate() error { 4466 invalidParams := request.ErrInvalidParams{Context: "VisualReferenceInput_"} 4467 if s.BaseCanaryRunId == nil { 4468 invalidParams.Add(request.NewErrParamRequired("BaseCanaryRunId")) 4469 } 4470 if s.BaseCanaryRunId != nil && len(*s.BaseCanaryRunId) < 1 { 4471 invalidParams.Add(request.NewErrParamMinLen("BaseCanaryRunId", 1)) 4472 } 4473 if s.BaseScreenshots != nil { 4474 for i, v := range s.BaseScreenshots { 4475 if v == nil { 4476 continue 4477 } 4478 if err := v.Validate(); err != nil { 4479 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BaseScreenshots", i), err.(request.ErrInvalidParams)) 4480 } 4481 } 4482 } 4483 4484 if invalidParams.Len() > 0 { 4485 return invalidParams 4486 } 4487 return nil 4488 } 4489 4490 // SetBaseCanaryRunId sets the BaseCanaryRunId field's value. 4491 func (s *VisualReferenceInput_) SetBaseCanaryRunId(v string) *VisualReferenceInput_ { 4492 s.BaseCanaryRunId = &v 4493 return s 4494 } 4495 4496 // SetBaseScreenshots sets the BaseScreenshots field's value. 4497 func (s *VisualReferenceInput_) SetBaseScreenshots(v []*BaseScreenshot) *VisualReferenceInput_ { 4498 s.BaseScreenshots = v 4499 return s 4500 } 4501 4502 // If this canary performs visual monitoring by comparing screenshots, this 4503 // structure contains the ID of the canary run that is used as the baseline 4504 // for screenshots, and the coordinates of any parts of those screenshots that 4505 // are ignored during visual monitoring comparison. 4506 // 4507 // Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 4508 // runtime or later. 4509 type VisualReferenceOutput_ struct { 4510 _ struct{} `type:"structure"` 4511 4512 // The ID of the canary run that produced the screenshots that are used as the 4513 // baseline for visual monitoring comparisons during future runs of this canary. 4514 BaseCanaryRunId *string `min:"1" type:"string"` 4515 4516 // An array of screenshots that are used as the baseline for comparisons during 4517 // visual monitoring. 4518 BaseScreenshots []*BaseScreenshot `type:"list"` 4519 } 4520 4521 // String returns the string representation. 4522 // 4523 // API parameter values that are decorated as "sensitive" in the API will not 4524 // be included in the string output. The member name will be present, but the 4525 // value will be replaced with "sensitive". 4526 func (s VisualReferenceOutput_) String() string { 4527 return awsutil.Prettify(s) 4528 } 4529 4530 // GoString returns the string representation. 4531 // 4532 // API parameter values that are decorated as "sensitive" in the API will not 4533 // be included in the string output. The member name will be present, but the 4534 // value will be replaced with "sensitive". 4535 func (s VisualReferenceOutput_) GoString() string { 4536 return s.String() 4537 } 4538 4539 // SetBaseCanaryRunId sets the BaseCanaryRunId field's value. 4540 func (s *VisualReferenceOutput_) SetBaseCanaryRunId(v string) *VisualReferenceOutput_ { 4541 s.BaseCanaryRunId = &v 4542 return s 4543 } 4544 4545 // SetBaseScreenshots sets the BaseScreenshots field's value. 4546 func (s *VisualReferenceOutput_) SetBaseScreenshots(v []*BaseScreenshot) *VisualReferenceOutput_ { 4547 s.BaseScreenshots = v 4548 return s 4549 } 4550 4551 // If this canary is to test an endpoint in a VPC, this structure contains information 4552 // about the subnets and security groups of the VPC endpoint. For more information, 4553 // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). 4554 type VpcConfigInput struct { 4555 _ struct{} `type:"structure"` 4556 4557 // The IDs of the security groups for this canary. 4558 SecurityGroupIds []*string `type:"list"` 4559 4560 // The IDs of the subnets where this canary is to run. 4561 SubnetIds []*string `type:"list"` 4562 } 4563 4564 // String returns the string representation. 4565 // 4566 // API parameter values that are decorated as "sensitive" in the API will not 4567 // be included in the string output. The member name will be present, but the 4568 // value will be replaced with "sensitive". 4569 func (s VpcConfigInput) String() string { 4570 return awsutil.Prettify(s) 4571 } 4572 4573 // GoString returns the string representation. 4574 // 4575 // API parameter values that are decorated as "sensitive" in the API will not 4576 // be included in the string output. The member name will be present, but the 4577 // value will be replaced with "sensitive". 4578 func (s VpcConfigInput) GoString() string { 4579 return s.String() 4580 } 4581 4582 // SetSecurityGroupIds sets the SecurityGroupIds field's value. 4583 func (s *VpcConfigInput) SetSecurityGroupIds(v []*string) *VpcConfigInput { 4584 s.SecurityGroupIds = v 4585 return s 4586 } 4587 4588 // SetSubnetIds sets the SubnetIds field's value. 4589 func (s *VpcConfigInput) SetSubnetIds(v []*string) *VpcConfigInput { 4590 s.SubnetIds = v 4591 return s 4592 } 4593 4594 // If this canary is to test an endpoint in a VPC, this structure contains information 4595 // about the subnets and security groups of the VPC endpoint. For more information, 4596 // see Running a Canary in a VPC (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). 4597 type VpcConfigOutput struct { 4598 _ struct{} `type:"structure"` 4599 4600 // The IDs of the security groups for this canary. 4601 SecurityGroupIds []*string `type:"list"` 4602 4603 // The IDs of the subnets where this canary is to run. 4604 SubnetIds []*string `type:"list"` 4605 4606 // The IDs of the VPC where this canary is to run. 4607 VpcId *string `type:"string"` 4608 } 4609 4610 // String returns the string representation. 4611 // 4612 // API parameter values that are decorated as "sensitive" in the API will not 4613 // be included in the string output. The member name will be present, but the 4614 // value will be replaced with "sensitive". 4615 func (s VpcConfigOutput) String() string { 4616 return awsutil.Prettify(s) 4617 } 4618 4619 // GoString returns the string representation. 4620 // 4621 // API parameter values that are decorated as "sensitive" in the API will not 4622 // be included in the string output. The member name will be present, but the 4623 // value will be replaced with "sensitive". 4624 func (s VpcConfigOutput) GoString() string { 4625 return s.String() 4626 } 4627 4628 // SetSecurityGroupIds sets the SecurityGroupIds field's value. 4629 func (s *VpcConfigOutput) SetSecurityGroupIds(v []*string) *VpcConfigOutput { 4630 s.SecurityGroupIds = v 4631 return s 4632 } 4633 4634 // SetSubnetIds sets the SubnetIds field's value. 4635 func (s *VpcConfigOutput) SetSubnetIds(v []*string) *VpcConfigOutput { 4636 s.SubnetIds = v 4637 return s 4638 } 4639 4640 // SetVpcId sets the VpcId field's value. 4641 func (s *VpcConfigOutput) SetVpcId(v string) *VpcConfigOutput { 4642 s.VpcId = &v 4643 return s 4644 } 4645 4646 const ( 4647 // CanaryRunStateRunning is a CanaryRunState enum value 4648 CanaryRunStateRunning = "RUNNING" 4649 4650 // CanaryRunStatePassed is a CanaryRunState enum value 4651 CanaryRunStatePassed = "PASSED" 4652 4653 // CanaryRunStateFailed is a CanaryRunState enum value 4654 CanaryRunStateFailed = "FAILED" 4655 ) 4656 4657 // CanaryRunState_Values returns all elements of the CanaryRunState enum 4658 func CanaryRunState_Values() []string { 4659 return []string{ 4660 CanaryRunStateRunning, 4661 CanaryRunStatePassed, 4662 CanaryRunStateFailed, 4663 } 4664 } 4665 4666 const ( 4667 // CanaryRunStateReasonCodeCanaryFailure is a CanaryRunStateReasonCode enum value 4668 CanaryRunStateReasonCodeCanaryFailure = "CANARY_FAILURE" 4669 4670 // CanaryRunStateReasonCodeExecutionFailure is a CanaryRunStateReasonCode enum value 4671 CanaryRunStateReasonCodeExecutionFailure = "EXECUTION_FAILURE" 4672 ) 4673 4674 // CanaryRunStateReasonCode_Values returns all elements of the CanaryRunStateReasonCode enum 4675 func CanaryRunStateReasonCode_Values() []string { 4676 return []string{ 4677 CanaryRunStateReasonCodeCanaryFailure, 4678 CanaryRunStateReasonCodeExecutionFailure, 4679 } 4680 } 4681 4682 const ( 4683 // CanaryStateCreating is a CanaryState enum value 4684 CanaryStateCreating = "CREATING" 4685 4686 // CanaryStateReady is a CanaryState enum value 4687 CanaryStateReady = "READY" 4688 4689 // CanaryStateStarting is a CanaryState enum value 4690 CanaryStateStarting = "STARTING" 4691 4692 // CanaryStateRunning is a CanaryState enum value 4693 CanaryStateRunning = "RUNNING" 4694 4695 // CanaryStateUpdating is a CanaryState enum value 4696 CanaryStateUpdating = "UPDATING" 4697 4698 // CanaryStateStopping is a CanaryState enum value 4699 CanaryStateStopping = "STOPPING" 4700 4701 // CanaryStateStopped is a CanaryState enum value 4702 CanaryStateStopped = "STOPPED" 4703 4704 // CanaryStateError is a CanaryState enum value 4705 CanaryStateError = "ERROR" 4706 4707 // CanaryStateDeleting is a CanaryState enum value 4708 CanaryStateDeleting = "DELETING" 4709 ) 4710 4711 // CanaryState_Values returns all elements of the CanaryState enum 4712 func CanaryState_Values() []string { 4713 return []string{ 4714 CanaryStateCreating, 4715 CanaryStateReady, 4716 CanaryStateStarting, 4717 CanaryStateRunning, 4718 CanaryStateUpdating, 4719 CanaryStateStopping, 4720 CanaryStateStopped, 4721 CanaryStateError, 4722 CanaryStateDeleting, 4723 } 4724 } 4725 4726 const ( 4727 // CanaryStateReasonCodeInvalidPermissions is a CanaryStateReasonCode enum value 4728 CanaryStateReasonCodeInvalidPermissions = "INVALID_PERMISSIONS" 4729 ) 4730 4731 // CanaryStateReasonCode_Values returns all elements of the CanaryStateReasonCode enum 4732 func CanaryStateReasonCode_Values() []string { 4733 return []string{ 4734 CanaryStateReasonCodeInvalidPermissions, 4735 } 4736 } 4737 4738 const ( 4739 // EncryptionModeSseS3 is a EncryptionMode enum value 4740 EncryptionModeSseS3 = "SSE_S3" 4741 4742 // EncryptionModeSseKms is a EncryptionMode enum value 4743 EncryptionModeSseKms = "SSE_KMS" 4744 ) 4745 4746 // EncryptionMode_Values returns all elements of the EncryptionMode enum 4747 func EncryptionMode_Values() []string { 4748 return []string{ 4749 EncryptionModeSseS3, 4750 EncryptionModeSseKms, 4751 } 4752 }