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