github.com/aavshr/aws-sdk-go@v1.41.3/service/iotsecuretunneling/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package iotsecuretunneling 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/jsonrpc" 14 ) 15 16 const opCloseTunnel = "CloseTunnel" 17 18 // CloseTunnelRequest generates a "aws/request.Request" representing the 19 // client's request for the CloseTunnel 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 CloseTunnel for more information on using the CloseTunnel 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 CloseTunnelRequest method. 34 // req, resp := client.CloseTunnelRequest(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/iotsecuretunneling-2018-10-05/CloseTunnel 42 func (c *IoTSecureTunneling) CloseTunnelRequest(input *CloseTunnelInput) (req *request.Request, output *CloseTunnelOutput) { 43 op := &request.Operation{ 44 Name: opCloseTunnel, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CloseTunnelInput{} 51 } 52 53 output = &CloseTunnelOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57 } 58 59 // CloseTunnel API operation for AWS IoT Secure Tunneling. 60 // 61 // Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request 62 // is received, we close the WebSocket connections between the client and proxy 63 // server so no data can be transmitted. 64 // 65 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 66 // with awserr.Error's Code and Message methods to get detailed information about 67 // the error. 68 // 69 // See the AWS API reference guide for AWS IoT Secure Tunneling's 70 // API operation CloseTunnel for usage and error information. 71 // 72 // Returned Error Types: 73 // * ResourceNotFoundException 74 // Thrown when an operation is attempted on a resource that does not exist. 75 // 76 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/CloseTunnel 77 func (c *IoTSecureTunneling) CloseTunnel(input *CloseTunnelInput) (*CloseTunnelOutput, error) { 78 req, out := c.CloseTunnelRequest(input) 79 return out, req.Send() 80 } 81 82 // CloseTunnelWithContext is the same as CloseTunnel with the addition of 83 // the ability to pass a context and additional request options. 84 // 85 // See CloseTunnel for details on how to use this API operation. 86 // 87 // The context must be non-nil and will be used for request cancellation. If 88 // the context is nil a panic will occur. In the future the SDK may create 89 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 90 // for more information on using Contexts. 91 func (c *IoTSecureTunneling) CloseTunnelWithContext(ctx aws.Context, input *CloseTunnelInput, opts ...request.Option) (*CloseTunnelOutput, error) { 92 req, out := c.CloseTunnelRequest(input) 93 req.SetContext(ctx) 94 req.ApplyOptions(opts...) 95 return out, req.Send() 96 } 97 98 const opDescribeTunnel = "DescribeTunnel" 99 100 // DescribeTunnelRequest generates a "aws/request.Request" representing the 101 // client's request for the DescribeTunnel operation. The "output" return 102 // value will be populated with the request's response once the request completes 103 // successfully. 104 // 105 // Use "Send" method on the returned Request to send the API call to the service. 106 // the "output" return value is not valid until after Send returns without error. 107 // 108 // See DescribeTunnel for more information on using the DescribeTunnel 109 // API call, and error handling. 110 // 111 // This method is useful when you want to inject custom logic or configuration 112 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 113 // 114 // 115 // // Example sending a request using the DescribeTunnelRequest method. 116 // req, resp := client.DescribeTunnelRequest(params) 117 // 118 // err := req.Send() 119 // if err == nil { // resp is now filled 120 // fmt.Println(resp) 121 // } 122 // 123 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/DescribeTunnel 124 func (c *IoTSecureTunneling) DescribeTunnelRequest(input *DescribeTunnelInput) (req *request.Request, output *DescribeTunnelOutput) { 125 op := &request.Operation{ 126 Name: opDescribeTunnel, 127 HTTPMethod: "POST", 128 HTTPPath: "/", 129 } 130 131 if input == nil { 132 input = &DescribeTunnelInput{} 133 } 134 135 output = &DescribeTunnelOutput{} 136 req = c.newRequest(op, input, output) 137 return 138 } 139 140 // DescribeTunnel API operation for AWS IoT Secure Tunneling. 141 // 142 // Gets information about a tunnel identified by the unique tunnel id. 143 // 144 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 145 // with awserr.Error's Code and Message methods to get detailed information about 146 // the error. 147 // 148 // See the AWS API reference guide for AWS IoT Secure Tunneling's 149 // API operation DescribeTunnel for usage and error information. 150 // 151 // Returned Error Types: 152 // * ResourceNotFoundException 153 // Thrown when an operation is attempted on a resource that does not exist. 154 // 155 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/DescribeTunnel 156 func (c *IoTSecureTunneling) DescribeTunnel(input *DescribeTunnelInput) (*DescribeTunnelOutput, error) { 157 req, out := c.DescribeTunnelRequest(input) 158 return out, req.Send() 159 } 160 161 // DescribeTunnelWithContext is the same as DescribeTunnel with the addition of 162 // the ability to pass a context and additional request options. 163 // 164 // See DescribeTunnel for details on how to use this API operation. 165 // 166 // The context must be non-nil and will be used for request cancellation. If 167 // the context is nil a panic will occur. In the future the SDK may create 168 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 169 // for more information on using Contexts. 170 func (c *IoTSecureTunneling) DescribeTunnelWithContext(ctx aws.Context, input *DescribeTunnelInput, opts ...request.Option) (*DescribeTunnelOutput, error) { 171 req, out := c.DescribeTunnelRequest(input) 172 req.SetContext(ctx) 173 req.ApplyOptions(opts...) 174 return out, req.Send() 175 } 176 177 const opListTagsForResource = "ListTagsForResource" 178 179 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 180 // client's request for the ListTagsForResource operation. The "output" return 181 // value will be populated with the request's response once the request completes 182 // successfully. 183 // 184 // Use "Send" method on the returned Request to send the API call to the service. 185 // the "output" return value is not valid until after Send returns without error. 186 // 187 // See ListTagsForResource for more information on using the ListTagsForResource 188 // API call, and error handling. 189 // 190 // This method is useful when you want to inject custom logic or configuration 191 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 192 // 193 // 194 // // Example sending a request using the ListTagsForResourceRequest method. 195 // req, resp := client.ListTagsForResourceRequest(params) 196 // 197 // err := req.Send() 198 // if err == nil { // resp is now filled 199 // fmt.Println(resp) 200 // } 201 // 202 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/ListTagsForResource 203 func (c *IoTSecureTunneling) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 204 op := &request.Operation{ 205 Name: opListTagsForResource, 206 HTTPMethod: "POST", 207 HTTPPath: "/", 208 } 209 210 if input == nil { 211 input = &ListTagsForResourceInput{} 212 } 213 214 output = &ListTagsForResourceOutput{} 215 req = c.newRequest(op, input, output) 216 return 217 } 218 219 // ListTagsForResource API operation for AWS IoT Secure Tunneling. 220 // 221 // Lists the tags for the specified resource. 222 // 223 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 224 // with awserr.Error's Code and Message methods to get detailed information about 225 // the error. 226 // 227 // See the AWS API reference guide for AWS IoT Secure Tunneling's 228 // API operation ListTagsForResource for usage and error information. 229 // 230 // Returned Error Types: 231 // * ResourceNotFoundException 232 // Thrown when an operation is attempted on a resource that does not exist. 233 // 234 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/ListTagsForResource 235 func (c *IoTSecureTunneling) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 236 req, out := c.ListTagsForResourceRequest(input) 237 return out, req.Send() 238 } 239 240 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 241 // the ability to pass a context and additional request options. 242 // 243 // See ListTagsForResource for details on how to use this API operation. 244 // 245 // The context must be non-nil and will be used for request cancellation. If 246 // the context is nil a panic will occur. In the future the SDK may create 247 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 248 // for more information on using Contexts. 249 func (c *IoTSecureTunneling) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 250 req, out := c.ListTagsForResourceRequest(input) 251 req.SetContext(ctx) 252 req.ApplyOptions(opts...) 253 return out, req.Send() 254 } 255 256 const opListTunnels = "ListTunnels" 257 258 // ListTunnelsRequest generates a "aws/request.Request" representing the 259 // client's request for the ListTunnels operation. The "output" return 260 // value will be populated with the request's response once the request completes 261 // successfully. 262 // 263 // Use "Send" method on the returned Request to send the API call to the service. 264 // the "output" return value is not valid until after Send returns without error. 265 // 266 // See ListTunnels for more information on using the ListTunnels 267 // API call, and error handling. 268 // 269 // This method is useful when you want to inject custom logic or configuration 270 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 271 // 272 // 273 // // Example sending a request using the ListTunnelsRequest method. 274 // req, resp := client.ListTunnelsRequest(params) 275 // 276 // err := req.Send() 277 // if err == nil { // resp is now filled 278 // fmt.Println(resp) 279 // } 280 // 281 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/ListTunnels 282 func (c *IoTSecureTunneling) ListTunnelsRequest(input *ListTunnelsInput) (req *request.Request, output *ListTunnelsOutput) { 283 op := &request.Operation{ 284 Name: opListTunnels, 285 HTTPMethod: "POST", 286 HTTPPath: "/", 287 Paginator: &request.Paginator{ 288 InputTokens: []string{"nextToken"}, 289 OutputTokens: []string{"nextToken"}, 290 LimitToken: "maxResults", 291 TruncationToken: "", 292 }, 293 } 294 295 if input == nil { 296 input = &ListTunnelsInput{} 297 } 298 299 output = &ListTunnelsOutput{} 300 req = c.newRequest(op, input, output) 301 return 302 } 303 304 // ListTunnels API operation for AWS IoT Secure Tunneling. 305 // 306 // List all tunnels for an AWS account. Tunnels are listed by creation time 307 // in descending order, newer tunnels will be listed before older tunnels. 308 // 309 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 310 // with awserr.Error's Code and Message methods to get detailed information about 311 // the error. 312 // 313 // See the AWS API reference guide for AWS IoT Secure Tunneling's 314 // API operation ListTunnels for usage and error information. 315 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/ListTunnels 316 func (c *IoTSecureTunneling) ListTunnels(input *ListTunnelsInput) (*ListTunnelsOutput, error) { 317 req, out := c.ListTunnelsRequest(input) 318 return out, req.Send() 319 } 320 321 // ListTunnelsWithContext is the same as ListTunnels with the addition of 322 // the ability to pass a context and additional request options. 323 // 324 // See ListTunnels for details on how to use this API operation. 325 // 326 // The context must be non-nil and will be used for request cancellation. If 327 // the context is nil a panic will occur. In the future the SDK may create 328 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 329 // for more information on using Contexts. 330 func (c *IoTSecureTunneling) ListTunnelsWithContext(ctx aws.Context, input *ListTunnelsInput, opts ...request.Option) (*ListTunnelsOutput, error) { 331 req, out := c.ListTunnelsRequest(input) 332 req.SetContext(ctx) 333 req.ApplyOptions(opts...) 334 return out, req.Send() 335 } 336 337 // ListTunnelsPages iterates over the pages of a ListTunnels operation, 338 // calling the "fn" function with the response data for each page. To stop 339 // iterating, return false from the fn function. 340 // 341 // See ListTunnels method for more information on how to use this operation. 342 // 343 // Note: This operation can generate multiple requests to a service. 344 // 345 // // Example iterating over at most 3 pages of a ListTunnels operation. 346 // pageNum := 0 347 // err := client.ListTunnelsPages(params, 348 // func(page *iotsecuretunneling.ListTunnelsOutput, lastPage bool) bool { 349 // pageNum++ 350 // fmt.Println(page) 351 // return pageNum <= 3 352 // }) 353 // 354 func (c *IoTSecureTunneling) ListTunnelsPages(input *ListTunnelsInput, fn func(*ListTunnelsOutput, bool) bool) error { 355 return c.ListTunnelsPagesWithContext(aws.BackgroundContext(), input, fn) 356 } 357 358 // ListTunnelsPagesWithContext same as ListTunnelsPages except 359 // it takes a Context and allows setting request options on the pages. 360 // 361 // The context must be non-nil and will be used for request cancellation. If 362 // the context is nil a panic will occur. In the future the SDK may create 363 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 364 // for more information on using Contexts. 365 func (c *IoTSecureTunneling) ListTunnelsPagesWithContext(ctx aws.Context, input *ListTunnelsInput, fn func(*ListTunnelsOutput, bool) bool, opts ...request.Option) error { 366 p := request.Pagination{ 367 NewRequest: func() (*request.Request, error) { 368 var inCpy *ListTunnelsInput 369 if input != nil { 370 tmp := *input 371 inCpy = &tmp 372 } 373 req, _ := c.ListTunnelsRequest(inCpy) 374 req.SetContext(ctx) 375 req.ApplyOptions(opts...) 376 return req, nil 377 }, 378 } 379 380 for p.Next() { 381 if !fn(p.Page().(*ListTunnelsOutput), !p.HasNextPage()) { 382 break 383 } 384 } 385 386 return p.Err() 387 } 388 389 const opOpenTunnel = "OpenTunnel" 390 391 // OpenTunnelRequest generates a "aws/request.Request" representing the 392 // client's request for the OpenTunnel operation. The "output" return 393 // value will be populated with the request's response once the request completes 394 // successfully. 395 // 396 // Use "Send" method on the returned Request to send the API call to the service. 397 // the "output" return value is not valid until after Send returns without error. 398 // 399 // See OpenTunnel for more information on using the OpenTunnel 400 // API call, and error handling. 401 // 402 // This method is useful when you want to inject custom logic or configuration 403 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 404 // 405 // 406 // // Example sending a request using the OpenTunnelRequest method. 407 // req, resp := client.OpenTunnelRequest(params) 408 // 409 // err := req.Send() 410 // if err == nil { // resp is now filled 411 // fmt.Println(resp) 412 // } 413 // 414 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/OpenTunnel 415 func (c *IoTSecureTunneling) OpenTunnelRequest(input *OpenTunnelInput) (req *request.Request, output *OpenTunnelOutput) { 416 op := &request.Operation{ 417 Name: opOpenTunnel, 418 HTTPMethod: "POST", 419 HTTPPath: "/", 420 } 421 422 if input == nil { 423 input = &OpenTunnelInput{} 424 } 425 426 output = &OpenTunnelOutput{} 427 req = c.newRequest(op, input, output) 428 return 429 } 430 431 // OpenTunnel API operation for AWS IoT Secure Tunneling. 432 // 433 // Creates a new tunnel, and returns two client access tokens for clients to 434 // use to connect to the AWS IoT Secure Tunneling proxy server. 435 // 436 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 437 // with awserr.Error's Code and Message methods to get detailed information about 438 // the error. 439 // 440 // See the AWS API reference guide for AWS IoT Secure Tunneling's 441 // API operation OpenTunnel for usage and error information. 442 // 443 // Returned Error Types: 444 // * LimitExceededException 445 // Thrown when a tunnel limit is exceeded. 446 // 447 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/OpenTunnel 448 func (c *IoTSecureTunneling) OpenTunnel(input *OpenTunnelInput) (*OpenTunnelOutput, error) { 449 req, out := c.OpenTunnelRequest(input) 450 return out, req.Send() 451 } 452 453 // OpenTunnelWithContext is the same as OpenTunnel with the addition of 454 // the ability to pass a context and additional request options. 455 // 456 // See OpenTunnel for details on how to use this API operation. 457 // 458 // The context must be non-nil and will be used for request cancellation. If 459 // the context is nil a panic will occur. In the future the SDK may create 460 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 461 // for more information on using Contexts. 462 func (c *IoTSecureTunneling) OpenTunnelWithContext(ctx aws.Context, input *OpenTunnelInput, opts ...request.Option) (*OpenTunnelOutput, error) { 463 req, out := c.OpenTunnelRequest(input) 464 req.SetContext(ctx) 465 req.ApplyOptions(opts...) 466 return out, req.Send() 467 } 468 469 const opTagResource = "TagResource" 470 471 // TagResourceRequest generates a "aws/request.Request" representing the 472 // client's request for the TagResource operation. The "output" return 473 // value will be populated with the request's response once the request completes 474 // successfully. 475 // 476 // Use "Send" method on the returned Request to send the API call to the service. 477 // the "output" return value is not valid until after Send returns without error. 478 // 479 // See TagResource for more information on using the TagResource 480 // API call, and error handling. 481 // 482 // This method is useful when you want to inject custom logic or configuration 483 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 484 // 485 // 486 // // Example sending a request using the TagResourceRequest method. 487 // req, resp := client.TagResourceRequest(params) 488 // 489 // err := req.Send() 490 // if err == nil { // resp is now filled 491 // fmt.Println(resp) 492 // } 493 // 494 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/TagResource 495 func (c *IoTSecureTunneling) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 496 op := &request.Operation{ 497 Name: opTagResource, 498 HTTPMethod: "POST", 499 HTTPPath: "/", 500 } 501 502 if input == nil { 503 input = &TagResourceInput{} 504 } 505 506 output = &TagResourceOutput{} 507 req = c.newRequest(op, input, output) 508 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 509 return 510 } 511 512 // TagResource API operation for AWS IoT Secure Tunneling. 513 // 514 // A resource tag. 515 // 516 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 517 // with awserr.Error's Code and Message methods to get detailed information about 518 // the error. 519 // 520 // See the AWS API reference guide for AWS IoT Secure Tunneling's 521 // API operation TagResource for usage and error information. 522 // 523 // Returned Error Types: 524 // * ResourceNotFoundException 525 // Thrown when an operation is attempted on a resource that does not exist. 526 // 527 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/TagResource 528 func (c *IoTSecureTunneling) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 529 req, out := c.TagResourceRequest(input) 530 return out, req.Send() 531 } 532 533 // TagResourceWithContext is the same as TagResource with the addition of 534 // the ability to pass a context and additional request options. 535 // 536 // See TagResource for details on how to use this API operation. 537 // 538 // The context must be non-nil and will be used for request cancellation. If 539 // the context is nil a panic will occur. In the future the SDK may create 540 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 541 // for more information on using Contexts. 542 func (c *IoTSecureTunneling) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 543 req, out := c.TagResourceRequest(input) 544 req.SetContext(ctx) 545 req.ApplyOptions(opts...) 546 return out, req.Send() 547 } 548 549 const opUntagResource = "UntagResource" 550 551 // UntagResourceRequest generates a "aws/request.Request" representing the 552 // client's request for the UntagResource operation. The "output" return 553 // value will be populated with the request's response once the request completes 554 // successfully. 555 // 556 // Use "Send" method on the returned Request to send the API call to the service. 557 // the "output" return value is not valid until after Send returns without error. 558 // 559 // See UntagResource for more information on using the UntagResource 560 // API call, and error handling. 561 // 562 // This method is useful when you want to inject custom logic or configuration 563 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 564 // 565 // 566 // // Example sending a request using the UntagResourceRequest method. 567 // req, resp := client.UntagResourceRequest(params) 568 // 569 // err := req.Send() 570 // if err == nil { // resp is now filled 571 // fmt.Println(resp) 572 // } 573 // 574 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/UntagResource 575 func (c *IoTSecureTunneling) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 576 op := &request.Operation{ 577 Name: opUntagResource, 578 HTTPMethod: "POST", 579 HTTPPath: "/", 580 } 581 582 if input == nil { 583 input = &UntagResourceInput{} 584 } 585 586 output = &UntagResourceOutput{} 587 req = c.newRequest(op, input, output) 588 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 589 return 590 } 591 592 // UntagResource API operation for AWS IoT Secure Tunneling. 593 // 594 // Removes a tag from a resource. 595 // 596 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 597 // with awserr.Error's Code and Message methods to get detailed information about 598 // the error. 599 // 600 // See the AWS API reference guide for AWS IoT Secure Tunneling's 601 // API operation UntagResource for usage and error information. 602 // 603 // Returned Error Types: 604 // * ResourceNotFoundException 605 // Thrown when an operation is attempted on a resource that does not exist. 606 // 607 // See also, https://docs.aws.amazon.com/goto/WebAPI/iotsecuretunneling-2018-10-05/UntagResource 608 func (c *IoTSecureTunneling) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 609 req, out := c.UntagResourceRequest(input) 610 return out, req.Send() 611 } 612 613 // UntagResourceWithContext is the same as UntagResource with the addition of 614 // the ability to pass a context and additional request options. 615 // 616 // See UntagResource for details on how to use this API operation. 617 // 618 // The context must be non-nil and will be used for request cancellation. If 619 // the context is nil a panic will occur. In the future the SDK may create 620 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 621 // for more information on using Contexts. 622 func (c *IoTSecureTunneling) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 623 req, out := c.UntagResourceRequest(input) 624 req.SetContext(ctx) 625 req.ApplyOptions(opts...) 626 return out, req.Send() 627 } 628 629 type CloseTunnelInput struct { 630 _ struct{} `type:"structure"` 631 632 // When set to true, AWS IoT Secure Tunneling deletes the tunnel data immediately. 633 Delete *bool `locationName:"delete" type:"boolean"` 634 635 // The ID of the tunnel to close. 636 // 637 // TunnelId is a required field 638 TunnelId *string `locationName:"tunnelId" type:"string" required:"true"` 639 } 640 641 // String returns the string representation. 642 // 643 // API parameter values that are decorated as "sensitive" in the API will not 644 // be included in the string output. The member name will be present, but the 645 // value will be replaced with "sensitive". 646 func (s CloseTunnelInput) String() string { 647 return awsutil.Prettify(s) 648 } 649 650 // GoString returns the string representation. 651 // 652 // API parameter values that are decorated as "sensitive" in the API will not 653 // be included in the string output. The member name will be present, but the 654 // value will be replaced with "sensitive". 655 func (s CloseTunnelInput) GoString() string { 656 return s.String() 657 } 658 659 // Validate inspects the fields of the type to determine if they are valid. 660 func (s *CloseTunnelInput) Validate() error { 661 invalidParams := request.ErrInvalidParams{Context: "CloseTunnelInput"} 662 if s.TunnelId == nil { 663 invalidParams.Add(request.NewErrParamRequired("TunnelId")) 664 } 665 666 if invalidParams.Len() > 0 { 667 return invalidParams 668 } 669 return nil 670 } 671 672 // SetDelete sets the Delete field's value. 673 func (s *CloseTunnelInput) SetDelete(v bool) *CloseTunnelInput { 674 s.Delete = &v 675 return s 676 } 677 678 // SetTunnelId sets the TunnelId field's value. 679 func (s *CloseTunnelInput) SetTunnelId(v string) *CloseTunnelInput { 680 s.TunnelId = &v 681 return s 682 } 683 684 type CloseTunnelOutput struct { 685 _ struct{} `type:"structure"` 686 } 687 688 // String returns the string representation. 689 // 690 // API parameter values that are decorated as "sensitive" in the API will not 691 // be included in the string output. The member name will be present, but the 692 // value will be replaced with "sensitive". 693 func (s CloseTunnelOutput) String() string { 694 return awsutil.Prettify(s) 695 } 696 697 // GoString returns the string representation. 698 // 699 // API parameter values that are decorated as "sensitive" in the API will not 700 // be included in the string output. The member name will be present, but the 701 // value will be replaced with "sensitive". 702 func (s CloseTunnelOutput) GoString() string { 703 return s.String() 704 } 705 706 // The state of a connection. 707 type ConnectionState struct { 708 _ struct{} `type:"structure"` 709 710 // The last time the connection status was updated. 711 LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` 712 713 // The connection status of the tunnel. Valid values are CONNECTED and DISCONNECTED. 714 Status *string `locationName:"status" type:"string" enum:"ConnectionStatus"` 715 } 716 717 // String returns the string representation. 718 // 719 // API parameter values that are decorated as "sensitive" in the API will not 720 // be included in the string output. The member name will be present, but the 721 // value will be replaced with "sensitive". 722 func (s ConnectionState) String() string { 723 return awsutil.Prettify(s) 724 } 725 726 // GoString returns the string representation. 727 // 728 // API parameter values that are decorated as "sensitive" in the API will not 729 // be included in the string output. The member name will be present, but the 730 // value will be replaced with "sensitive". 731 func (s ConnectionState) GoString() string { 732 return s.String() 733 } 734 735 // SetLastUpdatedAt sets the LastUpdatedAt field's value. 736 func (s *ConnectionState) SetLastUpdatedAt(v time.Time) *ConnectionState { 737 s.LastUpdatedAt = &v 738 return s 739 } 740 741 // SetStatus sets the Status field's value. 742 func (s *ConnectionState) SetStatus(v string) *ConnectionState { 743 s.Status = &v 744 return s 745 } 746 747 type DescribeTunnelInput struct { 748 _ struct{} `type:"structure"` 749 750 // The tunnel to describe. 751 // 752 // TunnelId is a required field 753 TunnelId *string `locationName:"tunnelId" type:"string" required:"true"` 754 } 755 756 // String returns the string representation. 757 // 758 // API parameter values that are decorated as "sensitive" in the API will not 759 // be included in the string output. The member name will be present, but the 760 // value will be replaced with "sensitive". 761 func (s DescribeTunnelInput) String() string { 762 return awsutil.Prettify(s) 763 } 764 765 // GoString returns the string representation. 766 // 767 // API parameter values that are decorated as "sensitive" in the API will not 768 // be included in the string output. The member name will be present, but the 769 // value will be replaced with "sensitive". 770 func (s DescribeTunnelInput) GoString() string { 771 return s.String() 772 } 773 774 // Validate inspects the fields of the type to determine if they are valid. 775 func (s *DescribeTunnelInput) Validate() error { 776 invalidParams := request.ErrInvalidParams{Context: "DescribeTunnelInput"} 777 if s.TunnelId == nil { 778 invalidParams.Add(request.NewErrParamRequired("TunnelId")) 779 } 780 781 if invalidParams.Len() > 0 { 782 return invalidParams 783 } 784 return nil 785 } 786 787 // SetTunnelId sets the TunnelId field's value. 788 func (s *DescribeTunnelInput) SetTunnelId(v string) *DescribeTunnelInput { 789 s.TunnelId = &v 790 return s 791 } 792 793 type DescribeTunnelOutput struct { 794 _ struct{} `type:"structure"` 795 796 // The tunnel being described. 797 Tunnel *Tunnel `locationName:"tunnel" type:"structure"` 798 } 799 800 // String returns the string representation. 801 // 802 // API parameter values that are decorated as "sensitive" in the API will not 803 // be included in the string output. The member name will be present, but the 804 // value will be replaced with "sensitive". 805 func (s DescribeTunnelOutput) String() string { 806 return awsutil.Prettify(s) 807 } 808 809 // GoString returns the string representation. 810 // 811 // API parameter values that are decorated as "sensitive" in the API will not 812 // be included in the string output. The member name will be present, but the 813 // value will be replaced with "sensitive". 814 func (s DescribeTunnelOutput) GoString() string { 815 return s.String() 816 } 817 818 // SetTunnel sets the Tunnel field's value. 819 func (s *DescribeTunnelOutput) SetTunnel(v *Tunnel) *DescribeTunnelOutput { 820 s.Tunnel = v 821 return s 822 } 823 824 // The destination configuration. 825 type DestinationConfig struct { 826 _ struct{} `type:"structure"` 827 828 // A list of service names that identity the target application. The AWS IoT 829 // client running on the destination device reads this value and uses it to 830 // look up a port or an IP address and a port. The AWS IoT client instantiates 831 // the local proxy which uses this information to connect to the destination 832 // application. 833 // 834 // Services is a required field 835 Services []*string `locationName:"services" min:"1" type:"list" required:"true"` 836 837 // The name of the IoT thing to which you want to connect. 838 ThingName *string `locationName:"thingName" min:"1" type:"string"` 839 } 840 841 // String returns the string representation. 842 // 843 // API parameter values that are decorated as "sensitive" in the API will not 844 // be included in the string output. The member name will be present, but the 845 // value will be replaced with "sensitive". 846 func (s DestinationConfig) String() string { 847 return awsutil.Prettify(s) 848 } 849 850 // GoString returns the string representation. 851 // 852 // API parameter values that are decorated as "sensitive" in the API will not 853 // be included in the string output. The member name will be present, but the 854 // value will be replaced with "sensitive". 855 func (s DestinationConfig) GoString() string { 856 return s.String() 857 } 858 859 // Validate inspects the fields of the type to determine if they are valid. 860 func (s *DestinationConfig) Validate() error { 861 invalidParams := request.ErrInvalidParams{Context: "DestinationConfig"} 862 if s.Services == nil { 863 invalidParams.Add(request.NewErrParamRequired("Services")) 864 } 865 if s.Services != nil && len(s.Services) < 1 { 866 invalidParams.Add(request.NewErrParamMinLen("Services", 1)) 867 } 868 if s.ThingName != nil && len(*s.ThingName) < 1 { 869 invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) 870 } 871 872 if invalidParams.Len() > 0 { 873 return invalidParams 874 } 875 return nil 876 } 877 878 // SetServices sets the Services field's value. 879 func (s *DestinationConfig) SetServices(v []*string) *DestinationConfig { 880 s.Services = v 881 return s 882 } 883 884 // SetThingName sets the ThingName field's value. 885 func (s *DestinationConfig) SetThingName(v string) *DestinationConfig { 886 s.ThingName = &v 887 return s 888 } 889 890 // Thrown when a tunnel limit is exceeded. 891 type LimitExceededException struct { 892 _ struct{} `type:"structure"` 893 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 894 895 Message_ *string `locationName:"message" type:"string"` 896 } 897 898 // String returns the string representation. 899 // 900 // API parameter values that are decorated as "sensitive" in the API will not 901 // be included in the string output. The member name will be present, but the 902 // value will be replaced with "sensitive". 903 func (s LimitExceededException) String() string { 904 return awsutil.Prettify(s) 905 } 906 907 // GoString returns the string representation. 908 // 909 // API parameter values that are decorated as "sensitive" in the API will not 910 // be included in the string output. The member name will be present, but the 911 // value will be replaced with "sensitive". 912 func (s LimitExceededException) GoString() string { 913 return s.String() 914 } 915 916 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 917 return &LimitExceededException{ 918 RespMetadata: v, 919 } 920 } 921 922 // Code returns the exception type name. 923 func (s *LimitExceededException) Code() string { 924 return "LimitExceededException" 925 } 926 927 // Message returns the exception's message. 928 func (s *LimitExceededException) Message() string { 929 if s.Message_ != nil { 930 return *s.Message_ 931 } 932 return "" 933 } 934 935 // OrigErr always returns nil, satisfies awserr.Error interface. 936 func (s *LimitExceededException) OrigErr() error { 937 return nil 938 } 939 940 func (s *LimitExceededException) Error() string { 941 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 942 } 943 944 // Status code returns the HTTP status code for the request's response error. 945 func (s *LimitExceededException) StatusCode() int { 946 return s.RespMetadata.StatusCode 947 } 948 949 // RequestID returns the service's response RequestID for request. 950 func (s *LimitExceededException) RequestID() string { 951 return s.RespMetadata.RequestID 952 } 953 954 type ListTagsForResourceInput struct { 955 _ struct{} `type:"structure"` 956 957 // The resource ARN. 958 // 959 // ResourceArn is a required field 960 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 961 } 962 963 // String returns the string representation. 964 // 965 // API parameter values that are decorated as "sensitive" in the API will not 966 // be included in the string output. The member name will be present, but the 967 // value will be replaced with "sensitive". 968 func (s ListTagsForResourceInput) String() string { 969 return awsutil.Prettify(s) 970 } 971 972 // GoString returns the string representation. 973 // 974 // API parameter values that are decorated as "sensitive" in the API will not 975 // be included in the string output. The member name will be present, but the 976 // value will be replaced with "sensitive". 977 func (s ListTagsForResourceInput) GoString() string { 978 return s.String() 979 } 980 981 // Validate inspects the fields of the type to determine if they are valid. 982 func (s *ListTagsForResourceInput) Validate() error { 983 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 984 if s.ResourceArn == nil { 985 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 986 } 987 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 988 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 989 } 990 991 if invalidParams.Len() > 0 { 992 return invalidParams 993 } 994 return nil 995 } 996 997 // SetResourceArn sets the ResourceArn field's value. 998 func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 999 s.ResourceArn = &v 1000 return s 1001 } 1002 1003 type ListTagsForResourceOutput struct { 1004 _ struct{} `type:"structure"` 1005 1006 // The tags for the specified resource. 1007 Tags []*Tag `locationName:"tags" min:"1" type:"list"` 1008 } 1009 1010 // String returns the string representation. 1011 // 1012 // API parameter values that are decorated as "sensitive" in the API will not 1013 // be included in the string output. The member name will be present, but the 1014 // value will be replaced with "sensitive". 1015 func (s ListTagsForResourceOutput) String() string { 1016 return awsutil.Prettify(s) 1017 } 1018 1019 // GoString returns the string representation. 1020 // 1021 // API parameter values that are decorated as "sensitive" in the API will not 1022 // be included in the string output. The member name will be present, but the 1023 // value will be replaced with "sensitive". 1024 func (s ListTagsForResourceOutput) GoString() string { 1025 return s.String() 1026 } 1027 1028 // SetTags sets the Tags field's value. 1029 func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 1030 s.Tags = v 1031 return s 1032 } 1033 1034 type ListTunnelsInput struct { 1035 _ struct{} `type:"structure"` 1036 1037 // The maximum number of results to return at once. 1038 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 1039 1040 // A token to retrieve the next set of results. 1041 NextToken *string `locationName:"nextToken" type:"string"` 1042 1043 // The name of the IoT thing associated with the destination device. 1044 ThingName *string `locationName:"thingName" min:"1" type:"string"` 1045 } 1046 1047 // String returns the string representation. 1048 // 1049 // API parameter values that are decorated as "sensitive" in the API will not 1050 // be included in the string output. The member name will be present, but the 1051 // value will be replaced with "sensitive". 1052 func (s ListTunnelsInput) String() string { 1053 return awsutil.Prettify(s) 1054 } 1055 1056 // GoString returns the string representation. 1057 // 1058 // API parameter values that are decorated as "sensitive" in the API will not 1059 // be included in the string output. The member name will be present, but the 1060 // value will be replaced with "sensitive". 1061 func (s ListTunnelsInput) GoString() string { 1062 return s.String() 1063 } 1064 1065 // Validate inspects the fields of the type to determine if they are valid. 1066 func (s *ListTunnelsInput) Validate() error { 1067 invalidParams := request.ErrInvalidParams{Context: "ListTunnelsInput"} 1068 if s.MaxResults != nil && *s.MaxResults < 1 { 1069 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 1070 } 1071 if s.ThingName != nil && len(*s.ThingName) < 1 { 1072 invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) 1073 } 1074 1075 if invalidParams.Len() > 0 { 1076 return invalidParams 1077 } 1078 return nil 1079 } 1080 1081 // SetMaxResults sets the MaxResults field's value. 1082 func (s *ListTunnelsInput) SetMaxResults(v int64) *ListTunnelsInput { 1083 s.MaxResults = &v 1084 return s 1085 } 1086 1087 // SetNextToken sets the NextToken field's value. 1088 func (s *ListTunnelsInput) SetNextToken(v string) *ListTunnelsInput { 1089 s.NextToken = &v 1090 return s 1091 } 1092 1093 // SetThingName sets the ThingName field's value. 1094 func (s *ListTunnelsInput) SetThingName(v string) *ListTunnelsInput { 1095 s.ThingName = &v 1096 return s 1097 } 1098 1099 type ListTunnelsOutput struct { 1100 _ struct{} `type:"structure"` 1101 1102 // A token to used to retrieve the next set of results. 1103 NextToken *string `locationName:"nextToken" type:"string"` 1104 1105 // A short description of the tunnels in an AWS account. 1106 TunnelSummaries []*TunnelSummary `locationName:"tunnelSummaries" type:"list"` 1107 } 1108 1109 // String returns the string representation. 1110 // 1111 // API parameter values that are decorated as "sensitive" in the API will not 1112 // be included in the string output. The member name will be present, but the 1113 // value will be replaced with "sensitive". 1114 func (s ListTunnelsOutput) String() string { 1115 return awsutil.Prettify(s) 1116 } 1117 1118 // GoString returns the string representation. 1119 // 1120 // API parameter values that are decorated as "sensitive" in the API will not 1121 // be included in the string output. The member name will be present, but the 1122 // value will be replaced with "sensitive". 1123 func (s ListTunnelsOutput) GoString() string { 1124 return s.String() 1125 } 1126 1127 // SetNextToken sets the NextToken field's value. 1128 func (s *ListTunnelsOutput) SetNextToken(v string) *ListTunnelsOutput { 1129 s.NextToken = &v 1130 return s 1131 } 1132 1133 // SetTunnelSummaries sets the TunnelSummaries field's value. 1134 func (s *ListTunnelsOutput) SetTunnelSummaries(v []*TunnelSummary) *ListTunnelsOutput { 1135 s.TunnelSummaries = v 1136 return s 1137 } 1138 1139 type OpenTunnelInput struct { 1140 _ struct{} `type:"structure"` 1141 1142 // A short text description of the tunnel. 1143 Description *string `locationName:"description" type:"string"` 1144 1145 // The destination configuration for the OpenTunnel request. 1146 DestinationConfig *DestinationConfig `locationName:"destinationConfig" type:"structure"` 1147 1148 // A collection of tag metadata. 1149 Tags []*Tag `locationName:"tags" min:"1" type:"list"` 1150 1151 // Timeout configuration for a tunnel. 1152 TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` 1153 } 1154 1155 // String returns the string representation. 1156 // 1157 // API parameter values that are decorated as "sensitive" in the API will not 1158 // be included in the string output. The member name will be present, but the 1159 // value will be replaced with "sensitive". 1160 func (s OpenTunnelInput) String() string { 1161 return awsutil.Prettify(s) 1162 } 1163 1164 // GoString returns the string representation. 1165 // 1166 // API parameter values that are decorated as "sensitive" in the API will not 1167 // be included in the string output. The member name will be present, but the 1168 // value will be replaced with "sensitive". 1169 func (s OpenTunnelInput) GoString() string { 1170 return s.String() 1171 } 1172 1173 // Validate inspects the fields of the type to determine if they are valid. 1174 func (s *OpenTunnelInput) Validate() error { 1175 invalidParams := request.ErrInvalidParams{Context: "OpenTunnelInput"} 1176 if s.Tags != nil && len(s.Tags) < 1 { 1177 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 1178 } 1179 if s.DestinationConfig != nil { 1180 if err := s.DestinationConfig.Validate(); err != nil { 1181 invalidParams.AddNested("DestinationConfig", err.(request.ErrInvalidParams)) 1182 } 1183 } 1184 if s.Tags != nil { 1185 for i, v := range s.Tags { 1186 if v == nil { 1187 continue 1188 } 1189 if err := v.Validate(); err != nil { 1190 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 1191 } 1192 } 1193 } 1194 if s.TimeoutConfig != nil { 1195 if err := s.TimeoutConfig.Validate(); err != nil { 1196 invalidParams.AddNested("TimeoutConfig", err.(request.ErrInvalidParams)) 1197 } 1198 } 1199 1200 if invalidParams.Len() > 0 { 1201 return invalidParams 1202 } 1203 return nil 1204 } 1205 1206 // SetDescription sets the Description field's value. 1207 func (s *OpenTunnelInput) SetDescription(v string) *OpenTunnelInput { 1208 s.Description = &v 1209 return s 1210 } 1211 1212 // SetDestinationConfig sets the DestinationConfig field's value. 1213 func (s *OpenTunnelInput) SetDestinationConfig(v *DestinationConfig) *OpenTunnelInput { 1214 s.DestinationConfig = v 1215 return s 1216 } 1217 1218 // SetTags sets the Tags field's value. 1219 func (s *OpenTunnelInput) SetTags(v []*Tag) *OpenTunnelInput { 1220 s.Tags = v 1221 return s 1222 } 1223 1224 // SetTimeoutConfig sets the TimeoutConfig field's value. 1225 func (s *OpenTunnelInput) SetTimeoutConfig(v *TimeoutConfig) *OpenTunnelInput { 1226 s.TimeoutConfig = v 1227 return s 1228 } 1229 1230 type OpenTunnelOutput struct { 1231 _ struct{} `type:"structure"` 1232 1233 // The access token the destination local proxy uses to connect to AWS IoT Secure 1234 // Tunneling. 1235 // 1236 // DestinationAccessToken is a sensitive parameter and its value will be 1237 // replaced with "sensitive" in string returned by OpenTunnelOutput's 1238 // String and GoString methods. 1239 DestinationAccessToken *string `locationName:"destinationAccessToken" type:"string" sensitive:"true"` 1240 1241 // The access token the source local proxy uses to connect to AWS IoT Secure 1242 // Tunneling. 1243 // 1244 // SourceAccessToken is a sensitive parameter and its value will be 1245 // replaced with "sensitive" in string returned by OpenTunnelOutput's 1246 // String and GoString methods. 1247 SourceAccessToken *string `locationName:"sourceAccessToken" type:"string" sensitive:"true"` 1248 1249 // The Amazon Resource Name for the tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id> 1250 TunnelArn *string `locationName:"tunnelArn" min:"1" type:"string"` 1251 1252 // A unique alpha-numeric tunnel ID. 1253 TunnelId *string `locationName:"tunnelId" type:"string"` 1254 } 1255 1256 // String returns the string representation. 1257 // 1258 // API parameter values that are decorated as "sensitive" in the API will not 1259 // be included in the string output. The member name will be present, but the 1260 // value will be replaced with "sensitive". 1261 func (s OpenTunnelOutput) String() string { 1262 return awsutil.Prettify(s) 1263 } 1264 1265 // GoString returns the string representation. 1266 // 1267 // API parameter values that are decorated as "sensitive" in the API will not 1268 // be included in the string output. The member name will be present, but the 1269 // value will be replaced with "sensitive". 1270 func (s OpenTunnelOutput) GoString() string { 1271 return s.String() 1272 } 1273 1274 // SetDestinationAccessToken sets the DestinationAccessToken field's value. 1275 func (s *OpenTunnelOutput) SetDestinationAccessToken(v string) *OpenTunnelOutput { 1276 s.DestinationAccessToken = &v 1277 return s 1278 } 1279 1280 // SetSourceAccessToken sets the SourceAccessToken field's value. 1281 func (s *OpenTunnelOutput) SetSourceAccessToken(v string) *OpenTunnelOutput { 1282 s.SourceAccessToken = &v 1283 return s 1284 } 1285 1286 // SetTunnelArn sets the TunnelArn field's value. 1287 func (s *OpenTunnelOutput) SetTunnelArn(v string) *OpenTunnelOutput { 1288 s.TunnelArn = &v 1289 return s 1290 } 1291 1292 // SetTunnelId sets the TunnelId field's value. 1293 func (s *OpenTunnelOutput) SetTunnelId(v string) *OpenTunnelOutput { 1294 s.TunnelId = &v 1295 return s 1296 } 1297 1298 // Thrown when an operation is attempted on a resource that does not exist. 1299 type ResourceNotFoundException struct { 1300 _ struct{} `type:"structure"` 1301 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1302 1303 Message_ *string `locationName:"message" type:"string"` 1304 } 1305 1306 // String returns the string representation. 1307 // 1308 // API parameter values that are decorated as "sensitive" in the API will not 1309 // be included in the string output. The member name will be present, but the 1310 // value will be replaced with "sensitive". 1311 func (s ResourceNotFoundException) String() string { 1312 return awsutil.Prettify(s) 1313 } 1314 1315 // GoString returns the string representation. 1316 // 1317 // API parameter values that are decorated as "sensitive" in the API will not 1318 // be included in the string output. The member name will be present, but the 1319 // value will be replaced with "sensitive". 1320 func (s ResourceNotFoundException) GoString() string { 1321 return s.String() 1322 } 1323 1324 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 1325 return &ResourceNotFoundException{ 1326 RespMetadata: v, 1327 } 1328 } 1329 1330 // Code returns the exception type name. 1331 func (s *ResourceNotFoundException) Code() string { 1332 return "ResourceNotFoundException" 1333 } 1334 1335 // Message returns the exception's message. 1336 func (s *ResourceNotFoundException) Message() string { 1337 if s.Message_ != nil { 1338 return *s.Message_ 1339 } 1340 return "" 1341 } 1342 1343 // OrigErr always returns nil, satisfies awserr.Error interface. 1344 func (s *ResourceNotFoundException) OrigErr() error { 1345 return nil 1346 } 1347 1348 func (s *ResourceNotFoundException) Error() string { 1349 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1350 } 1351 1352 // Status code returns the HTTP status code for the request's response error. 1353 func (s *ResourceNotFoundException) StatusCode() int { 1354 return s.RespMetadata.StatusCode 1355 } 1356 1357 // RequestID returns the service's response RequestID for request. 1358 func (s *ResourceNotFoundException) RequestID() string { 1359 return s.RespMetadata.RequestID 1360 } 1361 1362 // An arbitary key/value pair used to add searchable metadata to secure tunnel 1363 // resources. 1364 type Tag struct { 1365 _ struct{} `type:"structure"` 1366 1367 // The key of the tag. 1368 // 1369 // Key is a required field 1370 Key *string `locationName:"key" min:"1" type:"string" required:"true"` 1371 1372 // The value of the tag. 1373 // 1374 // Value is a required field 1375 Value *string `locationName:"value" type:"string" required:"true"` 1376 } 1377 1378 // String returns the string representation. 1379 // 1380 // API parameter values that are decorated as "sensitive" in the API will not 1381 // be included in the string output. The member name will be present, but the 1382 // value will be replaced with "sensitive". 1383 func (s Tag) String() string { 1384 return awsutil.Prettify(s) 1385 } 1386 1387 // GoString returns the string representation. 1388 // 1389 // API parameter values that are decorated as "sensitive" in the API will not 1390 // be included in the string output. The member name will be present, but the 1391 // value will be replaced with "sensitive". 1392 func (s Tag) GoString() string { 1393 return s.String() 1394 } 1395 1396 // Validate inspects the fields of the type to determine if they are valid. 1397 func (s *Tag) Validate() error { 1398 invalidParams := request.ErrInvalidParams{Context: "Tag"} 1399 if s.Key == nil { 1400 invalidParams.Add(request.NewErrParamRequired("Key")) 1401 } 1402 if s.Key != nil && len(*s.Key) < 1 { 1403 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 1404 } 1405 if s.Value == nil { 1406 invalidParams.Add(request.NewErrParamRequired("Value")) 1407 } 1408 1409 if invalidParams.Len() > 0 { 1410 return invalidParams 1411 } 1412 return nil 1413 } 1414 1415 // SetKey sets the Key field's value. 1416 func (s *Tag) SetKey(v string) *Tag { 1417 s.Key = &v 1418 return s 1419 } 1420 1421 // SetValue sets the Value field's value. 1422 func (s *Tag) SetValue(v string) *Tag { 1423 s.Value = &v 1424 return s 1425 } 1426 1427 type TagResourceInput struct { 1428 _ struct{} `type:"structure"` 1429 1430 // The ARN of the resource. 1431 // 1432 // ResourceArn is a required field 1433 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 1434 1435 // The tags for the resource. 1436 // 1437 // Tags is a required field 1438 Tags []*Tag `locationName:"tags" min:"1" type:"list" required:"true"` 1439 } 1440 1441 // String returns the string representation. 1442 // 1443 // API parameter values that are decorated as "sensitive" in the API will not 1444 // be included in the string output. The member name will be present, but the 1445 // value will be replaced with "sensitive". 1446 func (s TagResourceInput) String() string { 1447 return awsutil.Prettify(s) 1448 } 1449 1450 // GoString returns the string representation. 1451 // 1452 // API parameter values that are decorated as "sensitive" in the API will not 1453 // be included in the string output. The member name will be present, but the 1454 // value will be replaced with "sensitive". 1455 func (s TagResourceInput) GoString() string { 1456 return s.String() 1457 } 1458 1459 // Validate inspects the fields of the type to determine if they are valid. 1460 func (s *TagResourceInput) Validate() error { 1461 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 1462 if s.ResourceArn == nil { 1463 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 1464 } 1465 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 1466 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 1467 } 1468 if s.Tags == nil { 1469 invalidParams.Add(request.NewErrParamRequired("Tags")) 1470 } 1471 if s.Tags != nil && len(s.Tags) < 1 { 1472 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 1473 } 1474 if s.Tags != nil { 1475 for i, v := range s.Tags { 1476 if v == nil { 1477 continue 1478 } 1479 if err := v.Validate(); err != nil { 1480 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 1481 } 1482 } 1483 } 1484 1485 if invalidParams.Len() > 0 { 1486 return invalidParams 1487 } 1488 return nil 1489 } 1490 1491 // SetResourceArn sets the ResourceArn field's value. 1492 func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 1493 s.ResourceArn = &v 1494 return s 1495 } 1496 1497 // SetTags sets the Tags field's value. 1498 func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 1499 s.Tags = v 1500 return s 1501 } 1502 1503 type TagResourceOutput struct { 1504 _ struct{} `type:"structure"` 1505 } 1506 1507 // String returns the string representation. 1508 // 1509 // API parameter values that are decorated as "sensitive" in the API will not 1510 // be included in the string output. The member name will be present, but the 1511 // value will be replaced with "sensitive". 1512 func (s TagResourceOutput) String() string { 1513 return awsutil.Prettify(s) 1514 } 1515 1516 // GoString returns the string representation. 1517 // 1518 // API parameter values that are decorated as "sensitive" in the API will not 1519 // be included in the string output. The member name will be present, but the 1520 // value will be replaced with "sensitive". 1521 func (s TagResourceOutput) GoString() string { 1522 return s.String() 1523 } 1524 1525 // Tunnel timeout configuration. 1526 type TimeoutConfig struct { 1527 _ struct{} `type:"structure"` 1528 1529 // The maximum amount of time (in minutes) a tunnel can remain open. If not 1530 // specified, maxLifetimeTimeoutMinutes defaults to 720 minutes. Valid values 1531 // are from 1 minute to 12 hours (720 minutes) 1532 MaxLifetimeTimeoutMinutes *int64 `locationName:"maxLifetimeTimeoutMinutes" min:"1" type:"integer"` 1533 } 1534 1535 // String returns the string representation. 1536 // 1537 // API parameter values that are decorated as "sensitive" in the API will not 1538 // be included in the string output. The member name will be present, but the 1539 // value will be replaced with "sensitive". 1540 func (s TimeoutConfig) String() string { 1541 return awsutil.Prettify(s) 1542 } 1543 1544 // GoString returns the string representation. 1545 // 1546 // API parameter values that are decorated as "sensitive" in the API will not 1547 // be included in the string output. The member name will be present, but the 1548 // value will be replaced with "sensitive". 1549 func (s TimeoutConfig) GoString() string { 1550 return s.String() 1551 } 1552 1553 // Validate inspects the fields of the type to determine if they are valid. 1554 func (s *TimeoutConfig) Validate() error { 1555 invalidParams := request.ErrInvalidParams{Context: "TimeoutConfig"} 1556 if s.MaxLifetimeTimeoutMinutes != nil && *s.MaxLifetimeTimeoutMinutes < 1 { 1557 invalidParams.Add(request.NewErrParamMinValue("MaxLifetimeTimeoutMinutes", 1)) 1558 } 1559 1560 if invalidParams.Len() > 0 { 1561 return invalidParams 1562 } 1563 return nil 1564 } 1565 1566 // SetMaxLifetimeTimeoutMinutes sets the MaxLifetimeTimeoutMinutes field's value. 1567 func (s *TimeoutConfig) SetMaxLifetimeTimeoutMinutes(v int64) *TimeoutConfig { 1568 s.MaxLifetimeTimeoutMinutes = &v 1569 return s 1570 } 1571 1572 // A connection between a source computer and a destination device. 1573 type Tunnel struct { 1574 _ struct{} `type:"structure"` 1575 1576 // The time when the tunnel was created. 1577 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` 1578 1579 // A description of the tunnel. 1580 Description *string `locationName:"description" type:"string"` 1581 1582 // The destination configuration that specifies the thing name of the destination 1583 // device and a service name that the local proxy uses to connect to the destination 1584 // application. 1585 DestinationConfig *DestinationConfig `locationName:"destinationConfig" type:"structure"` 1586 1587 // The connection state of the destination application. 1588 DestinationConnectionState *ConnectionState `locationName:"destinationConnectionState" type:"structure"` 1589 1590 // The last time the tunnel was updated. 1591 LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` 1592 1593 // The connection state of the source application. 1594 SourceConnectionState *ConnectionState `locationName:"sourceConnectionState" type:"structure"` 1595 1596 // The status of a tunnel. Valid values are: Open and Closed. 1597 Status *string `locationName:"status" type:"string" enum:"TunnelStatus"` 1598 1599 // A list of tag metadata associated with the secure tunnel. 1600 Tags []*Tag `locationName:"tags" min:"1" type:"list"` 1601 1602 // Timeout configuration for the tunnel. 1603 TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` 1604 1605 // The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id> 1606 TunnelArn *string `locationName:"tunnelArn" min:"1" type:"string"` 1607 1608 // A unique alpha-numeric ID that identifies a tunnel. 1609 TunnelId *string `locationName:"tunnelId" type:"string"` 1610 } 1611 1612 // String returns the string representation. 1613 // 1614 // API parameter values that are decorated as "sensitive" in the API will not 1615 // be included in the string output. The member name will be present, but the 1616 // value will be replaced with "sensitive". 1617 func (s Tunnel) String() string { 1618 return awsutil.Prettify(s) 1619 } 1620 1621 // GoString returns the string representation. 1622 // 1623 // API parameter values that are decorated as "sensitive" in the API will not 1624 // be included in the string output. The member name will be present, but the 1625 // value will be replaced with "sensitive". 1626 func (s Tunnel) GoString() string { 1627 return s.String() 1628 } 1629 1630 // SetCreatedAt sets the CreatedAt field's value. 1631 func (s *Tunnel) SetCreatedAt(v time.Time) *Tunnel { 1632 s.CreatedAt = &v 1633 return s 1634 } 1635 1636 // SetDescription sets the Description field's value. 1637 func (s *Tunnel) SetDescription(v string) *Tunnel { 1638 s.Description = &v 1639 return s 1640 } 1641 1642 // SetDestinationConfig sets the DestinationConfig field's value. 1643 func (s *Tunnel) SetDestinationConfig(v *DestinationConfig) *Tunnel { 1644 s.DestinationConfig = v 1645 return s 1646 } 1647 1648 // SetDestinationConnectionState sets the DestinationConnectionState field's value. 1649 func (s *Tunnel) SetDestinationConnectionState(v *ConnectionState) *Tunnel { 1650 s.DestinationConnectionState = v 1651 return s 1652 } 1653 1654 // SetLastUpdatedAt sets the LastUpdatedAt field's value. 1655 func (s *Tunnel) SetLastUpdatedAt(v time.Time) *Tunnel { 1656 s.LastUpdatedAt = &v 1657 return s 1658 } 1659 1660 // SetSourceConnectionState sets the SourceConnectionState field's value. 1661 func (s *Tunnel) SetSourceConnectionState(v *ConnectionState) *Tunnel { 1662 s.SourceConnectionState = v 1663 return s 1664 } 1665 1666 // SetStatus sets the Status field's value. 1667 func (s *Tunnel) SetStatus(v string) *Tunnel { 1668 s.Status = &v 1669 return s 1670 } 1671 1672 // SetTags sets the Tags field's value. 1673 func (s *Tunnel) SetTags(v []*Tag) *Tunnel { 1674 s.Tags = v 1675 return s 1676 } 1677 1678 // SetTimeoutConfig sets the TimeoutConfig field's value. 1679 func (s *Tunnel) SetTimeoutConfig(v *TimeoutConfig) *Tunnel { 1680 s.TimeoutConfig = v 1681 return s 1682 } 1683 1684 // SetTunnelArn sets the TunnelArn field's value. 1685 func (s *Tunnel) SetTunnelArn(v string) *Tunnel { 1686 s.TunnelArn = &v 1687 return s 1688 } 1689 1690 // SetTunnelId sets the TunnelId field's value. 1691 func (s *Tunnel) SetTunnelId(v string) *Tunnel { 1692 s.TunnelId = &v 1693 return s 1694 } 1695 1696 // Information about the tunnel. 1697 type TunnelSummary struct { 1698 _ struct{} `type:"structure"` 1699 1700 // The time the tunnel was created. 1701 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` 1702 1703 // A description of the tunnel. 1704 Description *string `locationName:"description" type:"string"` 1705 1706 // The time the tunnel was last updated. 1707 LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` 1708 1709 // The status of a tunnel. Valid values are: Open and Closed. 1710 Status *string `locationName:"status" type:"string" enum:"TunnelStatus"` 1711 1712 // The Amazon Resource Name of the tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id> 1713 TunnelArn *string `locationName:"tunnelArn" min:"1" type:"string"` 1714 1715 // The unique alpha-numeric identifier for the tunnel. 1716 TunnelId *string `locationName:"tunnelId" type:"string"` 1717 } 1718 1719 // String returns the string representation. 1720 // 1721 // API parameter values that are decorated as "sensitive" in the API will not 1722 // be included in the string output. The member name will be present, but the 1723 // value will be replaced with "sensitive". 1724 func (s TunnelSummary) String() string { 1725 return awsutil.Prettify(s) 1726 } 1727 1728 // GoString returns the string representation. 1729 // 1730 // API parameter values that are decorated as "sensitive" in the API will not 1731 // be included in the string output. The member name will be present, but the 1732 // value will be replaced with "sensitive". 1733 func (s TunnelSummary) GoString() string { 1734 return s.String() 1735 } 1736 1737 // SetCreatedAt sets the CreatedAt field's value. 1738 func (s *TunnelSummary) SetCreatedAt(v time.Time) *TunnelSummary { 1739 s.CreatedAt = &v 1740 return s 1741 } 1742 1743 // SetDescription sets the Description field's value. 1744 func (s *TunnelSummary) SetDescription(v string) *TunnelSummary { 1745 s.Description = &v 1746 return s 1747 } 1748 1749 // SetLastUpdatedAt sets the LastUpdatedAt field's value. 1750 func (s *TunnelSummary) SetLastUpdatedAt(v time.Time) *TunnelSummary { 1751 s.LastUpdatedAt = &v 1752 return s 1753 } 1754 1755 // SetStatus sets the Status field's value. 1756 func (s *TunnelSummary) SetStatus(v string) *TunnelSummary { 1757 s.Status = &v 1758 return s 1759 } 1760 1761 // SetTunnelArn sets the TunnelArn field's value. 1762 func (s *TunnelSummary) SetTunnelArn(v string) *TunnelSummary { 1763 s.TunnelArn = &v 1764 return s 1765 } 1766 1767 // SetTunnelId sets the TunnelId field's value. 1768 func (s *TunnelSummary) SetTunnelId(v string) *TunnelSummary { 1769 s.TunnelId = &v 1770 return s 1771 } 1772 1773 type UntagResourceInput struct { 1774 _ struct{} `type:"structure"` 1775 1776 // The resource ARN. 1777 // 1778 // ResourceArn is a required field 1779 ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` 1780 1781 // The keys of the tags to remove. 1782 // 1783 // TagKeys is a required field 1784 TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` 1785 } 1786 1787 // String returns the string representation. 1788 // 1789 // API parameter values that are decorated as "sensitive" in the API will not 1790 // be included in the string output. The member name will be present, but the 1791 // value will be replaced with "sensitive". 1792 func (s UntagResourceInput) String() string { 1793 return awsutil.Prettify(s) 1794 } 1795 1796 // GoString returns the string representation. 1797 // 1798 // API parameter values that are decorated as "sensitive" in the API will not 1799 // be included in the string output. The member name will be present, but the 1800 // value will be replaced with "sensitive". 1801 func (s UntagResourceInput) GoString() string { 1802 return s.String() 1803 } 1804 1805 // Validate inspects the fields of the type to determine if they are valid. 1806 func (s *UntagResourceInput) Validate() error { 1807 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 1808 if s.ResourceArn == nil { 1809 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 1810 } 1811 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 1812 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 1813 } 1814 if s.TagKeys == nil { 1815 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 1816 } 1817 1818 if invalidParams.Len() > 0 { 1819 return invalidParams 1820 } 1821 return nil 1822 } 1823 1824 // SetResourceArn sets the ResourceArn field's value. 1825 func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 1826 s.ResourceArn = &v 1827 return s 1828 } 1829 1830 // SetTagKeys sets the TagKeys field's value. 1831 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 1832 s.TagKeys = v 1833 return s 1834 } 1835 1836 type UntagResourceOutput struct { 1837 _ struct{} `type:"structure"` 1838 } 1839 1840 // String returns the string representation. 1841 // 1842 // API parameter values that are decorated as "sensitive" in the API will not 1843 // be included in the string output. The member name will be present, but the 1844 // value will be replaced with "sensitive". 1845 func (s UntagResourceOutput) String() string { 1846 return awsutil.Prettify(s) 1847 } 1848 1849 // GoString returns the string representation. 1850 // 1851 // API parameter values that are decorated as "sensitive" in the API will not 1852 // be included in the string output. The member name will be present, but the 1853 // value will be replaced with "sensitive". 1854 func (s UntagResourceOutput) GoString() string { 1855 return s.String() 1856 } 1857 1858 const ( 1859 // ConnectionStatusConnected is a ConnectionStatus enum value 1860 ConnectionStatusConnected = "CONNECTED" 1861 1862 // ConnectionStatusDisconnected is a ConnectionStatus enum value 1863 ConnectionStatusDisconnected = "DISCONNECTED" 1864 ) 1865 1866 // ConnectionStatus_Values returns all elements of the ConnectionStatus enum 1867 func ConnectionStatus_Values() []string { 1868 return []string{ 1869 ConnectionStatusConnected, 1870 ConnectionStatusDisconnected, 1871 } 1872 } 1873 1874 const ( 1875 // TunnelStatusOpen is a TunnelStatus enum value 1876 TunnelStatusOpen = "OPEN" 1877 1878 // TunnelStatusClosed is a TunnelStatus enum value 1879 TunnelStatusClosed = "CLOSED" 1880 ) 1881 1882 // TunnelStatus_Values returns all elements of the TunnelStatus enum 1883 func TunnelStatus_Values() []string { 1884 return []string{ 1885 TunnelStatusOpen, 1886 TunnelStatusClosed, 1887 } 1888 }