1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package transfer 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 14) 15 16const opCreateServer = "CreateServer" 17 18// CreateServerRequest generates a "aws/request.Request" representing the 19// client's request for the CreateServer operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See CreateServer for more information on using the CreateServer 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the CreateServerRequest method. 34// req, resp := client.CreateServerRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer 42func (c *Transfer) CreateServerRequest(input *CreateServerInput) (req *request.Request, output *CreateServerOutput) { 43 op := &request.Operation{ 44 Name: opCreateServer, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CreateServerInput{} 51 } 52 53 output = &CreateServerOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateServer API operation for AWS Transfer Family. 59// 60// Instantiates an autoscaling virtual server based on the selected file transfer 61// protocol in AWS. When you make updates to your file transfer protocol-enabled 62// server or when you work with users, use the service-generated ServerId property 63// that is assigned to the newly created server. 64// 65// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 66// with awserr.Error's Code and Message methods to get detailed information about 67// the error. 68// 69// See the AWS API reference guide for AWS Transfer Family's 70// API operation CreateServer for usage and error information. 71// 72// Returned Error Types: 73// * AccessDeniedException 74// You do not have sufficient access to perform this action. 75// 76// * ServiceUnavailableException 77// The request has failed because the AWS Transfer Family service is not available. 78// 79// * InternalServiceError 80// This exception is thrown when an error occurs in the AWS Transfer Family 81// service. 82// 83// * InvalidRequestException 84// This exception is thrown when the client submits a malformed request. 85// 86// * ResourceExistsException 87// The requested resource does not exist. 88// 89// * ThrottlingException 90// The request was denied due to request throttling. 91// 92// HTTP Status Code: 400 93// 94// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer 95func (c *Transfer) CreateServer(input *CreateServerInput) (*CreateServerOutput, error) { 96 req, out := c.CreateServerRequest(input) 97 return out, req.Send() 98} 99 100// CreateServerWithContext is the same as CreateServer with the addition of 101// the ability to pass a context and additional request options. 102// 103// See CreateServer for details on how to use this API operation. 104// 105// The context must be non-nil and will be used for request cancellation. If 106// the context is nil a panic will occur. In the future the SDK may create 107// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 108// for more information on using Contexts. 109func (c *Transfer) CreateServerWithContext(ctx aws.Context, input *CreateServerInput, opts ...request.Option) (*CreateServerOutput, error) { 110 req, out := c.CreateServerRequest(input) 111 req.SetContext(ctx) 112 req.ApplyOptions(opts...) 113 return out, req.Send() 114} 115 116const opCreateUser = "CreateUser" 117 118// CreateUserRequest generates a "aws/request.Request" representing the 119// client's request for the CreateUser operation. The "output" return 120// value will be populated with the request's response once the request completes 121// successfully. 122// 123// Use "Send" method on the returned Request to send the API call to the service. 124// the "output" return value is not valid until after Send returns without error. 125// 126// See CreateUser for more information on using the CreateUser 127// API call, and error handling. 128// 129// This method is useful when you want to inject custom logic or configuration 130// into the SDK's request lifecycle. Such as custom headers, or retry logic. 131// 132// 133// // Example sending a request using the CreateUserRequest method. 134// req, resp := client.CreateUserRequest(params) 135// 136// err := req.Send() 137// if err == nil { // resp is now filled 138// fmt.Println(resp) 139// } 140// 141// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser 142func (c *Transfer) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { 143 op := &request.Operation{ 144 Name: opCreateUser, 145 HTTPMethod: "POST", 146 HTTPPath: "/", 147 } 148 149 if input == nil { 150 input = &CreateUserInput{} 151 } 152 153 output = &CreateUserOutput{} 154 req = c.newRequest(op, input, output) 155 return 156} 157 158// CreateUser API operation for AWS Transfer Family. 159// 160// Creates a user and associates them with an existing file transfer protocol-enabled 161// server. You can only create and associate users with servers that have the 162// IdentityProviderType set to SERVICE_MANAGED. Using parameters for CreateUser, 163// you can specify the user name, set the home directory, store the user's public 164// key, and assign the user's AWS Identity and Access Management (IAM) role. 165// You can also optionally add a scope-down policy, and assign metadata with 166// tags that can be used to group and search for users. 167// 168// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 169// with awserr.Error's Code and Message methods to get detailed information about 170// the error. 171// 172// See the AWS API reference guide for AWS Transfer Family's 173// API operation CreateUser for usage and error information. 174// 175// Returned Error Types: 176// * ServiceUnavailableException 177// The request has failed because the AWS Transfer Family service is not available. 178// 179// * InternalServiceError 180// This exception is thrown when an error occurs in the AWS Transfer Family 181// service. 182// 183// * InvalidRequestException 184// This exception is thrown when the client submits a malformed request. 185// 186// * ResourceExistsException 187// The requested resource does not exist. 188// 189// * ResourceNotFoundException 190// This exception is thrown when a resource is not found by the AWS Transfer 191// Family service. 192// 193// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser 194func (c *Transfer) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { 195 req, out := c.CreateUserRequest(input) 196 return out, req.Send() 197} 198 199// CreateUserWithContext is the same as CreateUser with the addition of 200// the ability to pass a context and additional request options. 201// 202// See CreateUser for details on how to use this API operation. 203// 204// The context must be non-nil and will be used for request cancellation. If 205// the context is nil a panic will occur. In the future the SDK may create 206// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 207// for more information on using Contexts. 208func (c *Transfer) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { 209 req, out := c.CreateUserRequest(input) 210 req.SetContext(ctx) 211 req.ApplyOptions(opts...) 212 return out, req.Send() 213} 214 215const opDeleteServer = "DeleteServer" 216 217// DeleteServerRequest generates a "aws/request.Request" representing the 218// client's request for the DeleteServer operation. The "output" return 219// value will be populated with the request's response once the request completes 220// successfully. 221// 222// Use "Send" method on the returned Request to send the API call to the service. 223// the "output" return value is not valid until after Send returns without error. 224// 225// See DeleteServer for more information on using the DeleteServer 226// API call, and error handling. 227// 228// This method is useful when you want to inject custom logic or configuration 229// into the SDK's request lifecycle. Such as custom headers, or retry logic. 230// 231// 232// // Example sending a request using the DeleteServerRequest method. 233// req, resp := client.DeleteServerRequest(params) 234// 235// err := req.Send() 236// if err == nil { // resp is now filled 237// fmt.Println(resp) 238// } 239// 240// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer 241func (c *Transfer) DeleteServerRequest(input *DeleteServerInput) (req *request.Request, output *DeleteServerOutput) { 242 op := &request.Operation{ 243 Name: opDeleteServer, 244 HTTPMethod: "POST", 245 HTTPPath: "/", 246 } 247 248 if input == nil { 249 input = &DeleteServerInput{} 250 } 251 252 output = &DeleteServerOutput{} 253 req = c.newRequest(op, input, output) 254 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 255 return 256} 257 258// DeleteServer API operation for AWS Transfer Family. 259// 260// Deletes the file transfer protocol-enabled server that you specify. 261// 262// No response returns from this operation. 263// 264// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 265// with awserr.Error's Code and Message methods to get detailed information about 266// the error. 267// 268// See the AWS API reference guide for AWS Transfer Family's 269// API operation DeleteServer for usage and error information. 270// 271// Returned Error Types: 272// * AccessDeniedException 273// You do not have sufficient access to perform this action. 274// 275// * ServiceUnavailableException 276// The request has failed because the AWS Transfer Family service is not available. 277// 278// * InternalServiceError 279// This exception is thrown when an error occurs in the AWS Transfer Family 280// service. 281// 282// * InvalidRequestException 283// This exception is thrown when the client submits a malformed request. 284// 285// * ResourceNotFoundException 286// This exception is thrown when a resource is not found by the AWS Transfer 287// Family service. 288// 289// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer 290func (c *Transfer) DeleteServer(input *DeleteServerInput) (*DeleteServerOutput, error) { 291 req, out := c.DeleteServerRequest(input) 292 return out, req.Send() 293} 294 295// DeleteServerWithContext is the same as DeleteServer with the addition of 296// the ability to pass a context and additional request options. 297// 298// See DeleteServer for details on how to use this API operation. 299// 300// The context must be non-nil and will be used for request cancellation. If 301// the context is nil a panic will occur. In the future the SDK may create 302// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 303// for more information on using Contexts. 304func (c *Transfer) DeleteServerWithContext(ctx aws.Context, input *DeleteServerInput, opts ...request.Option) (*DeleteServerOutput, error) { 305 req, out := c.DeleteServerRequest(input) 306 req.SetContext(ctx) 307 req.ApplyOptions(opts...) 308 return out, req.Send() 309} 310 311const opDeleteSshPublicKey = "DeleteSshPublicKey" 312 313// DeleteSshPublicKeyRequest generates a "aws/request.Request" representing the 314// client's request for the DeleteSshPublicKey operation. The "output" return 315// value will be populated with the request's response once the request completes 316// successfully. 317// 318// Use "Send" method on the returned Request to send the API call to the service. 319// the "output" return value is not valid until after Send returns without error. 320// 321// See DeleteSshPublicKey for more information on using the DeleteSshPublicKey 322// API call, and error handling. 323// 324// This method is useful when you want to inject custom logic or configuration 325// into the SDK's request lifecycle. Such as custom headers, or retry logic. 326// 327// 328// // Example sending a request using the DeleteSshPublicKeyRequest method. 329// req, resp := client.DeleteSshPublicKeyRequest(params) 330// 331// err := req.Send() 332// if err == nil { // resp is now filled 333// fmt.Println(resp) 334// } 335// 336// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey 337func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (req *request.Request, output *DeleteSshPublicKeyOutput) { 338 op := &request.Operation{ 339 Name: opDeleteSshPublicKey, 340 HTTPMethod: "POST", 341 HTTPPath: "/", 342 } 343 344 if input == nil { 345 input = &DeleteSshPublicKeyInput{} 346 } 347 348 output = &DeleteSshPublicKeyOutput{} 349 req = c.newRequest(op, input, output) 350 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 351 return 352} 353 354// DeleteSshPublicKey API operation for AWS Transfer Family. 355// 356// Deletes a user's Secure Shell (SSH) public key. 357// 358// No response is returned from this operation. 359// 360// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 361// with awserr.Error's Code and Message methods to get detailed information about 362// the error. 363// 364// See the AWS API reference guide for AWS Transfer Family's 365// API operation DeleteSshPublicKey for usage and error information. 366// 367// Returned Error Types: 368// * ServiceUnavailableException 369// The request has failed because the AWS Transfer Family service is not available. 370// 371// * InternalServiceError 372// This exception is thrown when an error occurs in the AWS Transfer Family 373// service. 374// 375// * InvalidRequestException 376// This exception is thrown when the client submits a malformed request. 377// 378// * ResourceNotFoundException 379// This exception is thrown when a resource is not found by the AWS Transfer 380// Family service. 381// 382// * ThrottlingException 383// The request was denied due to request throttling. 384// 385// HTTP Status Code: 400 386// 387// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey 388func (c *Transfer) DeleteSshPublicKey(input *DeleteSshPublicKeyInput) (*DeleteSshPublicKeyOutput, error) { 389 req, out := c.DeleteSshPublicKeyRequest(input) 390 return out, req.Send() 391} 392 393// DeleteSshPublicKeyWithContext is the same as DeleteSshPublicKey with the addition of 394// the ability to pass a context and additional request options. 395// 396// See DeleteSshPublicKey for details on how to use this API operation. 397// 398// The context must be non-nil and will be used for request cancellation. If 399// the context is nil a panic will occur. In the future the SDK may create 400// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 401// for more information on using Contexts. 402func (c *Transfer) DeleteSshPublicKeyWithContext(ctx aws.Context, input *DeleteSshPublicKeyInput, opts ...request.Option) (*DeleteSshPublicKeyOutput, error) { 403 req, out := c.DeleteSshPublicKeyRequest(input) 404 req.SetContext(ctx) 405 req.ApplyOptions(opts...) 406 return out, req.Send() 407} 408 409const opDeleteUser = "DeleteUser" 410 411// DeleteUserRequest generates a "aws/request.Request" representing the 412// client's request for the DeleteUser operation. The "output" return 413// value will be populated with the request's response once the request completes 414// successfully. 415// 416// Use "Send" method on the returned Request to send the API call to the service. 417// the "output" return value is not valid until after Send returns without error. 418// 419// See DeleteUser for more information on using the DeleteUser 420// API call, and error handling. 421// 422// This method is useful when you want to inject custom logic or configuration 423// into the SDK's request lifecycle. Such as custom headers, or retry logic. 424// 425// 426// // Example sending a request using the DeleteUserRequest method. 427// req, resp := client.DeleteUserRequest(params) 428// 429// err := req.Send() 430// if err == nil { // resp is now filled 431// fmt.Println(resp) 432// } 433// 434// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser 435func (c *Transfer) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { 436 op := &request.Operation{ 437 Name: opDeleteUser, 438 HTTPMethod: "POST", 439 HTTPPath: "/", 440 } 441 442 if input == nil { 443 input = &DeleteUserInput{} 444 } 445 446 output = &DeleteUserOutput{} 447 req = c.newRequest(op, input, output) 448 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 449 return 450} 451 452// DeleteUser API operation for AWS Transfer Family. 453// 454// Deletes the user belonging to a file transfer protocol-enabled server you 455// specify. 456// 457// No response returns from this operation. 458// 459// When you delete a user from a server, the user's information is lost. 460// 461// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 462// with awserr.Error's Code and Message methods to get detailed information about 463// the error. 464// 465// See the AWS API reference guide for AWS Transfer Family's 466// API operation DeleteUser for usage and error information. 467// 468// Returned Error Types: 469// * ServiceUnavailableException 470// The request has failed because the AWS Transfer Family service is not available. 471// 472// * InternalServiceError 473// This exception is thrown when an error occurs in the AWS Transfer Family 474// service. 475// 476// * InvalidRequestException 477// This exception is thrown when the client submits a malformed request. 478// 479// * ResourceNotFoundException 480// This exception is thrown when a resource is not found by the AWS Transfer 481// Family service. 482// 483// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser 484func (c *Transfer) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { 485 req, out := c.DeleteUserRequest(input) 486 return out, req.Send() 487} 488 489// DeleteUserWithContext is the same as DeleteUser with the addition of 490// the ability to pass a context and additional request options. 491// 492// See DeleteUser for details on how to use this API operation. 493// 494// The context must be non-nil and will be used for request cancellation. If 495// the context is nil a panic will occur. In the future the SDK may create 496// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 497// for more information on using Contexts. 498func (c *Transfer) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { 499 req, out := c.DeleteUserRequest(input) 500 req.SetContext(ctx) 501 req.ApplyOptions(opts...) 502 return out, req.Send() 503} 504 505const opDescribeSecurityPolicy = "DescribeSecurityPolicy" 506 507// DescribeSecurityPolicyRequest generates a "aws/request.Request" representing the 508// client's request for the DescribeSecurityPolicy operation. The "output" return 509// value will be populated with the request's response once the request completes 510// successfully. 511// 512// Use "Send" method on the returned Request to send the API call to the service. 513// the "output" return value is not valid until after Send returns without error. 514// 515// See DescribeSecurityPolicy for more information on using the DescribeSecurityPolicy 516// API call, and error handling. 517// 518// This method is useful when you want to inject custom logic or configuration 519// into the SDK's request lifecycle. Such as custom headers, or retry logic. 520// 521// 522// // Example sending a request using the DescribeSecurityPolicyRequest method. 523// req, resp := client.DescribeSecurityPolicyRequest(params) 524// 525// err := req.Send() 526// if err == nil { // resp is now filled 527// fmt.Println(resp) 528// } 529// 530// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeSecurityPolicy 531func (c *Transfer) DescribeSecurityPolicyRequest(input *DescribeSecurityPolicyInput) (req *request.Request, output *DescribeSecurityPolicyOutput) { 532 op := &request.Operation{ 533 Name: opDescribeSecurityPolicy, 534 HTTPMethod: "POST", 535 HTTPPath: "/", 536 } 537 538 if input == nil { 539 input = &DescribeSecurityPolicyInput{} 540 } 541 542 output = &DescribeSecurityPolicyOutput{} 543 req = c.newRequest(op, input, output) 544 return 545} 546 547// DescribeSecurityPolicy API operation for AWS Transfer Family. 548// 549// Describes the security policy that is attached to your file transfer protocol-enabled 550// server. The response contains a description of the security policy's properties. 551// For more information about security policies, see Working with security policies 552// (https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html). 553// 554// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 555// with awserr.Error's Code and Message methods to get detailed information about 556// the error. 557// 558// See the AWS API reference guide for AWS Transfer Family's 559// API operation DescribeSecurityPolicy for usage and error information. 560// 561// Returned Error Types: 562// * ServiceUnavailableException 563// The request has failed because the AWS Transfer Family service is not available. 564// 565// * InternalServiceError 566// This exception is thrown when an error occurs in the AWS Transfer Family 567// service. 568// 569// * InvalidRequestException 570// This exception is thrown when the client submits a malformed request. 571// 572// * ResourceNotFoundException 573// This exception is thrown when a resource is not found by the AWS Transfer 574// Family service. 575// 576// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeSecurityPolicy 577func (c *Transfer) DescribeSecurityPolicy(input *DescribeSecurityPolicyInput) (*DescribeSecurityPolicyOutput, error) { 578 req, out := c.DescribeSecurityPolicyRequest(input) 579 return out, req.Send() 580} 581 582// DescribeSecurityPolicyWithContext is the same as DescribeSecurityPolicy with the addition of 583// the ability to pass a context and additional request options. 584// 585// See DescribeSecurityPolicy for details on how to use this API operation. 586// 587// The context must be non-nil and will be used for request cancellation. If 588// the context is nil a panic will occur. In the future the SDK may create 589// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 590// for more information on using Contexts. 591func (c *Transfer) DescribeSecurityPolicyWithContext(ctx aws.Context, input *DescribeSecurityPolicyInput, opts ...request.Option) (*DescribeSecurityPolicyOutput, error) { 592 req, out := c.DescribeSecurityPolicyRequest(input) 593 req.SetContext(ctx) 594 req.ApplyOptions(opts...) 595 return out, req.Send() 596} 597 598const opDescribeServer = "DescribeServer" 599 600// DescribeServerRequest generates a "aws/request.Request" representing the 601// client's request for the DescribeServer operation. The "output" return 602// value will be populated with the request's response once the request completes 603// successfully. 604// 605// Use "Send" method on the returned Request to send the API call to the service. 606// the "output" return value is not valid until after Send returns without error. 607// 608// See DescribeServer for more information on using the DescribeServer 609// API call, and error handling. 610// 611// This method is useful when you want to inject custom logic or configuration 612// into the SDK's request lifecycle. Such as custom headers, or retry logic. 613// 614// 615// // Example sending a request using the DescribeServerRequest method. 616// req, resp := client.DescribeServerRequest(params) 617// 618// err := req.Send() 619// if err == nil { // resp is now filled 620// fmt.Println(resp) 621// } 622// 623// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer 624func (c *Transfer) DescribeServerRequest(input *DescribeServerInput) (req *request.Request, output *DescribeServerOutput) { 625 op := &request.Operation{ 626 Name: opDescribeServer, 627 HTTPMethod: "POST", 628 HTTPPath: "/", 629 } 630 631 if input == nil { 632 input = &DescribeServerInput{} 633 } 634 635 output = &DescribeServerOutput{} 636 req = c.newRequest(op, input, output) 637 return 638} 639 640// DescribeServer API operation for AWS Transfer Family. 641// 642// Describes a file transfer protocol-enabled server that you specify by passing 643// the ServerId parameter. 644// 645// The response contains a description of a server's properties. When you set 646// EndpointType to VPC, the response will contain the EndpointDetails. 647// 648// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 649// with awserr.Error's Code and Message methods to get detailed information about 650// the error. 651// 652// See the AWS API reference guide for AWS Transfer Family's 653// API operation DescribeServer for usage and error information. 654// 655// Returned Error Types: 656// * ServiceUnavailableException 657// The request has failed because the AWS Transfer Family service is not available. 658// 659// * InternalServiceError 660// This exception is thrown when an error occurs in the AWS Transfer Family 661// service. 662// 663// * InvalidRequestException 664// This exception is thrown when the client submits a malformed request. 665// 666// * ResourceNotFoundException 667// This exception is thrown when a resource is not found by the AWS Transfer 668// Family service. 669// 670// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer 671func (c *Transfer) DescribeServer(input *DescribeServerInput) (*DescribeServerOutput, error) { 672 req, out := c.DescribeServerRequest(input) 673 return out, req.Send() 674} 675 676// DescribeServerWithContext is the same as DescribeServer with the addition of 677// the ability to pass a context and additional request options. 678// 679// See DescribeServer for details on how to use this API operation. 680// 681// The context must be non-nil and will be used for request cancellation. If 682// the context is nil a panic will occur. In the future the SDK may create 683// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 684// for more information on using Contexts. 685func (c *Transfer) DescribeServerWithContext(ctx aws.Context, input *DescribeServerInput, opts ...request.Option) (*DescribeServerOutput, error) { 686 req, out := c.DescribeServerRequest(input) 687 req.SetContext(ctx) 688 req.ApplyOptions(opts...) 689 return out, req.Send() 690} 691 692const opDescribeUser = "DescribeUser" 693 694// DescribeUserRequest generates a "aws/request.Request" representing the 695// client's request for the DescribeUser operation. The "output" return 696// value will be populated with the request's response once the request completes 697// successfully. 698// 699// Use "Send" method on the returned Request to send the API call to the service. 700// the "output" return value is not valid until after Send returns without error. 701// 702// See DescribeUser for more information on using the DescribeUser 703// API call, and error handling. 704// 705// This method is useful when you want to inject custom logic or configuration 706// into the SDK's request lifecycle. Such as custom headers, or retry logic. 707// 708// 709// // Example sending a request using the DescribeUserRequest method. 710// req, resp := client.DescribeUserRequest(params) 711// 712// err := req.Send() 713// if err == nil { // resp is now filled 714// fmt.Println(resp) 715// } 716// 717// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser 718func (c *Transfer) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) { 719 op := &request.Operation{ 720 Name: opDescribeUser, 721 HTTPMethod: "POST", 722 HTTPPath: "/", 723 } 724 725 if input == nil { 726 input = &DescribeUserInput{} 727 } 728 729 output = &DescribeUserOutput{} 730 req = c.newRequest(op, input, output) 731 return 732} 733 734// DescribeUser API operation for AWS Transfer Family. 735// 736// Describes the user assigned to the specific file transfer protocol-enabled 737// server, as identified by its ServerId property. 738// 739// The response from this call returns the properties of the user associated 740// with the ServerId value that was specified. 741// 742// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 743// with awserr.Error's Code and Message methods to get detailed information about 744// the error. 745// 746// See the AWS API reference guide for AWS Transfer Family's 747// API operation DescribeUser for usage and error information. 748// 749// Returned Error Types: 750// * ServiceUnavailableException 751// The request has failed because the AWS Transfer Family service is not available. 752// 753// * InternalServiceError 754// This exception is thrown when an error occurs in the AWS Transfer Family 755// service. 756// 757// * InvalidRequestException 758// This exception is thrown when the client submits a malformed request. 759// 760// * ResourceNotFoundException 761// This exception is thrown when a resource is not found by the AWS Transfer 762// Family service. 763// 764// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser 765func (c *Transfer) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) { 766 req, out := c.DescribeUserRequest(input) 767 return out, req.Send() 768} 769 770// DescribeUserWithContext is the same as DescribeUser with the addition of 771// the ability to pass a context and additional request options. 772// 773// See DescribeUser for details on how to use this API operation. 774// 775// The context must be non-nil and will be used for request cancellation. If 776// the context is nil a panic will occur. In the future the SDK may create 777// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 778// for more information on using Contexts. 779func (c *Transfer) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) { 780 req, out := c.DescribeUserRequest(input) 781 req.SetContext(ctx) 782 req.ApplyOptions(opts...) 783 return out, req.Send() 784} 785 786const opImportSshPublicKey = "ImportSshPublicKey" 787 788// ImportSshPublicKeyRequest generates a "aws/request.Request" representing the 789// client's request for the ImportSshPublicKey operation. The "output" return 790// value will be populated with the request's response once the request completes 791// successfully. 792// 793// Use "Send" method on the returned Request to send the API call to the service. 794// the "output" return value is not valid until after Send returns without error. 795// 796// See ImportSshPublicKey for more information on using the ImportSshPublicKey 797// API call, and error handling. 798// 799// This method is useful when you want to inject custom logic or configuration 800// into the SDK's request lifecycle. Such as custom headers, or retry logic. 801// 802// 803// // Example sending a request using the ImportSshPublicKeyRequest method. 804// req, resp := client.ImportSshPublicKeyRequest(params) 805// 806// err := req.Send() 807// if err == nil { // resp is now filled 808// fmt.Println(resp) 809// } 810// 811// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey 812func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (req *request.Request, output *ImportSshPublicKeyOutput) { 813 op := &request.Operation{ 814 Name: opImportSshPublicKey, 815 HTTPMethod: "POST", 816 HTTPPath: "/", 817 } 818 819 if input == nil { 820 input = &ImportSshPublicKeyInput{} 821 } 822 823 output = &ImportSshPublicKeyOutput{} 824 req = c.newRequest(op, input, output) 825 return 826} 827 828// ImportSshPublicKey API operation for AWS Transfer Family. 829// 830// Adds a Secure Shell (SSH) public key to a user account identified by a UserName 831// value assigned to the specific file transfer protocol-enabled server, identified 832// by ServerId. 833// 834// The response returns the UserName value, the ServerId value, and the name 835// of the SshPublicKeyId. 836// 837// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 838// with awserr.Error's Code and Message methods to get detailed information about 839// the error. 840// 841// See the AWS API reference guide for AWS Transfer Family's 842// API operation ImportSshPublicKey for usage and error information. 843// 844// Returned Error Types: 845// * ServiceUnavailableException 846// The request has failed because the AWS Transfer Family service is not available. 847// 848// * InternalServiceError 849// This exception is thrown when an error occurs in the AWS Transfer Family 850// service. 851// 852// * InvalidRequestException 853// This exception is thrown when the client submits a malformed request. 854// 855// * ResourceExistsException 856// The requested resource does not exist. 857// 858// * ResourceNotFoundException 859// This exception is thrown when a resource is not found by the AWS Transfer 860// Family service. 861// 862// * ThrottlingException 863// The request was denied due to request throttling. 864// 865// HTTP Status Code: 400 866// 867// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey 868func (c *Transfer) ImportSshPublicKey(input *ImportSshPublicKeyInput) (*ImportSshPublicKeyOutput, error) { 869 req, out := c.ImportSshPublicKeyRequest(input) 870 return out, req.Send() 871} 872 873// ImportSshPublicKeyWithContext is the same as ImportSshPublicKey with the addition of 874// the ability to pass a context and additional request options. 875// 876// See ImportSshPublicKey for details on how to use this API operation. 877// 878// The context must be non-nil and will be used for request cancellation. If 879// the context is nil a panic will occur. In the future the SDK may create 880// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 881// for more information on using Contexts. 882func (c *Transfer) ImportSshPublicKeyWithContext(ctx aws.Context, input *ImportSshPublicKeyInput, opts ...request.Option) (*ImportSshPublicKeyOutput, error) { 883 req, out := c.ImportSshPublicKeyRequest(input) 884 req.SetContext(ctx) 885 req.ApplyOptions(opts...) 886 return out, req.Send() 887} 888 889const opListSecurityPolicies = "ListSecurityPolicies" 890 891// ListSecurityPoliciesRequest generates a "aws/request.Request" representing the 892// client's request for the ListSecurityPolicies operation. The "output" return 893// value will be populated with the request's response once the request completes 894// successfully. 895// 896// Use "Send" method on the returned Request to send the API call to the service. 897// the "output" return value is not valid until after Send returns without error. 898// 899// See ListSecurityPolicies for more information on using the ListSecurityPolicies 900// API call, and error handling. 901// 902// This method is useful when you want to inject custom logic or configuration 903// into the SDK's request lifecycle. Such as custom headers, or retry logic. 904// 905// 906// // Example sending a request using the ListSecurityPoliciesRequest method. 907// req, resp := client.ListSecurityPoliciesRequest(params) 908// 909// err := req.Send() 910// if err == nil { // resp is now filled 911// fmt.Println(resp) 912// } 913// 914// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListSecurityPolicies 915func (c *Transfer) ListSecurityPoliciesRequest(input *ListSecurityPoliciesInput) (req *request.Request, output *ListSecurityPoliciesOutput) { 916 op := &request.Operation{ 917 Name: opListSecurityPolicies, 918 HTTPMethod: "POST", 919 HTTPPath: "/", 920 Paginator: &request.Paginator{ 921 InputTokens: []string{"NextToken"}, 922 OutputTokens: []string{"NextToken"}, 923 LimitToken: "MaxResults", 924 TruncationToken: "", 925 }, 926 } 927 928 if input == nil { 929 input = &ListSecurityPoliciesInput{} 930 } 931 932 output = &ListSecurityPoliciesOutput{} 933 req = c.newRequest(op, input, output) 934 return 935} 936 937// ListSecurityPolicies API operation for AWS Transfer Family. 938// 939// Lists the security policies that are attached to your file transfer protocol-enabled 940// servers. 941// 942// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 943// with awserr.Error's Code and Message methods to get detailed information about 944// the error. 945// 946// See the AWS API reference guide for AWS Transfer Family's 947// API operation ListSecurityPolicies for usage and error information. 948// 949// Returned Error Types: 950// * ServiceUnavailableException 951// The request has failed because the AWS Transfer Family service is not available. 952// 953// * InternalServiceError 954// This exception is thrown when an error occurs in the AWS Transfer Family 955// service. 956// 957// * InvalidNextTokenException 958// The NextToken parameter that was passed is invalid. 959// 960// * InvalidRequestException 961// This exception is thrown when the client submits a malformed request. 962// 963// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListSecurityPolicies 964func (c *Transfer) ListSecurityPolicies(input *ListSecurityPoliciesInput) (*ListSecurityPoliciesOutput, error) { 965 req, out := c.ListSecurityPoliciesRequest(input) 966 return out, req.Send() 967} 968 969// ListSecurityPoliciesWithContext is the same as ListSecurityPolicies with the addition of 970// the ability to pass a context and additional request options. 971// 972// See ListSecurityPolicies for details on how to use this API operation. 973// 974// The context must be non-nil and will be used for request cancellation. If 975// the context is nil a panic will occur. In the future the SDK may create 976// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 977// for more information on using Contexts. 978func (c *Transfer) ListSecurityPoliciesWithContext(ctx aws.Context, input *ListSecurityPoliciesInput, opts ...request.Option) (*ListSecurityPoliciesOutput, error) { 979 req, out := c.ListSecurityPoliciesRequest(input) 980 req.SetContext(ctx) 981 req.ApplyOptions(opts...) 982 return out, req.Send() 983} 984 985// ListSecurityPoliciesPages iterates over the pages of a ListSecurityPolicies operation, 986// calling the "fn" function with the response data for each page. To stop 987// iterating, return false from the fn function. 988// 989// See ListSecurityPolicies method for more information on how to use this operation. 990// 991// Note: This operation can generate multiple requests to a service. 992// 993// // Example iterating over at most 3 pages of a ListSecurityPolicies operation. 994// pageNum := 0 995// err := client.ListSecurityPoliciesPages(params, 996// func(page *transfer.ListSecurityPoliciesOutput, lastPage bool) bool { 997// pageNum++ 998// fmt.Println(page) 999// return pageNum <= 3 1000// }) 1001// 1002func (c *Transfer) ListSecurityPoliciesPages(input *ListSecurityPoliciesInput, fn func(*ListSecurityPoliciesOutput, bool) bool) error { 1003 return c.ListSecurityPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) 1004} 1005 1006// ListSecurityPoliciesPagesWithContext same as ListSecurityPoliciesPages except 1007// it takes a Context and allows setting request options on the pages. 1008// 1009// The context must be non-nil and will be used for request cancellation. If 1010// the context is nil a panic will occur. In the future the SDK may create 1011// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1012// for more information on using Contexts. 1013func (c *Transfer) ListSecurityPoliciesPagesWithContext(ctx aws.Context, input *ListSecurityPoliciesInput, fn func(*ListSecurityPoliciesOutput, bool) bool, opts ...request.Option) error { 1014 p := request.Pagination{ 1015 NewRequest: func() (*request.Request, error) { 1016 var inCpy *ListSecurityPoliciesInput 1017 if input != nil { 1018 tmp := *input 1019 inCpy = &tmp 1020 } 1021 req, _ := c.ListSecurityPoliciesRequest(inCpy) 1022 req.SetContext(ctx) 1023 req.ApplyOptions(opts...) 1024 return req, nil 1025 }, 1026 } 1027 1028 for p.Next() { 1029 if !fn(p.Page().(*ListSecurityPoliciesOutput), !p.HasNextPage()) { 1030 break 1031 } 1032 } 1033 1034 return p.Err() 1035} 1036 1037const opListServers = "ListServers" 1038 1039// ListServersRequest generates a "aws/request.Request" representing the 1040// client's request for the ListServers operation. The "output" return 1041// value will be populated with the request's response once the request completes 1042// successfully. 1043// 1044// Use "Send" method on the returned Request to send the API call to the service. 1045// the "output" return value is not valid until after Send returns without error. 1046// 1047// See ListServers for more information on using the ListServers 1048// API call, and error handling. 1049// 1050// This method is useful when you want to inject custom logic or configuration 1051// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1052// 1053// 1054// // Example sending a request using the ListServersRequest method. 1055// req, resp := client.ListServersRequest(params) 1056// 1057// err := req.Send() 1058// if err == nil { // resp is now filled 1059// fmt.Println(resp) 1060// } 1061// 1062// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers 1063func (c *Transfer) ListServersRequest(input *ListServersInput) (req *request.Request, output *ListServersOutput) { 1064 op := &request.Operation{ 1065 Name: opListServers, 1066 HTTPMethod: "POST", 1067 HTTPPath: "/", 1068 Paginator: &request.Paginator{ 1069 InputTokens: []string{"NextToken"}, 1070 OutputTokens: []string{"NextToken"}, 1071 LimitToken: "MaxResults", 1072 TruncationToken: "", 1073 }, 1074 } 1075 1076 if input == nil { 1077 input = &ListServersInput{} 1078 } 1079 1080 output = &ListServersOutput{} 1081 req = c.newRequest(op, input, output) 1082 return 1083} 1084 1085// ListServers API operation for AWS Transfer Family. 1086// 1087// Lists the file transfer protocol-enabled servers that are associated with 1088// your AWS account. 1089// 1090// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1091// with awserr.Error's Code and Message methods to get detailed information about 1092// the error. 1093// 1094// See the AWS API reference guide for AWS Transfer Family's 1095// API operation ListServers for usage and error information. 1096// 1097// Returned Error Types: 1098// * ServiceUnavailableException 1099// The request has failed because the AWS Transfer Family service is not available. 1100// 1101// * InternalServiceError 1102// This exception is thrown when an error occurs in the AWS Transfer Family 1103// service. 1104// 1105// * InvalidNextTokenException 1106// The NextToken parameter that was passed is invalid. 1107// 1108// * InvalidRequestException 1109// This exception is thrown when the client submits a malformed request. 1110// 1111// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers 1112func (c *Transfer) ListServers(input *ListServersInput) (*ListServersOutput, error) { 1113 req, out := c.ListServersRequest(input) 1114 return out, req.Send() 1115} 1116 1117// ListServersWithContext is the same as ListServers with the addition of 1118// the ability to pass a context and additional request options. 1119// 1120// See ListServers for details on how to use this API operation. 1121// 1122// The context must be non-nil and will be used for request cancellation. If 1123// the context is nil a panic will occur. In the future the SDK may create 1124// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1125// for more information on using Contexts. 1126func (c *Transfer) ListServersWithContext(ctx aws.Context, input *ListServersInput, opts ...request.Option) (*ListServersOutput, error) { 1127 req, out := c.ListServersRequest(input) 1128 req.SetContext(ctx) 1129 req.ApplyOptions(opts...) 1130 return out, req.Send() 1131} 1132 1133// ListServersPages iterates over the pages of a ListServers operation, 1134// calling the "fn" function with the response data for each page. To stop 1135// iterating, return false from the fn function. 1136// 1137// See ListServers method for more information on how to use this operation. 1138// 1139// Note: This operation can generate multiple requests to a service. 1140// 1141// // Example iterating over at most 3 pages of a ListServers operation. 1142// pageNum := 0 1143// err := client.ListServersPages(params, 1144// func(page *transfer.ListServersOutput, lastPage bool) bool { 1145// pageNum++ 1146// fmt.Println(page) 1147// return pageNum <= 3 1148// }) 1149// 1150func (c *Transfer) ListServersPages(input *ListServersInput, fn func(*ListServersOutput, bool) bool) error { 1151 return c.ListServersPagesWithContext(aws.BackgroundContext(), input, fn) 1152} 1153 1154// ListServersPagesWithContext same as ListServersPages except 1155// it takes a Context and allows setting request options on the pages. 1156// 1157// The context must be non-nil and will be used for request cancellation. If 1158// the context is nil a panic will occur. In the future the SDK may create 1159// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1160// for more information on using Contexts. 1161func (c *Transfer) ListServersPagesWithContext(ctx aws.Context, input *ListServersInput, fn func(*ListServersOutput, bool) bool, opts ...request.Option) error { 1162 p := request.Pagination{ 1163 NewRequest: func() (*request.Request, error) { 1164 var inCpy *ListServersInput 1165 if input != nil { 1166 tmp := *input 1167 inCpy = &tmp 1168 } 1169 req, _ := c.ListServersRequest(inCpy) 1170 req.SetContext(ctx) 1171 req.ApplyOptions(opts...) 1172 return req, nil 1173 }, 1174 } 1175 1176 for p.Next() { 1177 if !fn(p.Page().(*ListServersOutput), !p.HasNextPage()) { 1178 break 1179 } 1180 } 1181 1182 return p.Err() 1183} 1184 1185const opListTagsForResource = "ListTagsForResource" 1186 1187// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1188// client's request for the ListTagsForResource operation. The "output" return 1189// value will be populated with the request's response once the request completes 1190// successfully. 1191// 1192// Use "Send" method on the returned Request to send the API call to the service. 1193// the "output" return value is not valid until after Send returns without error. 1194// 1195// See ListTagsForResource for more information on using the ListTagsForResource 1196// API call, and error handling. 1197// 1198// This method is useful when you want to inject custom logic or configuration 1199// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1200// 1201// 1202// // Example sending a request using the ListTagsForResourceRequest method. 1203// req, resp := client.ListTagsForResourceRequest(params) 1204// 1205// err := req.Send() 1206// if err == nil { // resp is now filled 1207// fmt.Println(resp) 1208// } 1209// 1210// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource 1211func (c *Transfer) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1212 op := &request.Operation{ 1213 Name: opListTagsForResource, 1214 HTTPMethod: "POST", 1215 HTTPPath: "/", 1216 Paginator: &request.Paginator{ 1217 InputTokens: []string{"NextToken"}, 1218 OutputTokens: []string{"NextToken"}, 1219 LimitToken: "MaxResults", 1220 TruncationToken: "", 1221 }, 1222 } 1223 1224 if input == nil { 1225 input = &ListTagsForResourceInput{} 1226 } 1227 1228 output = &ListTagsForResourceOutput{} 1229 req = c.newRequest(op, input, output) 1230 return 1231} 1232 1233// ListTagsForResource API operation for AWS Transfer Family. 1234// 1235// Lists all of the tags associated with the Amazon Resource Number (ARN) you 1236// specify. The resource can be a user, server, or role. 1237// 1238// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1239// with awserr.Error's Code and Message methods to get detailed information about 1240// the error. 1241// 1242// See the AWS API reference guide for AWS Transfer Family's 1243// API operation ListTagsForResource for usage and error information. 1244// 1245// Returned Error Types: 1246// * ServiceUnavailableException 1247// The request has failed because the AWS Transfer Family service is not available. 1248// 1249// * InternalServiceError 1250// This exception is thrown when an error occurs in the AWS Transfer Family 1251// service. 1252// 1253// * InvalidNextTokenException 1254// The NextToken parameter that was passed is invalid. 1255// 1256// * InvalidRequestException 1257// This exception is thrown when the client submits a malformed request. 1258// 1259// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource 1260func (c *Transfer) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1261 req, out := c.ListTagsForResourceRequest(input) 1262 return out, req.Send() 1263} 1264 1265// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1266// the ability to pass a context and additional request options. 1267// 1268// See ListTagsForResource for details on how to use this API operation. 1269// 1270// The context must be non-nil and will be used for request cancellation. If 1271// the context is nil a panic will occur. In the future the SDK may create 1272// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1273// for more information on using Contexts. 1274func (c *Transfer) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1275 req, out := c.ListTagsForResourceRequest(input) 1276 req.SetContext(ctx) 1277 req.ApplyOptions(opts...) 1278 return out, req.Send() 1279} 1280 1281// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, 1282// calling the "fn" function with the response data for each page. To stop 1283// iterating, return false from the fn function. 1284// 1285// See ListTagsForResource method for more information on how to use this operation. 1286// 1287// Note: This operation can generate multiple requests to a service. 1288// 1289// // Example iterating over at most 3 pages of a ListTagsForResource operation. 1290// pageNum := 0 1291// err := client.ListTagsForResourcePages(params, 1292// func(page *transfer.ListTagsForResourceOutput, lastPage bool) bool { 1293// pageNum++ 1294// fmt.Println(page) 1295// return pageNum <= 3 1296// }) 1297// 1298func (c *Transfer) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { 1299 return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) 1300} 1301 1302// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except 1303// it takes a Context and allows setting request options on the pages. 1304// 1305// The context must be non-nil and will be used for request cancellation. If 1306// the context is nil a panic will occur. In the future the SDK may create 1307// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1308// for more information on using Contexts. 1309func (c *Transfer) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { 1310 p := request.Pagination{ 1311 NewRequest: func() (*request.Request, error) { 1312 var inCpy *ListTagsForResourceInput 1313 if input != nil { 1314 tmp := *input 1315 inCpy = &tmp 1316 } 1317 req, _ := c.ListTagsForResourceRequest(inCpy) 1318 req.SetContext(ctx) 1319 req.ApplyOptions(opts...) 1320 return req, nil 1321 }, 1322 } 1323 1324 for p.Next() { 1325 if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { 1326 break 1327 } 1328 } 1329 1330 return p.Err() 1331} 1332 1333const opListUsers = "ListUsers" 1334 1335// ListUsersRequest generates a "aws/request.Request" representing the 1336// client's request for the ListUsers operation. The "output" return 1337// value will be populated with the request's response once the request completes 1338// successfully. 1339// 1340// Use "Send" method on the returned Request to send the API call to the service. 1341// the "output" return value is not valid until after Send returns without error. 1342// 1343// See ListUsers for more information on using the ListUsers 1344// API call, and error handling. 1345// 1346// This method is useful when you want to inject custom logic or configuration 1347// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1348// 1349// 1350// // Example sending a request using the ListUsersRequest method. 1351// req, resp := client.ListUsersRequest(params) 1352// 1353// err := req.Send() 1354// if err == nil { // resp is now filled 1355// fmt.Println(resp) 1356// } 1357// 1358// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers 1359func (c *Transfer) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { 1360 op := &request.Operation{ 1361 Name: opListUsers, 1362 HTTPMethod: "POST", 1363 HTTPPath: "/", 1364 Paginator: &request.Paginator{ 1365 InputTokens: []string{"NextToken"}, 1366 OutputTokens: []string{"NextToken"}, 1367 LimitToken: "MaxResults", 1368 TruncationToken: "", 1369 }, 1370 } 1371 1372 if input == nil { 1373 input = &ListUsersInput{} 1374 } 1375 1376 output = &ListUsersOutput{} 1377 req = c.newRequest(op, input, output) 1378 return 1379} 1380 1381// ListUsers API operation for AWS Transfer Family. 1382// 1383// Lists the users for a file transfer protocol-enabled server that you specify 1384// by passing the ServerId parameter. 1385// 1386// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1387// with awserr.Error's Code and Message methods to get detailed information about 1388// the error. 1389// 1390// See the AWS API reference guide for AWS Transfer Family's 1391// API operation ListUsers for usage and error information. 1392// 1393// Returned Error Types: 1394// * ServiceUnavailableException 1395// The request has failed because the AWS Transfer Family service is not available. 1396// 1397// * InternalServiceError 1398// This exception is thrown when an error occurs in the AWS Transfer Family 1399// service. 1400// 1401// * InvalidNextTokenException 1402// The NextToken parameter that was passed is invalid. 1403// 1404// * InvalidRequestException 1405// This exception is thrown when the client submits a malformed request. 1406// 1407// * ResourceNotFoundException 1408// This exception is thrown when a resource is not found by the AWS Transfer 1409// Family service. 1410// 1411// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers 1412func (c *Transfer) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { 1413 req, out := c.ListUsersRequest(input) 1414 return out, req.Send() 1415} 1416 1417// ListUsersWithContext is the same as ListUsers with the addition of 1418// the ability to pass a context and additional request options. 1419// 1420// See ListUsers for details on how to use this API operation. 1421// 1422// The context must be non-nil and will be used for request cancellation. If 1423// the context is nil a panic will occur. In the future the SDK may create 1424// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1425// for more information on using Contexts. 1426func (c *Transfer) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { 1427 req, out := c.ListUsersRequest(input) 1428 req.SetContext(ctx) 1429 req.ApplyOptions(opts...) 1430 return out, req.Send() 1431} 1432 1433// ListUsersPages iterates over the pages of a ListUsers operation, 1434// calling the "fn" function with the response data for each page. To stop 1435// iterating, return false from the fn function. 1436// 1437// See ListUsers method for more information on how to use this operation. 1438// 1439// Note: This operation can generate multiple requests to a service. 1440// 1441// // Example iterating over at most 3 pages of a ListUsers operation. 1442// pageNum := 0 1443// err := client.ListUsersPages(params, 1444// func(page *transfer.ListUsersOutput, lastPage bool) bool { 1445// pageNum++ 1446// fmt.Println(page) 1447// return pageNum <= 3 1448// }) 1449// 1450func (c *Transfer) ListUsersPages(input *ListUsersInput, fn func(*ListUsersOutput, bool) bool) error { 1451 return c.ListUsersPagesWithContext(aws.BackgroundContext(), input, fn) 1452} 1453 1454// ListUsersPagesWithContext same as ListUsersPages except 1455// it takes a Context and allows setting request options on the pages. 1456// 1457// The context must be non-nil and will be used for request cancellation. If 1458// the context is nil a panic will occur. In the future the SDK may create 1459// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1460// for more information on using Contexts. 1461func (c *Transfer) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, fn func(*ListUsersOutput, bool) bool, opts ...request.Option) error { 1462 p := request.Pagination{ 1463 NewRequest: func() (*request.Request, error) { 1464 var inCpy *ListUsersInput 1465 if input != nil { 1466 tmp := *input 1467 inCpy = &tmp 1468 } 1469 req, _ := c.ListUsersRequest(inCpy) 1470 req.SetContext(ctx) 1471 req.ApplyOptions(opts...) 1472 return req, nil 1473 }, 1474 } 1475 1476 for p.Next() { 1477 if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { 1478 break 1479 } 1480 } 1481 1482 return p.Err() 1483} 1484 1485const opStartServer = "StartServer" 1486 1487// StartServerRequest generates a "aws/request.Request" representing the 1488// client's request for the StartServer operation. The "output" return 1489// value will be populated with the request's response once the request completes 1490// successfully. 1491// 1492// Use "Send" method on the returned Request to send the API call to the service. 1493// the "output" return value is not valid until after Send returns without error. 1494// 1495// See StartServer for more information on using the StartServer 1496// API call, and error handling. 1497// 1498// This method is useful when you want to inject custom logic or configuration 1499// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1500// 1501// 1502// // Example sending a request using the StartServerRequest method. 1503// req, resp := client.StartServerRequest(params) 1504// 1505// err := req.Send() 1506// if err == nil { // resp is now filled 1507// fmt.Println(resp) 1508// } 1509// 1510// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer 1511func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Request, output *StartServerOutput) { 1512 op := &request.Operation{ 1513 Name: opStartServer, 1514 HTTPMethod: "POST", 1515 HTTPPath: "/", 1516 } 1517 1518 if input == nil { 1519 input = &StartServerInput{} 1520 } 1521 1522 output = &StartServerOutput{} 1523 req = c.newRequest(op, input, output) 1524 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1525 return 1526} 1527 1528// StartServer API operation for AWS Transfer Family. 1529// 1530// Changes the state of a file transfer protocol-enabled server from OFFLINE 1531// to ONLINE. It has no impact on a server that is already ONLINE. An ONLINE 1532// server can accept and process file transfer jobs. 1533// 1534// The state of STARTING indicates that the server is in an intermediate state, 1535// either not fully able to respond, or not fully online. The values of START_FAILED 1536// can indicate an error condition. 1537// 1538// No response is returned from this call. 1539// 1540// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1541// with awserr.Error's Code and Message methods to get detailed information about 1542// the error. 1543// 1544// See the AWS API reference guide for AWS Transfer Family's 1545// API operation StartServer for usage and error information. 1546// 1547// Returned Error Types: 1548// * ServiceUnavailableException 1549// The request has failed because the AWS Transfer Family service is not available. 1550// 1551// * InternalServiceError 1552// This exception is thrown when an error occurs in the AWS Transfer Family 1553// service. 1554// 1555// * InvalidRequestException 1556// This exception is thrown when the client submits a malformed request. 1557// 1558// * ResourceNotFoundException 1559// This exception is thrown when a resource is not found by the AWS Transfer 1560// Family service. 1561// 1562// * ThrottlingException 1563// The request was denied due to request throttling. 1564// 1565// HTTP Status Code: 400 1566// 1567// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer 1568func (c *Transfer) StartServer(input *StartServerInput) (*StartServerOutput, error) { 1569 req, out := c.StartServerRequest(input) 1570 return out, req.Send() 1571} 1572 1573// StartServerWithContext is the same as StartServer with the addition of 1574// the ability to pass a context and additional request options. 1575// 1576// See StartServer for details on how to use this API operation. 1577// 1578// The context must be non-nil and will be used for request cancellation. If 1579// the context is nil a panic will occur. In the future the SDK may create 1580// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1581// for more information on using Contexts. 1582func (c *Transfer) StartServerWithContext(ctx aws.Context, input *StartServerInput, opts ...request.Option) (*StartServerOutput, error) { 1583 req, out := c.StartServerRequest(input) 1584 req.SetContext(ctx) 1585 req.ApplyOptions(opts...) 1586 return out, req.Send() 1587} 1588 1589const opStopServer = "StopServer" 1590 1591// StopServerRequest generates a "aws/request.Request" representing the 1592// client's request for the StopServer operation. The "output" return 1593// value will be populated with the request's response once the request completes 1594// successfully. 1595// 1596// Use "Send" method on the returned Request to send the API call to the service. 1597// the "output" return value is not valid until after Send returns without error. 1598// 1599// See StopServer for more information on using the StopServer 1600// API call, and error handling. 1601// 1602// This method is useful when you want to inject custom logic or configuration 1603// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1604// 1605// 1606// // Example sending a request using the StopServerRequest method. 1607// req, resp := client.StopServerRequest(params) 1608// 1609// err := req.Send() 1610// if err == nil { // resp is now filled 1611// fmt.Println(resp) 1612// } 1613// 1614// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer 1615func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Request, output *StopServerOutput) { 1616 op := &request.Operation{ 1617 Name: opStopServer, 1618 HTTPMethod: "POST", 1619 HTTPPath: "/", 1620 } 1621 1622 if input == nil { 1623 input = &StopServerInput{} 1624 } 1625 1626 output = &StopServerOutput{} 1627 req = c.newRequest(op, input, output) 1628 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1629 return 1630} 1631 1632// StopServer API operation for AWS Transfer Family. 1633// 1634// Changes the state of a file transfer protocol-enabled server from ONLINE 1635// to OFFLINE. An OFFLINE server cannot accept and process file transfer jobs. 1636// Information tied to your server, such as server and user properties, are 1637// not affected by stopping your server. 1638// 1639// Stopping the server will not reduce or impact your file transfer protocol 1640// endpoint billing; you must delete the server to stop being billed. 1641// 1642// The state of STOPPING indicates that the server is in an intermediate state, 1643// either not fully able to respond, or not fully offline. The values of STOP_FAILED 1644// can indicate an error condition. 1645// 1646// No response is returned from this call. 1647// 1648// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1649// with awserr.Error's Code and Message methods to get detailed information about 1650// the error. 1651// 1652// See the AWS API reference guide for AWS Transfer Family's 1653// API operation StopServer for usage and error information. 1654// 1655// Returned Error Types: 1656// * ServiceUnavailableException 1657// The request has failed because the AWS Transfer Family service is not available. 1658// 1659// * InternalServiceError 1660// This exception is thrown when an error occurs in the AWS Transfer Family 1661// service. 1662// 1663// * InvalidRequestException 1664// This exception is thrown when the client submits a malformed request. 1665// 1666// * ResourceNotFoundException 1667// This exception is thrown when a resource is not found by the AWS Transfer 1668// Family service. 1669// 1670// * ThrottlingException 1671// The request was denied due to request throttling. 1672// 1673// HTTP Status Code: 400 1674// 1675// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer 1676func (c *Transfer) StopServer(input *StopServerInput) (*StopServerOutput, error) { 1677 req, out := c.StopServerRequest(input) 1678 return out, req.Send() 1679} 1680 1681// StopServerWithContext is the same as StopServer with the addition of 1682// the ability to pass a context and additional request options. 1683// 1684// See StopServer for details on how to use this API operation. 1685// 1686// The context must be non-nil and will be used for request cancellation. If 1687// the context is nil a panic will occur. In the future the SDK may create 1688// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1689// for more information on using Contexts. 1690func (c *Transfer) StopServerWithContext(ctx aws.Context, input *StopServerInput, opts ...request.Option) (*StopServerOutput, error) { 1691 req, out := c.StopServerRequest(input) 1692 req.SetContext(ctx) 1693 req.ApplyOptions(opts...) 1694 return out, req.Send() 1695} 1696 1697const opTagResource = "TagResource" 1698 1699// TagResourceRequest generates a "aws/request.Request" representing the 1700// client's request for the TagResource operation. The "output" return 1701// value will be populated with the request's response once the request completes 1702// successfully. 1703// 1704// Use "Send" method on the returned Request to send the API call to the service. 1705// the "output" return value is not valid until after Send returns without error. 1706// 1707// See TagResource for more information on using the TagResource 1708// API call, and error handling. 1709// 1710// This method is useful when you want to inject custom logic or configuration 1711// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1712// 1713// 1714// // Example sending a request using the TagResourceRequest method. 1715// req, resp := client.TagResourceRequest(params) 1716// 1717// err := req.Send() 1718// if err == nil { // resp is now filled 1719// fmt.Println(resp) 1720// } 1721// 1722// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource 1723func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1724 op := &request.Operation{ 1725 Name: opTagResource, 1726 HTTPMethod: "POST", 1727 HTTPPath: "/", 1728 } 1729 1730 if input == nil { 1731 input = &TagResourceInput{} 1732 } 1733 1734 output = &TagResourceOutput{} 1735 req = c.newRequest(op, input, output) 1736 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1737 return 1738} 1739 1740// TagResource API operation for AWS Transfer Family. 1741// 1742// Attaches a key-value pair to a resource, as identified by its Amazon Resource 1743// Name (ARN). Resources are users, servers, roles, and other entities. 1744// 1745// There is no response returned from this call. 1746// 1747// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1748// with awserr.Error's Code and Message methods to get detailed information about 1749// the error. 1750// 1751// See the AWS API reference guide for AWS Transfer Family's 1752// API operation TagResource for usage and error information. 1753// 1754// Returned Error Types: 1755// * ServiceUnavailableException 1756// The request has failed because the AWS Transfer Family service is not available. 1757// 1758// * InternalServiceError 1759// This exception is thrown when an error occurs in the AWS Transfer Family 1760// service. 1761// 1762// * InvalidRequestException 1763// This exception is thrown when the client submits a malformed request. 1764// 1765// * ResourceNotFoundException 1766// This exception is thrown when a resource is not found by the AWS Transfer 1767// Family service. 1768// 1769// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource 1770func (c *Transfer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1771 req, out := c.TagResourceRequest(input) 1772 return out, req.Send() 1773} 1774 1775// TagResourceWithContext is the same as TagResource with the addition of 1776// the ability to pass a context and additional request options. 1777// 1778// See TagResource for details on how to use this API operation. 1779// 1780// The context must be non-nil and will be used for request cancellation. If 1781// the context is nil a panic will occur. In the future the SDK may create 1782// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1783// for more information on using Contexts. 1784func (c *Transfer) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1785 req, out := c.TagResourceRequest(input) 1786 req.SetContext(ctx) 1787 req.ApplyOptions(opts...) 1788 return out, req.Send() 1789} 1790 1791const opTestIdentityProvider = "TestIdentityProvider" 1792 1793// TestIdentityProviderRequest generates a "aws/request.Request" representing the 1794// client's request for the TestIdentityProvider operation. The "output" return 1795// value will be populated with the request's response once the request completes 1796// successfully. 1797// 1798// Use "Send" method on the returned Request to send the API call to the service. 1799// the "output" return value is not valid until after Send returns without error. 1800// 1801// See TestIdentityProvider for more information on using the TestIdentityProvider 1802// API call, and error handling. 1803// 1804// This method is useful when you want to inject custom logic or configuration 1805// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1806// 1807// 1808// // Example sending a request using the TestIdentityProviderRequest method. 1809// req, resp := client.TestIdentityProviderRequest(params) 1810// 1811// err := req.Send() 1812// if err == nil { // resp is now filled 1813// fmt.Println(resp) 1814// } 1815// 1816// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider 1817func (c *Transfer) TestIdentityProviderRequest(input *TestIdentityProviderInput) (req *request.Request, output *TestIdentityProviderOutput) { 1818 op := &request.Operation{ 1819 Name: opTestIdentityProvider, 1820 HTTPMethod: "POST", 1821 HTTPPath: "/", 1822 } 1823 1824 if input == nil { 1825 input = &TestIdentityProviderInput{} 1826 } 1827 1828 output = &TestIdentityProviderOutput{} 1829 req = c.newRequest(op, input, output) 1830 return 1831} 1832 1833// TestIdentityProvider API operation for AWS Transfer Family. 1834// 1835// If the IdentityProviderType of a file transfer protocol-enabled server is 1836// API_Gateway, tests whether your API Gateway is set up successfully. We highly 1837// recommend that you call this operation to test your authentication method 1838// as soon as you create your server. By doing so, you can troubleshoot issues 1839// with the API Gateway integration to ensure that your users can successfully 1840// use the service. 1841// 1842// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1843// with awserr.Error's Code and Message methods to get detailed information about 1844// the error. 1845// 1846// See the AWS API reference guide for AWS Transfer Family's 1847// API operation TestIdentityProvider for usage and error information. 1848// 1849// Returned Error Types: 1850// * ServiceUnavailableException 1851// The request has failed because the AWS Transfer Family service is not available. 1852// 1853// * InternalServiceError 1854// This exception is thrown when an error occurs in the AWS Transfer Family 1855// service. 1856// 1857// * InvalidRequestException 1858// This exception is thrown when the client submits a malformed request. 1859// 1860// * ResourceNotFoundException 1861// This exception is thrown when a resource is not found by the AWS Transfer 1862// Family service. 1863// 1864// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider 1865func (c *Transfer) TestIdentityProvider(input *TestIdentityProviderInput) (*TestIdentityProviderOutput, error) { 1866 req, out := c.TestIdentityProviderRequest(input) 1867 return out, req.Send() 1868} 1869 1870// TestIdentityProviderWithContext is the same as TestIdentityProvider with the addition of 1871// the ability to pass a context and additional request options. 1872// 1873// See TestIdentityProvider for details on how to use this API operation. 1874// 1875// The context must be non-nil and will be used for request cancellation. If 1876// the context is nil a panic will occur. In the future the SDK may create 1877// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1878// for more information on using Contexts. 1879func (c *Transfer) TestIdentityProviderWithContext(ctx aws.Context, input *TestIdentityProviderInput, opts ...request.Option) (*TestIdentityProviderOutput, error) { 1880 req, out := c.TestIdentityProviderRequest(input) 1881 req.SetContext(ctx) 1882 req.ApplyOptions(opts...) 1883 return out, req.Send() 1884} 1885 1886const opUntagResource = "UntagResource" 1887 1888// UntagResourceRequest generates a "aws/request.Request" representing the 1889// client's request for the UntagResource operation. The "output" return 1890// value will be populated with the request's response once the request completes 1891// successfully. 1892// 1893// Use "Send" method on the returned Request to send the API call to the service. 1894// the "output" return value is not valid until after Send returns without error. 1895// 1896// See UntagResource for more information on using the UntagResource 1897// API call, and error handling. 1898// 1899// This method is useful when you want to inject custom logic or configuration 1900// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1901// 1902// 1903// // Example sending a request using the UntagResourceRequest method. 1904// req, resp := client.UntagResourceRequest(params) 1905// 1906// err := req.Send() 1907// if err == nil { // resp is now filled 1908// fmt.Println(resp) 1909// } 1910// 1911// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource 1912func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1913 op := &request.Operation{ 1914 Name: opUntagResource, 1915 HTTPMethod: "POST", 1916 HTTPPath: "/", 1917 } 1918 1919 if input == nil { 1920 input = &UntagResourceInput{} 1921 } 1922 1923 output = &UntagResourceOutput{} 1924 req = c.newRequest(op, input, output) 1925 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1926 return 1927} 1928 1929// UntagResource API operation for AWS Transfer Family. 1930// 1931// Detaches a key-value pair from a resource, as identified by its Amazon Resource 1932// Name (ARN). Resources are users, servers, roles, and other entities. 1933// 1934// No response is returned from this call. 1935// 1936// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1937// with awserr.Error's Code and Message methods to get detailed information about 1938// the error. 1939// 1940// See the AWS API reference guide for AWS Transfer Family's 1941// API operation UntagResource for usage and error information. 1942// 1943// Returned Error Types: 1944// * ServiceUnavailableException 1945// The request has failed because the AWS Transfer Family service is not available. 1946// 1947// * InternalServiceError 1948// This exception is thrown when an error occurs in the AWS Transfer Family 1949// service. 1950// 1951// * InvalidRequestException 1952// This exception is thrown when the client submits a malformed request. 1953// 1954// * ResourceNotFoundException 1955// This exception is thrown when a resource is not found by the AWS Transfer 1956// Family service. 1957// 1958// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource 1959func (c *Transfer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1960 req, out := c.UntagResourceRequest(input) 1961 return out, req.Send() 1962} 1963 1964// UntagResourceWithContext is the same as UntagResource with the addition of 1965// the ability to pass a context and additional request options. 1966// 1967// See UntagResource for details on how to use this API operation. 1968// 1969// The context must be non-nil and will be used for request cancellation. If 1970// the context is nil a panic will occur. In the future the SDK may create 1971// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1972// for more information on using Contexts. 1973func (c *Transfer) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1974 req, out := c.UntagResourceRequest(input) 1975 req.SetContext(ctx) 1976 req.ApplyOptions(opts...) 1977 return out, req.Send() 1978} 1979 1980const opUpdateServer = "UpdateServer" 1981 1982// UpdateServerRequest generates a "aws/request.Request" representing the 1983// client's request for the UpdateServer operation. The "output" return 1984// value will be populated with the request's response once the request completes 1985// successfully. 1986// 1987// Use "Send" method on the returned Request to send the API call to the service. 1988// the "output" return value is not valid until after Send returns without error. 1989// 1990// See UpdateServer for more information on using the UpdateServer 1991// API call, and error handling. 1992// 1993// This method is useful when you want to inject custom logic or configuration 1994// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1995// 1996// 1997// // Example sending a request using the UpdateServerRequest method. 1998// req, resp := client.UpdateServerRequest(params) 1999// 2000// err := req.Send() 2001// if err == nil { // resp is now filled 2002// fmt.Println(resp) 2003// } 2004// 2005// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer 2006func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.Request, output *UpdateServerOutput) { 2007 op := &request.Operation{ 2008 Name: opUpdateServer, 2009 HTTPMethod: "POST", 2010 HTTPPath: "/", 2011 } 2012 2013 if input == nil { 2014 input = &UpdateServerInput{} 2015 } 2016 2017 output = &UpdateServerOutput{} 2018 req = c.newRequest(op, input, output) 2019 return 2020} 2021 2022// UpdateServer API operation for AWS Transfer Family. 2023// 2024// Updates the file transfer protocol-enabled server's properties after that 2025// server has been created. 2026// 2027// The UpdateServer call returns the ServerId of the server you updated. 2028// 2029// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2030// with awserr.Error's Code and Message methods to get detailed information about 2031// the error. 2032// 2033// See the AWS API reference guide for AWS Transfer Family's 2034// API operation UpdateServer for usage and error information. 2035// 2036// Returned Error Types: 2037// * AccessDeniedException 2038// You do not have sufficient access to perform this action. 2039// 2040// * ServiceUnavailableException 2041// The request has failed because the AWS Transfer Family service is not available. 2042// 2043// * ConflictException 2044// This exception is thrown when the UpdatServer is called for a file transfer 2045// protocol-enabled server that has VPC as the endpoint type and the server's 2046// VpcEndpointID is not in the available state. 2047// 2048// * InternalServiceError 2049// This exception is thrown when an error occurs in the AWS Transfer Family 2050// service. 2051// 2052// * InvalidRequestException 2053// This exception is thrown when the client submits a malformed request. 2054// 2055// * ResourceExistsException 2056// The requested resource does not exist. 2057// 2058// * ResourceNotFoundException 2059// This exception is thrown when a resource is not found by the AWS Transfer 2060// Family service. 2061// 2062// * ThrottlingException 2063// The request was denied due to request throttling. 2064// 2065// HTTP Status Code: 400 2066// 2067// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer 2068func (c *Transfer) UpdateServer(input *UpdateServerInput) (*UpdateServerOutput, error) { 2069 req, out := c.UpdateServerRequest(input) 2070 return out, req.Send() 2071} 2072 2073// UpdateServerWithContext is the same as UpdateServer with the addition of 2074// the ability to pass a context and additional request options. 2075// 2076// See UpdateServer for details on how to use this API operation. 2077// 2078// The context must be non-nil and will be used for request cancellation. If 2079// the context is nil a panic will occur. In the future the SDK may create 2080// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2081// for more information on using Contexts. 2082func (c *Transfer) UpdateServerWithContext(ctx aws.Context, input *UpdateServerInput, opts ...request.Option) (*UpdateServerOutput, error) { 2083 req, out := c.UpdateServerRequest(input) 2084 req.SetContext(ctx) 2085 req.ApplyOptions(opts...) 2086 return out, req.Send() 2087} 2088 2089const opUpdateUser = "UpdateUser" 2090 2091// UpdateUserRequest generates a "aws/request.Request" representing the 2092// client's request for the UpdateUser operation. The "output" return 2093// value will be populated with the request's response once the request completes 2094// successfully. 2095// 2096// Use "Send" method on the returned Request to send the API call to the service. 2097// the "output" return value is not valid until after Send returns without error. 2098// 2099// See UpdateUser for more information on using the UpdateUser 2100// API call, and error handling. 2101// 2102// This method is useful when you want to inject custom logic or configuration 2103// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2104// 2105// 2106// // Example sending a request using the UpdateUserRequest method. 2107// req, resp := client.UpdateUserRequest(params) 2108// 2109// err := req.Send() 2110// if err == nil { // resp is now filled 2111// fmt.Println(resp) 2112// } 2113// 2114// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser 2115func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) { 2116 op := &request.Operation{ 2117 Name: opUpdateUser, 2118 HTTPMethod: "POST", 2119 HTTPPath: "/", 2120 } 2121 2122 if input == nil { 2123 input = &UpdateUserInput{} 2124 } 2125 2126 output = &UpdateUserOutput{} 2127 req = c.newRequest(op, input, output) 2128 return 2129} 2130 2131// UpdateUser API operation for AWS Transfer Family. 2132// 2133// Assigns new properties to a user. Parameters you pass modify any or all of 2134// the following: the home directory, role, and policy for the UserName and 2135// ServerId you specify. 2136// 2137// The response returns the ServerId and the UserName for the updated user. 2138// 2139// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2140// with awserr.Error's Code and Message methods to get detailed information about 2141// the error. 2142// 2143// See the AWS API reference guide for AWS Transfer Family's 2144// API operation UpdateUser for usage and error information. 2145// 2146// Returned Error Types: 2147// * ServiceUnavailableException 2148// The request has failed because the AWS Transfer Family service is not available. 2149// 2150// * InternalServiceError 2151// This exception is thrown when an error occurs in the AWS Transfer Family 2152// service. 2153// 2154// * InvalidRequestException 2155// This exception is thrown when the client submits a malformed request. 2156// 2157// * ResourceNotFoundException 2158// This exception is thrown when a resource is not found by the AWS Transfer 2159// Family service. 2160// 2161// * ThrottlingException 2162// The request was denied due to request throttling. 2163// 2164// HTTP Status Code: 400 2165// 2166// See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser 2167func (c *Transfer) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) { 2168 req, out := c.UpdateUserRequest(input) 2169 return out, req.Send() 2170} 2171 2172// UpdateUserWithContext is the same as UpdateUser with the addition of 2173// the ability to pass a context and additional request options. 2174// 2175// See UpdateUser for details on how to use this API operation. 2176// 2177// The context must be non-nil and will be used for request cancellation. If 2178// the context is nil a panic will occur. In the future the SDK may create 2179// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2180// for more information on using Contexts. 2181func (c *Transfer) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) { 2182 req, out := c.UpdateUserRequest(input) 2183 req.SetContext(ctx) 2184 req.ApplyOptions(opts...) 2185 return out, req.Send() 2186} 2187 2188// You do not have sufficient access to perform this action. 2189type AccessDeniedException struct { 2190 _ struct{} `type:"structure"` 2191 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2192 2193 Message_ *string `locationName:"Message" type:"string"` 2194} 2195 2196// String returns the string representation 2197func (s AccessDeniedException) String() string { 2198 return awsutil.Prettify(s) 2199} 2200 2201// GoString returns the string representation 2202func (s AccessDeniedException) GoString() string { 2203 return s.String() 2204} 2205 2206func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 2207 return &AccessDeniedException{ 2208 RespMetadata: v, 2209 } 2210} 2211 2212// Code returns the exception type name. 2213func (s *AccessDeniedException) Code() string { 2214 return "AccessDeniedException" 2215} 2216 2217// Message returns the exception's message. 2218func (s *AccessDeniedException) Message() string { 2219 if s.Message_ != nil { 2220 return *s.Message_ 2221 } 2222 return "" 2223} 2224 2225// OrigErr always returns nil, satisfies awserr.Error interface. 2226func (s *AccessDeniedException) OrigErr() error { 2227 return nil 2228} 2229 2230func (s *AccessDeniedException) Error() string { 2231 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2232} 2233 2234// Status code returns the HTTP status code for the request's response error. 2235func (s *AccessDeniedException) StatusCode() int { 2236 return s.RespMetadata.StatusCode 2237} 2238 2239// RequestID returns the service's response RequestID for request. 2240func (s *AccessDeniedException) RequestID() string { 2241 return s.RespMetadata.RequestID 2242} 2243 2244// This exception is thrown when the UpdatServer is called for a file transfer 2245// protocol-enabled server that has VPC as the endpoint type and the server's 2246// VpcEndpointID is not in the available state. 2247type ConflictException struct { 2248 _ struct{} `type:"structure"` 2249 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2250 2251 Message_ *string `locationName:"Message" type:"string"` 2252} 2253 2254// String returns the string representation 2255func (s ConflictException) String() string { 2256 return awsutil.Prettify(s) 2257} 2258 2259// GoString returns the string representation 2260func (s ConflictException) GoString() string { 2261 return s.String() 2262} 2263 2264func newErrorConflictException(v protocol.ResponseMetadata) error { 2265 return &ConflictException{ 2266 RespMetadata: v, 2267 } 2268} 2269 2270// Code returns the exception type name. 2271func (s *ConflictException) Code() string { 2272 return "ConflictException" 2273} 2274 2275// Message returns the exception's message. 2276func (s *ConflictException) Message() string { 2277 if s.Message_ != nil { 2278 return *s.Message_ 2279 } 2280 return "" 2281} 2282 2283// OrigErr always returns nil, satisfies awserr.Error interface. 2284func (s *ConflictException) OrigErr() error { 2285 return nil 2286} 2287 2288func (s *ConflictException) Error() string { 2289 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2290} 2291 2292// Status code returns the HTTP status code for the request's response error. 2293func (s *ConflictException) StatusCode() int { 2294 return s.RespMetadata.StatusCode 2295} 2296 2297// RequestID returns the service's response RequestID for request. 2298func (s *ConflictException) RequestID() string { 2299 return s.RespMetadata.RequestID 2300} 2301 2302type CreateServerInput struct { 2303 _ struct{} `type:"structure"` 2304 2305 // The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. 2306 // Required when Protocols is set to FTPS. 2307 // 2308 // To request a new public certificate, see Request a public certificate (https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html) 2309 // in the AWS Certificate Manager User Guide. 2310 // 2311 // To import an existing certificate into ACM, see Importing certificates into 2312 // ACM (https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) 2313 // in the AWS Certificate Manager User Guide. 2314 // 2315 // To request a private certificate to use FTPS through private IP addresses, 2316 // see Request a private certificate (https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html) 2317 // in the AWS Certificate Manager User Guide. 2318 // 2319 // Certificates with the following cryptographic algorithms and key sizes are 2320 // supported: 2321 // 2322 // * 2048-bit RSA (RSA_2048) 2323 // 2324 // * 4096-bit RSA (RSA_4096) 2325 // 2326 // * Elliptic Prime Curve 256 bit (EC_prime256v1) 2327 // 2328 // * Elliptic Prime Curve 384 bit (EC_secp384r1) 2329 // 2330 // * Elliptic Prime Curve 521 bit (EC_secp521r1) 2331 // 2332 // The certificate must be a valid SSL/TLS X.509 version 3 certificate with 2333 // FQDN or IP address specified and information about the issuer. 2334 Certificate *string `type:"string"` 2335 2336 // The virtual private cloud (VPC) endpoint settings that are configured for 2337 // your server. When you host your endpoint within your VPC, you can make it 2338 // accessible only to resources within your VPC, or you can attach Elastic IPs 2339 // and make it accessible to clients over the internet. Your VPC's default security 2340 // groups are automatically assigned to your endpoint. 2341 EndpointDetails *EndpointDetails `type:"structure"` 2342 2343 // The type of VPC endpoint that you want your server to connect to. You can 2344 // choose to connect to the public internet or a VPC endpoint. With a VPC endpoint, 2345 // you can restrict access to your server and resources only within your VPC. 2346 // 2347 // It is recommended that you use VPC as the EndpointType. With this endpoint 2348 // type, you have the option to directly associate up to three Elastic IPv4 2349 // addresses (BYO IP included) with your server's endpoint and use VPC security 2350 // groups to restrict traffic by the client's public IP address. This is not 2351 // possible with EndpointType set to VPC_ENDPOINT. 2352 EndpointType *string `type:"string" enum:"EndpointType"` 2353 2354 // The RSA private key as generated by the ssh-keygen -N "" -m PEM -f my-new-server-key 2355 // command. 2356 // 2357 // If you aren't planning to migrate existing users from an existing SFTP-enabled 2358 // server to a new server, don't update the host key. Accidentally changing 2359 // a server's host key can be disruptive. 2360 // 2361 // For more information, see Change the host key for your SFTP-enabled server 2362 // (https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key) 2363 // in the AWS Transfer Family User Guide. 2364 HostKey *string `type:"string" sensitive:"true"` 2365 2366 // Required when IdentityProviderType is set to API_GATEWAY. Accepts an array 2367 // containing all of the information required to call a customer-supplied authentication 2368 // API, including the API Gateway URL. Not required when IdentityProviderType 2369 // is set to SERVICE_MANAGED. 2370 IdentityProviderDetails *IdentityProviderDetails `type:"structure"` 2371 2372 // Specifies the mode of authentication for a server. The default value is SERVICE_MANAGED, 2373 // which allows you to store and access user credentials within the AWS Transfer 2374 // Family service. Use the API_GATEWAY value to integrate with an identity provider 2375 // of your choosing. The API_GATEWAY setting requires you to provide an API 2376 // Gateway endpoint URL to call for authentication using the IdentityProviderDetails 2377 // parameter. 2378 IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` 2379 2380 // Allows the service to write your users' activity to your Amazon CloudWatch 2381 // logs for monitoring and auditing purposes. 2382 LoggingRole *string `min:"20" type:"string"` 2383 2384 // Specifies the file transfer protocol or protocols over which your file transfer 2385 // protocol client can connect to your server's endpoint. The available protocols 2386 // are: 2387 // 2388 // * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over 2389 // SSH 2390 // 2391 // * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption 2392 // 2393 // * FTP (File Transfer Protocol): Unencrypted file transfer 2394 // 2395 // If you select FTPS, you must choose a certificate stored in AWS Certificate 2396 // Manager (ACM) which will be used to identify your server when clients connect 2397 // to it over FTPS. 2398 // 2399 // If Protocol includes either FTP or FTPS, then the EndpointType must be VPC 2400 // and the IdentityProviderType must be API_GATEWAY. 2401 // 2402 // If Protocol includes FTP, then AddressAllocationIds cannot be associated. 2403 // 2404 // If Protocol is set only to SFTP, the EndpointType can be set to PUBLIC and 2405 // the IdentityProviderType can be set to SERVICE_MANAGED. 2406 Protocols []*string `min:"1" type:"list"` 2407 2408 // Specifies the name of the security policy that is attached to the server. 2409 SecurityPolicyName *string `type:"string"` 2410 2411 // Key-value pairs that can be used to group and search for servers. 2412 Tags []*Tag `min:"1" type:"list"` 2413} 2414 2415// String returns the string representation 2416func (s CreateServerInput) String() string { 2417 return awsutil.Prettify(s) 2418} 2419 2420// GoString returns the string representation 2421func (s CreateServerInput) GoString() string { 2422 return s.String() 2423} 2424 2425// Validate inspects the fields of the type to determine if they are valid. 2426func (s *CreateServerInput) Validate() error { 2427 invalidParams := request.ErrInvalidParams{Context: "CreateServerInput"} 2428 if s.LoggingRole != nil && len(*s.LoggingRole) < 20 { 2429 invalidParams.Add(request.NewErrParamMinLen("LoggingRole", 20)) 2430 } 2431 if s.Protocols != nil && len(s.Protocols) < 1 { 2432 invalidParams.Add(request.NewErrParamMinLen("Protocols", 1)) 2433 } 2434 if s.Tags != nil && len(s.Tags) < 1 { 2435 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 2436 } 2437 if s.EndpointDetails != nil { 2438 if err := s.EndpointDetails.Validate(); err != nil { 2439 invalidParams.AddNested("EndpointDetails", err.(request.ErrInvalidParams)) 2440 } 2441 } 2442 if s.IdentityProviderDetails != nil { 2443 if err := s.IdentityProviderDetails.Validate(); err != nil { 2444 invalidParams.AddNested("IdentityProviderDetails", err.(request.ErrInvalidParams)) 2445 } 2446 } 2447 if s.Tags != nil { 2448 for i, v := range s.Tags { 2449 if v == nil { 2450 continue 2451 } 2452 if err := v.Validate(); err != nil { 2453 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2454 } 2455 } 2456 } 2457 2458 if invalidParams.Len() > 0 { 2459 return invalidParams 2460 } 2461 return nil 2462} 2463 2464// SetCertificate sets the Certificate field's value. 2465func (s *CreateServerInput) SetCertificate(v string) *CreateServerInput { 2466 s.Certificate = &v 2467 return s 2468} 2469 2470// SetEndpointDetails sets the EndpointDetails field's value. 2471func (s *CreateServerInput) SetEndpointDetails(v *EndpointDetails) *CreateServerInput { 2472 s.EndpointDetails = v 2473 return s 2474} 2475 2476// SetEndpointType sets the EndpointType field's value. 2477func (s *CreateServerInput) SetEndpointType(v string) *CreateServerInput { 2478 s.EndpointType = &v 2479 return s 2480} 2481 2482// SetHostKey sets the HostKey field's value. 2483func (s *CreateServerInput) SetHostKey(v string) *CreateServerInput { 2484 s.HostKey = &v 2485 return s 2486} 2487 2488// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. 2489func (s *CreateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *CreateServerInput { 2490 s.IdentityProviderDetails = v 2491 return s 2492} 2493 2494// SetIdentityProviderType sets the IdentityProviderType field's value. 2495func (s *CreateServerInput) SetIdentityProviderType(v string) *CreateServerInput { 2496 s.IdentityProviderType = &v 2497 return s 2498} 2499 2500// SetLoggingRole sets the LoggingRole field's value. 2501func (s *CreateServerInput) SetLoggingRole(v string) *CreateServerInput { 2502 s.LoggingRole = &v 2503 return s 2504} 2505 2506// SetProtocols sets the Protocols field's value. 2507func (s *CreateServerInput) SetProtocols(v []*string) *CreateServerInput { 2508 s.Protocols = v 2509 return s 2510} 2511 2512// SetSecurityPolicyName sets the SecurityPolicyName field's value. 2513func (s *CreateServerInput) SetSecurityPolicyName(v string) *CreateServerInput { 2514 s.SecurityPolicyName = &v 2515 return s 2516} 2517 2518// SetTags sets the Tags field's value. 2519func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { 2520 s.Tags = v 2521 return s 2522} 2523 2524type CreateServerOutput struct { 2525 _ struct{} `type:"structure"` 2526 2527 // The service-assigned ID of the server that is created. 2528 // 2529 // ServerId is a required field 2530 ServerId *string `min:"19" type:"string" required:"true"` 2531} 2532 2533// String returns the string representation 2534func (s CreateServerOutput) String() string { 2535 return awsutil.Prettify(s) 2536} 2537 2538// GoString returns the string representation 2539func (s CreateServerOutput) GoString() string { 2540 return s.String() 2541} 2542 2543// SetServerId sets the ServerId field's value. 2544func (s *CreateServerOutput) SetServerId(v string) *CreateServerOutput { 2545 s.ServerId = &v 2546 return s 2547} 2548 2549type CreateUserInput struct { 2550 _ struct{} `type:"structure"` 2551 2552 // The landing directory (folder) for a user when they log in to the server 2553 // using the client. 2554 // 2555 // An example is your-Amazon-S3-bucket-name>/home/username . 2556 HomeDirectory *string `type:"string"` 2557 2558 // Logical directory mappings that specify what Amazon S3 paths and keys should 2559 // be visible to your user and how you want to make them visible. You will need 2560 // to specify the "Entry" and "Target" pair, where Entry shows how the path 2561 // is made visible and Target is the actual Amazon S3 path. If you only specify 2562 // a target, it will be displayed as is. You will need to also make sure that 2563 // your IAM role provides access to paths in Target. The following is an example. 2564 // 2565 // '[ "/bucket2/documentation", { "Entry": "your-personal-report.pdf", "Target": 2566 // "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]' 2567 // 2568 // In most cases, you can use this value instead of the scope-down policy to 2569 // lock your user down to the designated home directory ("chroot"). To do this, 2570 // you can set Entry to '/' and set Target to the HomeDirectory parameter value. 2571 // 2572 // If the target of a logical directory entry does not exist in Amazon S3, the 2573 // entry will be ignored. As a workaround, you can use the Amazon S3 API to 2574 // create 0 byte objects as place holders for your directory. If using the CLI, 2575 // use the s3api call instead of s3 so you can use the put-object operation. 2576 // For example, you use the following: aws s3api put-object --bucket bucketname 2577 // --key path/to/folder/. Make sure that the end of the key name ends in a '/' 2578 // for it to be considered a folder. 2579 HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` 2580 2581 // The type of landing directory (folder) you want your users' home directory 2582 // to be when they log into the server. If you set it to PATH, the user will 2583 // see the absolute Amazon S3 bucket paths as is in their file transfer protocol 2584 // clients. If you set it LOGICAL, you will need to provide mappings in the 2585 // HomeDirectoryMappings for how you want to make Amazon S3 paths visible to 2586 // your users. 2587 HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` 2588 2589 // A scope-down policy for your user so you can use the same IAM role across 2590 // multiple users. This policy scopes down user access to portions of their 2591 // Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, 2592 // ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}. 2593 // 2594 // For scope-down policies, AWS Transfer Family stores the policy as a JSON 2595 // blob, instead of the Amazon Resource Name (ARN) of the policy. You save the 2596 // policy as a JSON blob and pass it in the Policy argument. 2597 // 2598 // For an example of a scope-down policy, see Creating a scope-down policy (https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down). 2599 // 2600 // For more information, see AssumeRole (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) 2601 // in the AWS Security Token Service API Reference. 2602 Policy *string `type:"string"` 2603 2604 // The IAM role that controls your users' access to your Amazon S3 bucket. The 2605 // policies attached to this role will determine the level of access you want 2606 // to provide your users when transferring files into and out of your Amazon 2607 // S3 bucket or buckets. The IAM role should also contain a trust relationship 2608 // that allows the server to access your resources when servicing your users' 2609 // transfer requests. 2610 // 2611 // Role is a required field 2612 Role *string `min:"20" type:"string" required:"true"` 2613 2614 // A system-assigned unique identifier for a server instance. This is the specific 2615 // server that you added your user to. 2616 // 2617 // ServerId is a required field 2618 ServerId *string `min:"19" type:"string" required:"true"` 2619 2620 // The public portion of the Secure Shell (SSH) key used to authenticate the 2621 // user to the server. 2622 SshPublicKeyBody *string `type:"string"` 2623 2624 // Key-value pairs that can be used to group and search for users. Tags are 2625 // metadata attached to users for any purpose. 2626 Tags []*Tag `min:"1" type:"list"` 2627 2628 // A unique string that identifies a user and is associated with a as specified 2629 // by the ServerId. This user name must be a minimum of 3 and a maximum of 100 2630 // characters long. The following are valid characters: a-z, A-Z, 0-9, underscore 2631 // '_', hyphen '-', period '.', and at sign '@'. The user name can't start with 2632 // a hyphen, period, or at sign. 2633 // 2634 // UserName is a required field 2635 UserName *string `min:"3" type:"string" required:"true"` 2636} 2637 2638// String returns the string representation 2639func (s CreateUserInput) String() string { 2640 return awsutil.Prettify(s) 2641} 2642 2643// GoString returns the string representation 2644func (s CreateUserInput) GoString() string { 2645 return s.String() 2646} 2647 2648// Validate inspects the fields of the type to determine if they are valid. 2649func (s *CreateUserInput) Validate() error { 2650 invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} 2651 if s.HomeDirectoryMappings != nil && len(s.HomeDirectoryMappings) < 1 { 2652 invalidParams.Add(request.NewErrParamMinLen("HomeDirectoryMappings", 1)) 2653 } 2654 if s.Role == nil { 2655 invalidParams.Add(request.NewErrParamRequired("Role")) 2656 } 2657 if s.Role != nil && len(*s.Role) < 20 { 2658 invalidParams.Add(request.NewErrParamMinLen("Role", 20)) 2659 } 2660 if s.ServerId == nil { 2661 invalidParams.Add(request.NewErrParamRequired("ServerId")) 2662 } 2663 if s.ServerId != nil && len(*s.ServerId) < 19 { 2664 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 2665 } 2666 if s.Tags != nil && len(s.Tags) < 1 { 2667 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 2668 } 2669 if s.UserName == nil { 2670 invalidParams.Add(request.NewErrParamRequired("UserName")) 2671 } 2672 if s.UserName != nil && len(*s.UserName) < 3 { 2673 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 2674 } 2675 if s.HomeDirectoryMappings != nil { 2676 for i, v := range s.HomeDirectoryMappings { 2677 if v == nil { 2678 continue 2679 } 2680 if err := v.Validate(); err != nil { 2681 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HomeDirectoryMappings", i), err.(request.ErrInvalidParams)) 2682 } 2683 } 2684 } 2685 if s.Tags != nil { 2686 for i, v := range s.Tags { 2687 if v == nil { 2688 continue 2689 } 2690 if err := v.Validate(); err != nil { 2691 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2692 } 2693 } 2694 } 2695 2696 if invalidParams.Len() > 0 { 2697 return invalidParams 2698 } 2699 return nil 2700} 2701 2702// SetHomeDirectory sets the HomeDirectory field's value. 2703func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput { 2704 s.HomeDirectory = &v 2705 return s 2706} 2707 2708// SetHomeDirectoryMappings sets the HomeDirectoryMappings field's value. 2709func (s *CreateUserInput) SetHomeDirectoryMappings(v []*HomeDirectoryMapEntry) *CreateUserInput { 2710 s.HomeDirectoryMappings = v 2711 return s 2712} 2713 2714// SetHomeDirectoryType sets the HomeDirectoryType field's value. 2715func (s *CreateUserInput) SetHomeDirectoryType(v string) *CreateUserInput { 2716 s.HomeDirectoryType = &v 2717 return s 2718} 2719 2720// SetPolicy sets the Policy field's value. 2721func (s *CreateUserInput) SetPolicy(v string) *CreateUserInput { 2722 s.Policy = &v 2723 return s 2724} 2725 2726// SetRole sets the Role field's value. 2727func (s *CreateUserInput) SetRole(v string) *CreateUserInput { 2728 s.Role = &v 2729 return s 2730} 2731 2732// SetServerId sets the ServerId field's value. 2733func (s *CreateUserInput) SetServerId(v string) *CreateUserInput { 2734 s.ServerId = &v 2735 return s 2736} 2737 2738// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. 2739func (s *CreateUserInput) SetSshPublicKeyBody(v string) *CreateUserInput { 2740 s.SshPublicKeyBody = &v 2741 return s 2742} 2743 2744// SetTags sets the Tags field's value. 2745func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput { 2746 s.Tags = v 2747 return s 2748} 2749 2750// SetUserName sets the UserName field's value. 2751func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { 2752 s.UserName = &v 2753 return s 2754} 2755 2756type CreateUserOutput struct { 2757 _ struct{} `type:"structure"` 2758 2759 // The ID of the server that the user is attached to. 2760 // 2761 // ServerId is a required field 2762 ServerId *string `min:"19" type:"string" required:"true"` 2763 2764 // A unique string that identifies a user account associated with a server. 2765 // 2766 // UserName is a required field 2767 UserName *string `min:"3" type:"string" required:"true"` 2768} 2769 2770// String returns the string representation 2771func (s CreateUserOutput) String() string { 2772 return awsutil.Prettify(s) 2773} 2774 2775// GoString returns the string representation 2776func (s CreateUserOutput) GoString() string { 2777 return s.String() 2778} 2779 2780// SetServerId sets the ServerId field's value. 2781func (s *CreateUserOutput) SetServerId(v string) *CreateUserOutput { 2782 s.ServerId = &v 2783 return s 2784} 2785 2786// SetUserName sets the UserName field's value. 2787func (s *CreateUserOutput) SetUserName(v string) *CreateUserOutput { 2788 s.UserName = &v 2789 return s 2790} 2791 2792type DeleteServerInput struct { 2793 _ struct{} `type:"structure"` 2794 2795 // A unique system-assigned identifier for a server instance. 2796 // 2797 // ServerId is a required field 2798 ServerId *string `min:"19" type:"string" required:"true"` 2799} 2800 2801// String returns the string representation 2802func (s DeleteServerInput) String() string { 2803 return awsutil.Prettify(s) 2804} 2805 2806// GoString returns the string representation 2807func (s DeleteServerInput) GoString() string { 2808 return s.String() 2809} 2810 2811// Validate inspects the fields of the type to determine if they are valid. 2812func (s *DeleteServerInput) Validate() error { 2813 invalidParams := request.ErrInvalidParams{Context: "DeleteServerInput"} 2814 if s.ServerId == nil { 2815 invalidParams.Add(request.NewErrParamRequired("ServerId")) 2816 } 2817 if s.ServerId != nil && len(*s.ServerId) < 19 { 2818 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 2819 } 2820 2821 if invalidParams.Len() > 0 { 2822 return invalidParams 2823 } 2824 return nil 2825} 2826 2827// SetServerId sets the ServerId field's value. 2828func (s *DeleteServerInput) SetServerId(v string) *DeleteServerInput { 2829 s.ServerId = &v 2830 return s 2831} 2832 2833type DeleteServerOutput struct { 2834 _ struct{} `type:"structure"` 2835} 2836 2837// String returns the string representation 2838func (s DeleteServerOutput) String() string { 2839 return awsutil.Prettify(s) 2840} 2841 2842// GoString returns the string representation 2843func (s DeleteServerOutput) GoString() string { 2844 return s.String() 2845} 2846 2847type DeleteSshPublicKeyInput struct { 2848 _ struct{} `type:"structure"` 2849 2850 // A system-assigned unique identifier for a file transfer protocol-enabled 2851 // server instance that has the user assigned to it. 2852 // 2853 // ServerId is a required field 2854 ServerId *string `min:"19" type:"string" required:"true"` 2855 2856 // A unique identifier used to reference your user's specific SSH key. 2857 // 2858 // SshPublicKeyId is a required field 2859 SshPublicKeyId *string `min:"21" type:"string" required:"true"` 2860 2861 // A unique string that identifies a user whose public key is being deleted. 2862 // 2863 // UserName is a required field 2864 UserName *string `min:"3" type:"string" required:"true"` 2865} 2866 2867// String returns the string representation 2868func (s DeleteSshPublicKeyInput) String() string { 2869 return awsutil.Prettify(s) 2870} 2871 2872// GoString returns the string representation 2873func (s DeleteSshPublicKeyInput) GoString() string { 2874 return s.String() 2875} 2876 2877// Validate inspects the fields of the type to determine if they are valid. 2878func (s *DeleteSshPublicKeyInput) Validate() error { 2879 invalidParams := request.ErrInvalidParams{Context: "DeleteSshPublicKeyInput"} 2880 if s.ServerId == nil { 2881 invalidParams.Add(request.NewErrParamRequired("ServerId")) 2882 } 2883 if s.ServerId != nil && len(*s.ServerId) < 19 { 2884 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 2885 } 2886 if s.SshPublicKeyId == nil { 2887 invalidParams.Add(request.NewErrParamRequired("SshPublicKeyId")) 2888 } 2889 if s.SshPublicKeyId != nil && len(*s.SshPublicKeyId) < 21 { 2890 invalidParams.Add(request.NewErrParamMinLen("SshPublicKeyId", 21)) 2891 } 2892 if s.UserName == nil { 2893 invalidParams.Add(request.NewErrParamRequired("UserName")) 2894 } 2895 if s.UserName != nil && len(*s.UserName) < 3 { 2896 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 2897 } 2898 2899 if invalidParams.Len() > 0 { 2900 return invalidParams 2901 } 2902 return nil 2903} 2904 2905// SetServerId sets the ServerId field's value. 2906func (s *DeleteSshPublicKeyInput) SetServerId(v string) *DeleteSshPublicKeyInput { 2907 s.ServerId = &v 2908 return s 2909} 2910 2911// SetSshPublicKeyId sets the SshPublicKeyId field's value. 2912func (s *DeleteSshPublicKeyInput) SetSshPublicKeyId(v string) *DeleteSshPublicKeyInput { 2913 s.SshPublicKeyId = &v 2914 return s 2915} 2916 2917// SetUserName sets the UserName field's value. 2918func (s *DeleteSshPublicKeyInput) SetUserName(v string) *DeleteSshPublicKeyInput { 2919 s.UserName = &v 2920 return s 2921} 2922 2923type DeleteSshPublicKeyOutput struct { 2924 _ struct{} `type:"structure"` 2925} 2926 2927// String returns the string representation 2928func (s DeleteSshPublicKeyOutput) String() string { 2929 return awsutil.Prettify(s) 2930} 2931 2932// GoString returns the string representation 2933func (s DeleteSshPublicKeyOutput) GoString() string { 2934 return s.String() 2935} 2936 2937type DeleteUserInput struct { 2938 _ struct{} `type:"structure"` 2939 2940 // A system-assigned unique identifier for a server instance that has the user 2941 // assigned to it. 2942 // 2943 // ServerId is a required field 2944 ServerId *string `min:"19" type:"string" required:"true"` 2945 2946 // A unique string that identifies a user that is being deleted from a server. 2947 // 2948 // UserName is a required field 2949 UserName *string `min:"3" type:"string" required:"true"` 2950} 2951 2952// String returns the string representation 2953func (s DeleteUserInput) String() string { 2954 return awsutil.Prettify(s) 2955} 2956 2957// GoString returns the string representation 2958func (s DeleteUserInput) GoString() string { 2959 return s.String() 2960} 2961 2962// Validate inspects the fields of the type to determine if they are valid. 2963func (s *DeleteUserInput) Validate() error { 2964 invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} 2965 if s.ServerId == nil { 2966 invalidParams.Add(request.NewErrParamRequired("ServerId")) 2967 } 2968 if s.ServerId != nil && len(*s.ServerId) < 19 { 2969 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 2970 } 2971 if s.UserName == nil { 2972 invalidParams.Add(request.NewErrParamRequired("UserName")) 2973 } 2974 if s.UserName != nil && len(*s.UserName) < 3 { 2975 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 2976 } 2977 2978 if invalidParams.Len() > 0 { 2979 return invalidParams 2980 } 2981 return nil 2982} 2983 2984// SetServerId sets the ServerId field's value. 2985func (s *DeleteUserInput) SetServerId(v string) *DeleteUserInput { 2986 s.ServerId = &v 2987 return s 2988} 2989 2990// SetUserName sets the UserName field's value. 2991func (s *DeleteUserInput) SetUserName(v string) *DeleteUserInput { 2992 s.UserName = &v 2993 return s 2994} 2995 2996type DeleteUserOutput struct { 2997 _ struct{} `type:"structure"` 2998} 2999 3000// String returns the string representation 3001func (s DeleteUserOutput) String() string { 3002 return awsutil.Prettify(s) 3003} 3004 3005// GoString returns the string representation 3006func (s DeleteUserOutput) GoString() string { 3007 return s.String() 3008} 3009 3010type DescribeSecurityPolicyInput struct { 3011 _ struct{} `type:"structure"` 3012 3013 // Specifies the name of the security policy that is attached to the server. 3014 // 3015 // SecurityPolicyName is a required field 3016 SecurityPolicyName *string `type:"string" required:"true"` 3017} 3018 3019// String returns the string representation 3020func (s DescribeSecurityPolicyInput) String() string { 3021 return awsutil.Prettify(s) 3022} 3023 3024// GoString returns the string representation 3025func (s DescribeSecurityPolicyInput) GoString() string { 3026 return s.String() 3027} 3028 3029// Validate inspects the fields of the type to determine if they are valid. 3030func (s *DescribeSecurityPolicyInput) Validate() error { 3031 invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityPolicyInput"} 3032 if s.SecurityPolicyName == nil { 3033 invalidParams.Add(request.NewErrParamRequired("SecurityPolicyName")) 3034 } 3035 3036 if invalidParams.Len() > 0 { 3037 return invalidParams 3038 } 3039 return nil 3040} 3041 3042// SetSecurityPolicyName sets the SecurityPolicyName field's value. 3043func (s *DescribeSecurityPolicyInput) SetSecurityPolicyName(v string) *DescribeSecurityPolicyInput { 3044 s.SecurityPolicyName = &v 3045 return s 3046} 3047 3048type DescribeSecurityPolicyOutput struct { 3049 _ struct{} `type:"structure"` 3050 3051 // An array containing the properties of the security policy. 3052 // 3053 // SecurityPolicy is a required field 3054 SecurityPolicy *DescribedSecurityPolicy `type:"structure" required:"true"` 3055} 3056 3057// String returns the string representation 3058func (s DescribeSecurityPolicyOutput) String() string { 3059 return awsutil.Prettify(s) 3060} 3061 3062// GoString returns the string representation 3063func (s DescribeSecurityPolicyOutput) GoString() string { 3064 return s.String() 3065} 3066 3067// SetSecurityPolicy sets the SecurityPolicy field's value. 3068func (s *DescribeSecurityPolicyOutput) SetSecurityPolicy(v *DescribedSecurityPolicy) *DescribeSecurityPolicyOutput { 3069 s.SecurityPolicy = v 3070 return s 3071} 3072 3073type DescribeServerInput struct { 3074 _ struct{} `type:"structure"` 3075 3076 // A system-assigned unique identifier for a server. 3077 // 3078 // ServerId is a required field 3079 ServerId *string `min:"19" type:"string" required:"true"` 3080} 3081 3082// String returns the string representation 3083func (s DescribeServerInput) String() string { 3084 return awsutil.Prettify(s) 3085} 3086 3087// GoString returns the string representation 3088func (s DescribeServerInput) GoString() string { 3089 return s.String() 3090} 3091 3092// Validate inspects the fields of the type to determine if they are valid. 3093func (s *DescribeServerInput) Validate() error { 3094 invalidParams := request.ErrInvalidParams{Context: "DescribeServerInput"} 3095 if s.ServerId == nil { 3096 invalidParams.Add(request.NewErrParamRequired("ServerId")) 3097 } 3098 if s.ServerId != nil && len(*s.ServerId) < 19 { 3099 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 3100 } 3101 3102 if invalidParams.Len() > 0 { 3103 return invalidParams 3104 } 3105 return nil 3106} 3107 3108// SetServerId sets the ServerId field's value. 3109func (s *DescribeServerInput) SetServerId(v string) *DescribeServerInput { 3110 s.ServerId = &v 3111 return s 3112} 3113 3114type DescribeServerOutput struct { 3115 _ struct{} `type:"structure"` 3116 3117 // An array containing the properties of a server with the ServerID you specified. 3118 // 3119 // Server is a required field 3120 Server *DescribedServer `type:"structure" required:"true"` 3121} 3122 3123// String returns the string representation 3124func (s DescribeServerOutput) String() string { 3125 return awsutil.Prettify(s) 3126} 3127 3128// GoString returns the string representation 3129func (s DescribeServerOutput) GoString() string { 3130 return s.String() 3131} 3132 3133// SetServer sets the Server field's value. 3134func (s *DescribeServerOutput) SetServer(v *DescribedServer) *DescribeServerOutput { 3135 s.Server = v 3136 return s 3137} 3138 3139type DescribeUserInput struct { 3140 _ struct{} `type:"structure"` 3141 3142 // A system-assigned unique identifier for a server that has this user assigned. 3143 // 3144 // ServerId is a required field 3145 ServerId *string `min:"19" type:"string" required:"true"` 3146 3147 // The name of the user assigned to one or more servers. User names are part 3148 // of the sign-in credentials to use the AWS Transfer Family service and perform 3149 // file transfer tasks. 3150 // 3151 // UserName is a required field 3152 UserName *string `min:"3" type:"string" required:"true"` 3153} 3154 3155// String returns the string representation 3156func (s DescribeUserInput) String() string { 3157 return awsutil.Prettify(s) 3158} 3159 3160// GoString returns the string representation 3161func (s DescribeUserInput) GoString() string { 3162 return s.String() 3163} 3164 3165// Validate inspects the fields of the type to determine if they are valid. 3166func (s *DescribeUserInput) Validate() error { 3167 invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"} 3168 if s.ServerId == nil { 3169 invalidParams.Add(request.NewErrParamRequired("ServerId")) 3170 } 3171 if s.ServerId != nil && len(*s.ServerId) < 19 { 3172 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 3173 } 3174 if s.UserName == nil { 3175 invalidParams.Add(request.NewErrParamRequired("UserName")) 3176 } 3177 if s.UserName != nil && len(*s.UserName) < 3 { 3178 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 3179 } 3180 3181 if invalidParams.Len() > 0 { 3182 return invalidParams 3183 } 3184 return nil 3185} 3186 3187// SetServerId sets the ServerId field's value. 3188func (s *DescribeUserInput) SetServerId(v string) *DescribeUserInput { 3189 s.ServerId = &v 3190 return s 3191} 3192 3193// SetUserName sets the UserName field's value. 3194func (s *DescribeUserInput) SetUserName(v string) *DescribeUserInput { 3195 s.UserName = &v 3196 return s 3197} 3198 3199type DescribeUserOutput struct { 3200 _ struct{} `type:"structure"` 3201 3202 // A system-assigned unique identifier for a server that has this user assigned. 3203 // 3204 // ServerId is a required field 3205 ServerId *string `min:"19" type:"string" required:"true"` 3206 3207 // An array containing the properties of the user account for the ServerID value 3208 // that you specified. 3209 // 3210 // User is a required field 3211 User *DescribedUser `type:"structure" required:"true"` 3212} 3213 3214// String returns the string representation 3215func (s DescribeUserOutput) String() string { 3216 return awsutil.Prettify(s) 3217} 3218 3219// GoString returns the string representation 3220func (s DescribeUserOutput) GoString() string { 3221 return s.String() 3222} 3223 3224// SetServerId sets the ServerId field's value. 3225func (s *DescribeUserOutput) SetServerId(v string) *DescribeUserOutput { 3226 s.ServerId = &v 3227 return s 3228} 3229 3230// SetUser sets the User field's value. 3231func (s *DescribeUserOutput) SetUser(v *DescribedUser) *DescribeUserOutput { 3232 s.User = v 3233 return s 3234} 3235 3236// Describes the properties of a security policy that was specified. For more 3237// information about security policies, see Working with security policies (https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html). 3238type DescribedSecurityPolicy struct { 3239 _ struct{} `type:"structure"` 3240 3241 // Specifies whether this policy enables Federal Information Processing Standards 3242 // (FIPS). 3243 Fips *bool `type:"boolean"` 3244 3245 // Specifies the name of the security policy that is attached to the server. 3246 // 3247 // SecurityPolicyName is a required field 3248 SecurityPolicyName *string `type:"string" required:"true"` 3249 3250 // Specifies the enabled Secure Shell (SSH) cipher encryption algorithms in 3251 // the security policy that is attached to the server. 3252 SshCiphers []*string `type:"list"` 3253 3254 // Specifies the enabled SSH key exchange (KEX) encryption algorithms in the 3255 // security policy that is attached to the server. 3256 SshKexs []*string `type:"list"` 3257 3258 // Specifies the enabled SSH message authentication code (MAC) encryption algorithms 3259 // in the security policy that is attached to the server. 3260 SshMacs []*string `type:"list"` 3261 3262 // Specifies the enabled Transport Layer Security (TLS) cipher encryption algorithms 3263 // in the security policy that is attached to the server. 3264 TlsCiphers []*string `type:"list"` 3265} 3266 3267// String returns the string representation 3268func (s DescribedSecurityPolicy) String() string { 3269 return awsutil.Prettify(s) 3270} 3271 3272// GoString returns the string representation 3273func (s DescribedSecurityPolicy) GoString() string { 3274 return s.String() 3275} 3276 3277// SetFips sets the Fips field's value. 3278func (s *DescribedSecurityPolicy) SetFips(v bool) *DescribedSecurityPolicy { 3279 s.Fips = &v 3280 return s 3281} 3282 3283// SetSecurityPolicyName sets the SecurityPolicyName field's value. 3284func (s *DescribedSecurityPolicy) SetSecurityPolicyName(v string) *DescribedSecurityPolicy { 3285 s.SecurityPolicyName = &v 3286 return s 3287} 3288 3289// SetSshCiphers sets the SshCiphers field's value. 3290func (s *DescribedSecurityPolicy) SetSshCiphers(v []*string) *DescribedSecurityPolicy { 3291 s.SshCiphers = v 3292 return s 3293} 3294 3295// SetSshKexs sets the SshKexs field's value. 3296func (s *DescribedSecurityPolicy) SetSshKexs(v []*string) *DescribedSecurityPolicy { 3297 s.SshKexs = v 3298 return s 3299} 3300 3301// SetSshMacs sets the SshMacs field's value. 3302func (s *DescribedSecurityPolicy) SetSshMacs(v []*string) *DescribedSecurityPolicy { 3303 s.SshMacs = v 3304 return s 3305} 3306 3307// SetTlsCiphers sets the TlsCiphers field's value. 3308func (s *DescribedSecurityPolicy) SetTlsCiphers(v []*string) *DescribedSecurityPolicy { 3309 s.TlsCiphers = v 3310 return s 3311} 3312 3313// Describes the properties of a file transfer protocol-enabled server that 3314// was specified. 3315type DescribedServer struct { 3316 _ struct{} `type:"structure"` 3317 3318 // Specifies the unique Amazon Resource Name (ARN) of the server. 3319 // 3320 // Arn is a required field 3321 Arn *string `min:"20" type:"string" required:"true"` 3322 3323 // Specifies the ARN of the AWS Certificate Manager (ACM) certificate. Required 3324 // when Protocols is set to FTPS. 3325 Certificate *string `type:"string"` 3326 3327 // Specifies the virtual private cloud (VPC) endpoint settings that you configured 3328 // for your server. 3329 EndpointDetails *EndpointDetails `type:"structure"` 3330 3331 // Defines the type of endpoint that your server is connected to. If your server 3332 // is connected to a VPC endpoint, your server isn't accessible over the public 3333 // internet. 3334 EndpointType *string `type:"string" enum:"EndpointType"` 3335 3336 // Specifies the Base64-encoded SHA256 fingerprint of the server's host key. 3337 // This value is equivalent to the output of the ssh-keygen -l -f my-new-server-key 3338 // command. 3339 HostKeyFingerprint *string `type:"string"` 3340 3341 // Specifies information to call a customer-supplied authentication API. This 3342 // field is not populated when the IdentityProviderType of a server is SERVICE_MANAGED. 3343 IdentityProviderDetails *IdentityProviderDetails `type:"structure"` 3344 3345 // Specifies the mode of authentication method enabled for this service. A value 3346 // of SERVICE_MANAGED means that you are using this server to store and access 3347 // user credentials within the service. A value of API_GATEWAY indicates that 3348 // you have integrated an API Gateway endpoint that will be invoked for authenticating 3349 // your user into the service. 3350 IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` 3351 3352 // Specifies the AWS Identity and Access Management (IAM) role that allows a 3353 // server to turn on Amazon CloudWatch logging for Amazon S3 events. When set, 3354 // user activity can be viewed in your CloudWatch logs. 3355 LoggingRole *string `min:"20" type:"string"` 3356 3357 // Specifies the file transfer protocol or protocols over which your file transfer 3358 // protocol client can connect to your server's endpoint. The available protocols 3359 // are: 3360 // 3361 // * SFTP (Secure Shell (SSH) File Transfer Protocol): File transfer over 3362 // SSH 3363 // 3364 // * FTPS (File Transfer Protocol Secure): File transfer with TLS encryption 3365 // 3366 // * FTP (File Transfer Protocol): Unencrypted file transfer 3367 Protocols []*string `min:"1" type:"list"` 3368 3369 // Specifies the name of the security policy that is attached to the server. 3370 SecurityPolicyName *string `type:"string"` 3371 3372 // Specifies the unique system-assigned identifier for a server that you instantiate. 3373 ServerId *string `min:"19" type:"string"` 3374 3375 // Specifies the condition of a server for the server that was described. A 3376 // value of ONLINE indicates that the server can accept jobs and transfer files. 3377 // A State value of OFFLINE means that the server cannot perform file transfer 3378 // operations. 3379 // 3380 // The states of STARTING and STOPPING indicate that the server is in an intermediate 3381 // state, either not fully able to respond, or not fully offline. The values 3382 // of START_FAILED or STOP_FAILED can indicate an error condition. 3383 State *string `type:"string" enum:"State"` 3384 3385 // Specifies the key-value pairs that you can use to search for and group servers 3386 // that were assigned to the server that was described. 3387 Tags []*Tag `min:"1" type:"list"` 3388 3389 // Specifies the number of users that are assigned to a server you specified 3390 // with the ServerId. 3391 UserCount *int64 `type:"integer"` 3392} 3393 3394// String returns the string representation 3395func (s DescribedServer) String() string { 3396 return awsutil.Prettify(s) 3397} 3398 3399// GoString returns the string representation 3400func (s DescribedServer) GoString() string { 3401 return s.String() 3402} 3403 3404// SetArn sets the Arn field's value. 3405func (s *DescribedServer) SetArn(v string) *DescribedServer { 3406 s.Arn = &v 3407 return s 3408} 3409 3410// SetCertificate sets the Certificate field's value. 3411func (s *DescribedServer) SetCertificate(v string) *DescribedServer { 3412 s.Certificate = &v 3413 return s 3414} 3415 3416// SetEndpointDetails sets the EndpointDetails field's value. 3417func (s *DescribedServer) SetEndpointDetails(v *EndpointDetails) *DescribedServer { 3418 s.EndpointDetails = v 3419 return s 3420} 3421 3422// SetEndpointType sets the EndpointType field's value. 3423func (s *DescribedServer) SetEndpointType(v string) *DescribedServer { 3424 s.EndpointType = &v 3425 return s 3426} 3427 3428// SetHostKeyFingerprint sets the HostKeyFingerprint field's value. 3429func (s *DescribedServer) SetHostKeyFingerprint(v string) *DescribedServer { 3430 s.HostKeyFingerprint = &v 3431 return s 3432} 3433 3434// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. 3435func (s *DescribedServer) SetIdentityProviderDetails(v *IdentityProviderDetails) *DescribedServer { 3436 s.IdentityProviderDetails = v 3437 return s 3438} 3439 3440// SetIdentityProviderType sets the IdentityProviderType field's value. 3441func (s *DescribedServer) SetIdentityProviderType(v string) *DescribedServer { 3442 s.IdentityProviderType = &v 3443 return s 3444} 3445 3446// SetLoggingRole sets the LoggingRole field's value. 3447func (s *DescribedServer) SetLoggingRole(v string) *DescribedServer { 3448 s.LoggingRole = &v 3449 return s 3450} 3451 3452// SetProtocols sets the Protocols field's value. 3453func (s *DescribedServer) SetProtocols(v []*string) *DescribedServer { 3454 s.Protocols = v 3455 return s 3456} 3457 3458// SetSecurityPolicyName sets the SecurityPolicyName field's value. 3459func (s *DescribedServer) SetSecurityPolicyName(v string) *DescribedServer { 3460 s.SecurityPolicyName = &v 3461 return s 3462} 3463 3464// SetServerId sets the ServerId field's value. 3465func (s *DescribedServer) SetServerId(v string) *DescribedServer { 3466 s.ServerId = &v 3467 return s 3468} 3469 3470// SetState sets the State field's value. 3471func (s *DescribedServer) SetState(v string) *DescribedServer { 3472 s.State = &v 3473 return s 3474} 3475 3476// SetTags sets the Tags field's value. 3477func (s *DescribedServer) SetTags(v []*Tag) *DescribedServer { 3478 s.Tags = v 3479 return s 3480} 3481 3482// SetUserCount sets the UserCount field's value. 3483func (s *DescribedServer) SetUserCount(v int64) *DescribedServer { 3484 s.UserCount = &v 3485 return s 3486} 3487 3488// Describes the properties of a user that was specified. 3489type DescribedUser struct { 3490 _ struct{} `type:"structure"` 3491 3492 // Specifies the unique Amazon Resource Name (ARN) for the user that was requested 3493 // to be described. 3494 // 3495 // Arn is a required field 3496 Arn *string `min:"20" type:"string" required:"true"` 3497 3498 // Specifies the landing directory (or folder), which is the location that files 3499 // are written to or read from in an Amazon S3 bucket, for the described user. 3500 // An example is your-Amazon-S3-bucket-name>/home/username . 3501 HomeDirectory *string `type:"string"` 3502 3503 // Specifies the logical directory mappings that specify what Amazon S3 paths 3504 // and keys should be visible to your user and how you want to make them visible. 3505 // You will need to specify the "Entry" and "Target" pair, where Entry shows 3506 // how the path is made visible and Target is the actual Amazon S3 path. If 3507 // you only specify a target, it will be displayed as is. You will need to also 3508 // make sure that your AWS Identity and Access Management (IAM) role provides 3509 // access to paths in Target. 3510 // 3511 // In most cases, you can use this value instead of the scope-down policy to 3512 // lock your user down to the designated home directory ("chroot"). To do this, 3513 // you can set Entry to '/' and set Target to the HomeDirectory parameter value. 3514 HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` 3515 3516 // Specifies the type of landing directory (folder) you mapped for your users 3517 // to see when they log into the file transfer protocol-enabled server. If you 3518 // set it to PATH, the user will see the absolute Amazon S3 bucket paths as 3519 // is in their file transfer protocol clients. If you set it LOGICAL, you will 3520 // need to provide mappings in the HomeDirectoryMappings for how you want to 3521 // make Amazon S3 paths visible to your users. 3522 HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` 3523 3524 // Specifies the name of the policy in use for the described user. 3525 Policy *string `type:"string"` 3526 3527 // Specifies the IAM role that controls your users' access to your Amazon S3 3528 // bucket. The policies attached to this role will determine the level of access 3529 // you want to provide your users when transferring files into and out of your 3530 // Amazon S3 bucket or buckets. The IAM role should also contain a trust relationship 3531 // that allows a server to access your resources when servicing your users' 3532 // transfer requests. 3533 Role *string `min:"20" type:"string"` 3534 3535 // Specifies the public key portion of the Secure Shell (SSH) keys stored for 3536 // the described user. 3537 SshPublicKeys []*SshPublicKey `type:"list"` 3538 3539 // Specifies the key-value pairs for the user requested. Tag can be used to 3540 // search for and group users for a variety of purposes. 3541 Tags []*Tag `min:"1" type:"list"` 3542 3543 // Specifies the name of the user that was requested to be described. User names 3544 // are used for authentication purposes. This is the string that will be used 3545 // by your user when they log in to your server. 3546 UserName *string `min:"3" type:"string"` 3547} 3548 3549// String returns the string representation 3550func (s DescribedUser) String() string { 3551 return awsutil.Prettify(s) 3552} 3553 3554// GoString returns the string representation 3555func (s DescribedUser) GoString() string { 3556 return s.String() 3557} 3558 3559// SetArn sets the Arn field's value. 3560func (s *DescribedUser) SetArn(v string) *DescribedUser { 3561 s.Arn = &v 3562 return s 3563} 3564 3565// SetHomeDirectory sets the HomeDirectory field's value. 3566func (s *DescribedUser) SetHomeDirectory(v string) *DescribedUser { 3567 s.HomeDirectory = &v 3568 return s 3569} 3570 3571// SetHomeDirectoryMappings sets the HomeDirectoryMappings field's value. 3572func (s *DescribedUser) SetHomeDirectoryMappings(v []*HomeDirectoryMapEntry) *DescribedUser { 3573 s.HomeDirectoryMappings = v 3574 return s 3575} 3576 3577// SetHomeDirectoryType sets the HomeDirectoryType field's value. 3578func (s *DescribedUser) SetHomeDirectoryType(v string) *DescribedUser { 3579 s.HomeDirectoryType = &v 3580 return s 3581} 3582 3583// SetPolicy sets the Policy field's value. 3584func (s *DescribedUser) SetPolicy(v string) *DescribedUser { 3585 s.Policy = &v 3586 return s 3587} 3588 3589// SetRole sets the Role field's value. 3590func (s *DescribedUser) SetRole(v string) *DescribedUser { 3591 s.Role = &v 3592 return s 3593} 3594 3595// SetSshPublicKeys sets the SshPublicKeys field's value. 3596func (s *DescribedUser) SetSshPublicKeys(v []*SshPublicKey) *DescribedUser { 3597 s.SshPublicKeys = v 3598 return s 3599} 3600 3601// SetTags sets the Tags field's value. 3602func (s *DescribedUser) SetTags(v []*Tag) *DescribedUser { 3603 s.Tags = v 3604 return s 3605} 3606 3607// SetUserName sets the UserName field's value. 3608func (s *DescribedUser) SetUserName(v string) *DescribedUser { 3609 s.UserName = &v 3610 return s 3611} 3612 3613// The virtual private cloud (VPC) endpoint settings that are configured for 3614// your file transfer protocol-enabled server. With a VPC endpoint, you can 3615// restrict access to your server and resources only within your VPC. To control 3616// incoming internet traffic, invoke the UpdateServer API and attach an Elastic 3617// IP to your server's endpoint. 3618type EndpointDetails struct { 3619 _ struct{} `type:"structure"` 3620 3621 // A list of address allocation IDs that are required to attach an Elastic IP 3622 // address to your server's endpoint. 3623 // 3624 // This property can only be set when EndpointType is set to VPC and it is only 3625 // valid in the UpdateServer API. 3626 AddressAllocationIds []*string `type:"list"` 3627 3628 // A list of security groups IDs that are available to attach to your server's 3629 // endpoint. 3630 // 3631 // This property can only be set when EndpointType is set to VPC. 3632 // 3633 // You can only edit the SecurityGroupIds property in the UpdateServer API and 3634 // only if you are changing the EndpointType from PUBLIC or VPC_ENDPOINT to 3635 // VPC. 3636 SecurityGroupIds []*string `type:"list"` 3637 3638 // A list of subnet IDs that are required to host your server endpoint in your 3639 // VPC. 3640 // 3641 // This property can only be set when EndpointType is set to VPC. 3642 SubnetIds []*string `type:"list"` 3643 3644 // The ID of the VPC endpoint. 3645 // 3646 // This property can only be set when EndpointType is set to VPC_ENDPOINT. 3647 VpcEndpointId *string `min:"22" type:"string"` 3648 3649 // The VPC ID of the VPC in which a server's endpoint will be hosted. 3650 // 3651 // This property can only be set when EndpointType is set to VPC. 3652 VpcId *string `type:"string"` 3653} 3654 3655// String returns the string representation 3656func (s EndpointDetails) String() string { 3657 return awsutil.Prettify(s) 3658} 3659 3660// GoString returns the string representation 3661func (s EndpointDetails) GoString() string { 3662 return s.String() 3663} 3664 3665// Validate inspects the fields of the type to determine if they are valid. 3666func (s *EndpointDetails) Validate() error { 3667 invalidParams := request.ErrInvalidParams{Context: "EndpointDetails"} 3668 if s.VpcEndpointId != nil && len(*s.VpcEndpointId) < 22 { 3669 invalidParams.Add(request.NewErrParamMinLen("VpcEndpointId", 22)) 3670 } 3671 3672 if invalidParams.Len() > 0 { 3673 return invalidParams 3674 } 3675 return nil 3676} 3677 3678// SetAddressAllocationIds sets the AddressAllocationIds field's value. 3679func (s *EndpointDetails) SetAddressAllocationIds(v []*string) *EndpointDetails { 3680 s.AddressAllocationIds = v 3681 return s 3682} 3683 3684// SetSecurityGroupIds sets the SecurityGroupIds field's value. 3685func (s *EndpointDetails) SetSecurityGroupIds(v []*string) *EndpointDetails { 3686 s.SecurityGroupIds = v 3687 return s 3688} 3689 3690// SetSubnetIds sets the SubnetIds field's value. 3691func (s *EndpointDetails) SetSubnetIds(v []*string) *EndpointDetails { 3692 s.SubnetIds = v 3693 return s 3694} 3695 3696// SetVpcEndpointId sets the VpcEndpointId field's value. 3697func (s *EndpointDetails) SetVpcEndpointId(v string) *EndpointDetails { 3698 s.VpcEndpointId = &v 3699 return s 3700} 3701 3702// SetVpcId sets the VpcId field's value. 3703func (s *EndpointDetails) SetVpcId(v string) *EndpointDetails { 3704 s.VpcId = &v 3705 return s 3706} 3707 3708// Represents an object that contains entries and targets for HomeDirectoryMappings. 3709type HomeDirectoryMapEntry struct { 3710 _ struct{} `type:"structure"` 3711 3712 // Represents an entry and a target for HomeDirectoryMappings. 3713 // 3714 // Entry is a required field 3715 Entry *string `type:"string" required:"true"` 3716 3717 // Represents the map target that is used in a HomeDirectorymapEntry. 3718 // 3719 // Target is a required field 3720 Target *string `type:"string" required:"true"` 3721} 3722 3723// String returns the string representation 3724func (s HomeDirectoryMapEntry) String() string { 3725 return awsutil.Prettify(s) 3726} 3727 3728// GoString returns the string representation 3729func (s HomeDirectoryMapEntry) GoString() string { 3730 return s.String() 3731} 3732 3733// Validate inspects the fields of the type to determine if they are valid. 3734func (s *HomeDirectoryMapEntry) Validate() error { 3735 invalidParams := request.ErrInvalidParams{Context: "HomeDirectoryMapEntry"} 3736 if s.Entry == nil { 3737 invalidParams.Add(request.NewErrParamRequired("Entry")) 3738 } 3739 if s.Target == nil { 3740 invalidParams.Add(request.NewErrParamRequired("Target")) 3741 } 3742 3743 if invalidParams.Len() > 0 { 3744 return invalidParams 3745 } 3746 return nil 3747} 3748 3749// SetEntry sets the Entry field's value. 3750func (s *HomeDirectoryMapEntry) SetEntry(v string) *HomeDirectoryMapEntry { 3751 s.Entry = &v 3752 return s 3753} 3754 3755// SetTarget sets the Target field's value. 3756func (s *HomeDirectoryMapEntry) SetTarget(v string) *HomeDirectoryMapEntry { 3757 s.Target = &v 3758 return s 3759} 3760 3761// Returns information related to the type of user authentication that is in 3762// use for a file transfer protocol-enabled server's users. A server can have 3763// only one method of authentication. 3764type IdentityProviderDetails struct { 3765 _ struct{} `type:"structure"` 3766 3767 // Provides the type of InvocationRole used to authenticate the user account. 3768 InvocationRole *string `min:"20" type:"string"` 3769 3770 // Provides the location of the service endpoint used to authenticate users. 3771 Url *string `type:"string"` 3772} 3773 3774// String returns the string representation 3775func (s IdentityProviderDetails) String() string { 3776 return awsutil.Prettify(s) 3777} 3778 3779// GoString returns the string representation 3780func (s IdentityProviderDetails) GoString() string { 3781 return s.String() 3782} 3783 3784// Validate inspects the fields of the type to determine if they are valid. 3785func (s *IdentityProviderDetails) Validate() error { 3786 invalidParams := request.ErrInvalidParams{Context: "IdentityProviderDetails"} 3787 if s.InvocationRole != nil && len(*s.InvocationRole) < 20 { 3788 invalidParams.Add(request.NewErrParamMinLen("InvocationRole", 20)) 3789 } 3790 3791 if invalidParams.Len() > 0 { 3792 return invalidParams 3793 } 3794 return nil 3795} 3796 3797// SetInvocationRole sets the InvocationRole field's value. 3798func (s *IdentityProviderDetails) SetInvocationRole(v string) *IdentityProviderDetails { 3799 s.InvocationRole = &v 3800 return s 3801} 3802 3803// SetUrl sets the Url field's value. 3804func (s *IdentityProviderDetails) SetUrl(v string) *IdentityProviderDetails { 3805 s.Url = &v 3806 return s 3807} 3808 3809type ImportSshPublicKeyInput struct { 3810 _ struct{} `type:"structure"` 3811 3812 // A system-assigned unique identifier for a server. 3813 // 3814 // ServerId is a required field 3815 ServerId *string `min:"19" type:"string" required:"true"` 3816 3817 // The public key portion of an SSH key pair. 3818 // 3819 // SshPublicKeyBody is a required field 3820 SshPublicKeyBody *string `type:"string" required:"true"` 3821 3822 // The name of the user account that is assigned to one or more servers. 3823 // 3824 // UserName is a required field 3825 UserName *string `min:"3" type:"string" required:"true"` 3826} 3827 3828// String returns the string representation 3829func (s ImportSshPublicKeyInput) String() string { 3830 return awsutil.Prettify(s) 3831} 3832 3833// GoString returns the string representation 3834func (s ImportSshPublicKeyInput) GoString() string { 3835 return s.String() 3836} 3837 3838// Validate inspects the fields of the type to determine if they are valid. 3839func (s *ImportSshPublicKeyInput) Validate() error { 3840 invalidParams := request.ErrInvalidParams{Context: "ImportSshPublicKeyInput"} 3841 if s.ServerId == nil { 3842 invalidParams.Add(request.NewErrParamRequired("ServerId")) 3843 } 3844 if s.ServerId != nil && len(*s.ServerId) < 19 { 3845 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 3846 } 3847 if s.SshPublicKeyBody == nil { 3848 invalidParams.Add(request.NewErrParamRequired("SshPublicKeyBody")) 3849 } 3850 if s.UserName == nil { 3851 invalidParams.Add(request.NewErrParamRequired("UserName")) 3852 } 3853 if s.UserName != nil && len(*s.UserName) < 3 { 3854 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 3855 } 3856 3857 if invalidParams.Len() > 0 { 3858 return invalidParams 3859 } 3860 return nil 3861} 3862 3863// SetServerId sets the ServerId field's value. 3864func (s *ImportSshPublicKeyInput) SetServerId(v string) *ImportSshPublicKeyInput { 3865 s.ServerId = &v 3866 return s 3867} 3868 3869// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. 3870func (s *ImportSshPublicKeyInput) SetSshPublicKeyBody(v string) *ImportSshPublicKeyInput { 3871 s.SshPublicKeyBody = &v 3872 return s 3873} 3874 3875// SetUserName sets the UserName field's value. 3876func (s *ImportSshPublicKeyInput) SetUserName(v string) *ImportSshPublicKeyInput { 3877 s.UserName = &v 3878 return s 3879} 3880 3881// Identifies the user, the server they belong to, and the identifier of the 3882// SSH public key associated with that user. A user can have more than one key 3883// on each server that they are associated with. 3884type ImportSshPublicKeyOutput struct { 3885 _ struct{} `type:"structure"` 3886 3887 // A system-assigned unique identifier for a server. 3888 // 3889 // ServerId is a required field 3890 ServerId *string `min:"19" type:"string" required:"true"` 3891 3892 // The name given to a public key by the system that was imported. 3893 // 3894 // SshPublicKeyId is a required field 3895 SshPublicKeyId *string `min:"21" type:"string" required:"true"` 3896 3897 // A user name assigned to the ServerID value that you specified. 3898 // 3899 // UserName is a required field 3900 UserName *string `min:"3" type:"string" required:"true"` 3901} 3902 3903// String returns the string representation 3904func (s ImportSshPublicKeyOutput) String() string { 3905 return awsutil.Prettify(s) 3906} 3907 3908// GoString returns the string representation 3909func (s ImportSshPublicKeyOutput) GoString() string { 3910 return s.String() 3911} 3912 3913// SetServerId sets the ServerId field's value. 3914func (s *ImportSshPublicKeyOutput) SetServerId(v string) *ImportSshPublicKeyOutput { 3915 s.ServerId = &v 3916 return s 3917} 3918 3919// SetSshPublicKeyId sets the SshPublicKeyId field's value. 3920func (s *ImportSshPublicKeyOutput) SetSshPublicKeyId(v string) *ImportSshPublicKeyOutput { 3921 s.SshPublicKeyId = &v 3922 return s 3923} 3924 3925// SetUserName sets the UserName field's value. 3926func (s *ImportSshPublicKeyOutput) SetUserName(v string) *ImportSshPublicKeyOutput { 3927 s.UserName = &v 3928 return s 3929} 3930 3931// This exception is thrown when an error occurs in the AWS Transfer Family 3932// service. 3933type InternalServiceError struct { 3934 _ struct{} `type:"structure"` 3935 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3936 3937 Message_ *string `locationName:"Message" type:"string"` 3938} 3939 3940// String returns the string representation 3941func (s InternalServiceError) String() string { 3942 return awsutil.Prettify(s) 3943} 3944 3945// GoString returns the string representation 3946func (s InternalServiceError) GoString() string { 3947 return s.String() 3948} 3949 3950func newErrorInternalServiceError(v protocol.ResponseMetadata) error { 3951 return &InternalServiceError{ 3952 RespMetadata: v, 3953 } 3954} 3955 3956// Code returns the exception type name. 3957func (s *InternalServiceError) Code() string { 3958 return "InternalServiceError" 3959} 3960 3961// Message returns the exception's message. 3962func (s *InternalServiceError) Message() string { 3963 if s.Message_ != nil { 3964 return *s.Message_ 3965 } 3966 return "" 3967} 3968 3969// OrigErr always returns nil, satisfies awserr.Error interface. 3970func (s *InternalServiceError) OrigErr() error { 3971 return nil 3972} 3973 3974func (s *InternalServiceError) Error() string { 3975 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3976} 3977 3978// Status code returns the HTTP status code for the request's response error. 3979func (s *InternalServiceError) StatusCode() int { 3980 return s.RespMetadata.StatusCode 3981} 3982 3983// RequestID returns the service's response RequestID for request. 3984func (s *InternalServiceError) RequestID() string { 3985 return s.RespMetadata.RequestID 3986} 3987 3988// The NextToken parameter that was passed is invalid. 3989type InvalidNextTokenException struct { 3990 _ struct{} `type:"structure"` 3991 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3992 3993 Message_ *string `locationName:"Message" type:"string"` 3994} 3995 3996// String returns the string representation 3997func (s InvalidNextTokenException) String() string { 3998 return awsutil.Prettify(s) 3999} 4000 4001// GoString returns the string representation 4002func (s InvalidNextTokenException) GoString() string { 4003 return s.String() 4004} 4005 4006func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 4007 return &InvalidNextTokenException{ 4008 RespMetadata: v, 4009 } 4010} 4011 4012// Code returns the exception type name. 4013func (s *InvalidNextTokenException) Code() string { 4014 return "InvalidNextTokenException" 4015} 4016 4017// Message returns the exception's message. 4018func (s *InvalidNextTokenException) Message() string { 4019 if s.Message_ != nil { 4020 return *s.Message_ 4021 } 4022 return "" 4023} 4024 4025// OrigErr always returns nil, satisfies awserr.Error interface. 4026func (s *InvalidNextTokenException) OrigErr() error { 4027 return nil 4028} 4029 4030func (s *InvalidNextTokenException) Error() string { 4031 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4032} 4033 4034// Status code returns the HTTP status code for the request's response error. 4035func (s *InvalidNextTokenException) StatusCode() int { 4036 return s.RespMetadata.StatusCode 4037} 4038 4039// RequestID returns the service's response RequestID for request. 4040func (s *InvalidNextTokenException) RequestID() string { 4041 return s.RespMetadata.RequestID 4042} 4043 4044// This exception is thrown when the client submits a malformed request. 4045type InvalidRequestException struct { 4046 _ struct{} `type:"structure"` 4047 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4048 4049 Message_ *string `locationName:"Message" type:"string"` 4050} 4051 4052// String returns the string representation 4053func (s InvalidRequestException) String() string { 4054 return awsutil.Prettify(s) 4055} 4056 4057// GoString returns the string representation 4058func (s InvalidRequestException) GoString() string { 4059 return s.String() 4060} 4061 4062func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 4063 return &InvalidRequestException{ 4064 RespMetadata: v, 4065 } 4066} 4067 4068// Code returns the exception type name. 4069func (s *InvalidRequestException) Code() string { 4070 return "InvalidRequestException" 4071} 4072 4073// Message returns the exception's message. 4074func (s *InvalidRequestException) Message() string { 4075 if s.Message_ != nil { 4076 return *s.Message_ 4077 } 4078 return "" 4079} 4080 4081// OrigErr always returns nil, satisfies awserr.Error interface. 4082func (s *InvalidRequestException) OrigErr() error { 4083 return nil 4084} 4085 4086func (s *InvalidRequestException) Error() string { 4087 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4088} 4089 4090// Status code returns the HTTP status code for the request's response error. 4091func (s *InvalidRequestException) StatusCode() int { 4092 return s.RespMetadata.StatusCode 4093} 4094 4095// RequestID returns the service's response RequestID for request. 4096func (s *InvalidRequestException) RequestID() string { 4097 return s.RespMetadata.RequestID 4098} 4099 4100type ListSecurityPoliciesInput struct { 4101 _ struct{} `type:"structure"` 4102 4103 // Specifies the number of security policies to return as a response to the 4104 // ListSecurityPolicies query. 4105 MaxResults *int64 `min:"1" type:"integer"` 4106 4107 // When additional results are obtained from the ListSecurityPolicies command, 4108 // a NextToken parameter is returned in the output. You can then pass the NextToken 4109 // parameter in a subsequent command to continue listing additional security 4110 // policies. 4111 NextToken *string `min:"1" type:"string"` 4112} 4113 4114// String returns the string representation 4115func (s ListSecurityPoliciesInput) String() string { 4116 return awsutil.Prettify(s) 4117} 4118 4119// GoString returns the string representation 4120func (s ListSecurityPoliciesInput) GoString() string { 4121 return s.String() 4122} 4123 4124// Validate inspects the fields of the type to determine if they are valid. 4125func (s *ListSecurityPoliciesInput) Validate() error { 4126 invalidParams := request.ErrInvalidParams{Context: "ListSecurityPoliciesInput"} 4127 if s.MaxResults != nil && *s.MaxResults < 1 { 4128 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4129 } 4130 if s.NextToken != nil && len(*s.NextToken) < 1 { 4131 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4132 } 4133 4134 if invalidParams.Len() > 0 { 4135 return invalidParams 4136 } 4137 return nil 4138} 4139 4140// SetMaxResults sets the MaxResults field's value. 4141func (s *ListSecurityPoliciesInput) SetMaxResults(v int64) *ListSecurityPoliciesInput { 4142 s.MaxResults = &v 4143 return s 4144} 4145 4146// SetNextToken sets the NextToken field's value. 4147func (s *ListSecurityPoliciesInput) SetNextToken(v string) *ListSecurityPoliciesInput { 4148 s.NextToken = &v 4149 return s 4150} 4151 4152type ListSecurityPoliciesOutput struct { 4153 _ struct{} `type:"structure"` 4154 4155 // When you can get additional results from the ListSecurityPolicies operation, 4156 // a NextToken parameter is returned in the output. In a following command, 4157 // you can pass in the NextToken parameter to continue listing security policies. 4158 NextToken *string `min:"1" type:"string"` 4159 4160 // An array of security policies that were listed. 4161 // 4162 // SecurityPolicyNames is a required field 4163 SecurityPolicyNames []*string `type:"list" required:"true"` 4164} 4165 4166// String returns the string representation 4167func (s ListSecurityPoliciesOutput) String() string { 4168 return awsutil.Prettify(s) 4169} 4170 4171// GoString returns the string representation 4172func (s ListSecurityPoliciesOutput) GoString() string { 4173 return s.String() 4174} 4175 4176// SetNextToken sets the NextToken field's value. 4177func (s *ListSecurityPoliciesOutput) SetNextToken(v string) *ListSecurityPoliciesOutput { 4178 s.NextToken = &v 4179 return s 4180} 4181 4182// SetSecurityPolicyNames sets the SecurityPolicyNames field's value. 4183func (s *ListSecurityPoliciesOutput) SetSecurityPolicyNames(v []*string) *ListSecurityPoliciesOutput { 4184 s.SecurityPolicyNames = v 4185 return s 4186} 4187 4188type ListServersInput struct { 4189 _ struct{} `type:"structure"` 4190 4191 // Specifies the number of servers to return as a response to the ListServers 4192 // query. 4193 MaxResults *int64 `min:"1" type:"integer"` 4194 4195 // When additional results are obtained from the ListServers command, a NextToken 4196 // parameter is returned in the output. You can then pass the NextToken parameter 4197 // in a subsequent command to continue listing additional servers. 4198 NextToken *string `min:"1" type:"string"` 4199} 4200 4201// String returns the string representation 4202func (s ListServersInput) String() string { 4203 return awsutil.Prettify(s) 4204} 4205 4206// GoString returns the string representation 4207func (s ListServersInput) GoString() string { 4208 return s.String() 4209} 4210 4211// Validate inspects the fields of the type to determine if they are valid. 4212func (s *ListServersInput) Validate() error { 4213 invalidParams := request.ErrInvalidParams{Context: "ListServersInput"} 4214 if s.MaxResults != nil && *s.MaxResults < 1 { 4215 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4216 } 4217 if s.NextToken != nil && len(*s.NextToken) < 1 { 4218 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4219 } 4220 4221 if invalidParams.Len() > 0 { 4222 return invalidParams 4223 } 4224 return nil 4225} 4226 4227// SetMaxResults sets the MaxResults field's value. 4228func (s *ListServersInput) SetMaxResults(v int64) *ListServersInput { 4229 s.MaxResults = &v 4230 return s 4231} 4232 4233// SetNextToken sets the NextToken field's value. 4234func (s *ListServersInput) SetNextToken(v string) *ListServersInput { 4235 s.NextToken = &v 4236 return s 4237} 4238 4239type ListServersOutput struct { 4240 _ struct{} `type:"structure"` 4241 4242 // When you can get additional results from the ListServers operation, a NextToken 4243 // parameter is returned in the output. In a following command, you can pass 4244 // in the NextToken parameter to continue listing additional servers. 4245 NextToken *string `min:"1" type:"string"` 4246 4247 // An array of servers that were listed. 4248 // 4249 // Servers is a required field 4250 Servers []*ListedServer `type:"list" required:"true"` 4251} 4252 4253// String returns the string representation 4254func (s ListServersOutput) String() string { 4255 return awsutil.Prettify(s) 4256} 4257 4258// GoString returns the string representation 4259func (s ListServersOutput) GoString() string { 4260 return s.String() 4261} 4262 4263// SetNextToken sets the NextToken field's value. 4264func (s *ListServersOutput) SetNextToken(v string) *ListServersOutput { 4265 s.NextToken = &v 4266 return s 4267} 4268 4269// SetServers sets the Servers field's value. 4270func (s *ListServersOutput) SetServers(v []*ListedServer) *ListServersOutput { 4271 s.Servers = v 4272 return s 4273} 4274 4275type ListTagsForResourceInput struct { 4276 _ struct{} `type:"structure"` 4277 4278 // Requests the tags associated with a particular Amazon Resource Name (ARN). 4279 // An ARN is an identifier for a specific AWS resource, such as a server, user, 4280 // or role. 4281 // 4282 // Arn is a required field 4283 Arn *string `min:"20" type:"string" required:"true"` 4284 4285 // Specifies the number of tags to return as a response to the ListTagsForResource 4286 // request. 4287 MaxResults *int64 `min:"1" type:"integer"` 4288 4289 // When you request additional results from the ListTagsForResource operation, 4290 // a NextToken parameter is returned in the input. You can then pass in a subsequent 4291 // command to the NextToken parameter to continue listing additional tags. 4292 NextToken *string `min:"1" type:"string"` 4293} 4294 4295// String returns the string representation 4296func (s ListTagsForResourceInput) String() string { 4297 return awsutil.Prettify(s) 4298} 4299 4300// GoString returns the string representation 4301func (s ListTagsForResourceInput) GoString() string { 4302 return s.String() 4303} 4304 4305// Validate inspects the fields of the type to determine if they are valid. 4306func (s *ListTagsForResourceInput) Validate() error { 4307 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 4308 if s.Arn == nil { 4309 invalidParams.Add(request.NewErrParamRequired("Arn")) 4310 } 4311 if s.Arn != nil && len(*s.Arn) < 20 { 4312 invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) 4313 } 4314 if s.MaxResults != nil && *s.MaxResults < 1 { 4315 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4316 } 4317 if s.NextToken != nil && len(*s.NextToken) < 1 { 4318 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4319 } 4320 4321 if invalidParams.Len() > 0 { 4322 return invalidParams 4323 } 4324 return nil 4325} 4326 4327// SetArn sets the Arn field's value. 4328func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { 4329 s.Arn = &v 4330 return s 4331} 4332 4333// SetMaxResults sets the MaxResults field's value. 4334func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { 4335 s.MaxResults = &v 4336 return s 4337} 4338 4339// SetNextToken sets the NextToken field's value. 4340func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { 4341 s.NextToken = &v 4342 return s 4343} 4344 4345type ListTagsForResourceOutput struct { 4346 _ struct{} `type:"structure"` 4347 4348 // The ARN you specified to list the tags of. 4349 Arn *string `min:"20" type:"string"` 4350 4351 // When you can get additional results from the ListTagsForResource call, a 4352 // NextToken parameter is returned in the output. You can then pass in a subsequent 4353 // command to the NextToken parameter to continue listing additional tags. 4354 NextToken *string `min:"1" type:"string"` 4355 4356 // Key-value pairs that are assigned to a resource, usually for the purpose 4357 // of grouping and searching for items. Tags are metadata that you define. 4358 Tags []*Tag `min:"1" type:"list"` 4359} 4360 4361// String returns the string representation 4362func (s ListTagsForResourceOutput) String() string { 4363 return awsutil.Prettify(s) 4364} 4365 4366// GoString returns the string representation 4367func (s ListTagsForResourceOutput) GoString() string { 4368 return s.String() 4369} 4370 4371// SetArn sets the Arn field's value. 4372func (s *ListTagsForResourceOutput) SetArn(v string) *ListTagsForResourceOutput { 4373 s.Arn = &v 4374 return s 4375} 4376 4377// SetNextToken sets the NextToken field's value. 4378func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { 4379 s.NextToken = &v 4380 return s 4381} 4382 4383// SetTags sets the Tags field's value. 4384func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 4385 s.Tags = v 4386 return s 4387} 4388 4389type ListUsersInput struct { 4390 _ struct{} `type:"structure"` 4391 4392 // Specifies the number of users to return as a response to the ListUsers request. 4393 MaxResults *int64 `min:"1" type:"integer"` 4394 4395 // When you can get additional results from the ListUsers call, a NextToken 4396 // parameter is returned in the output. You can then pass in a subsequent command 4397 // to the NextToken parameter to continue listing additional users. 4398 NextToken *string `min:"1" type:"string"` 4399 4400 // A system-assigned unique identifier for a server that has users assigned 4401 // to it. 4402 // 4403 // ServerId is a required field 4404 ServerId *string `min:"19" type:"string" required:"true"` 4405} 4406 4407// String returns the string representation 4408func (s ListUsersInput) String() string { 4409 return awsutil.Prettify(s) 4410} 4411 4412// GoString returns the string representation 4413func (s ListUsersInput) GoString() string { 4414 return s.String() 4415} 4416 4417// Validate inspects the fields of the type to determine if they are valid. 4418func (s *ListUsersInput) Validate() error { 4419 invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} 4420 if s.MaxResults != nil && *s.MaxResults < 1 { 4421 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4422 } 4423 if s.NextToken != nil && len(*s.NextToken) < 1 { 4424 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4425 } 4426 if s.ServerId == nil { 4427 invalidParams.Add(request.NewErrParamRequired("ServerId")) 4428 } 4429 if s.ServerId != nil && len(*s.ServerId) < 19 { 4430 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 4431 } 4432 4433 if invalidParams.Len() > 0 { 4434 return invalidParams 4435 } 4436 return nil 4437} 4438 4439// SetMaxResults sets the MaxResults field's value. 4440func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput { 4441 s.MaxResults = &v 4442 return s 4443} 4444 4445// SetNextToken sets the NextToken field's value. 4446func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput { 4447 s.NextToken = &v 4448 return s 4449} 4450 4451// SetServerId sets the ServerId field's value. 4452func (s *ListUsersInput) SetServerId(v string) *ListUsersInput { 4453 s.ServerId = &v 4454 return s 4455} 4456 4457type ListUsersOutput struct { 4458 _ struct{} `type:"structure"` 4459 4460 // When you can get additional results from the ListUsers call, a NextToken 4461 // parameter is returned in the output. You can then pass in a subsequent command 4462 // to the NextToken parameter to continue listing additional users. 4463 NextToken *string `min:"1" type:"string"` 4464 4465 // A system-assigned unique identifier for a server that the users are assigned 4466 // to. 4467 // 4468 // ServerId is a required field 4469 ServerId *string `min:"19" type:"string" required:"true"` 4470 4471 // Returns the user accounts and their properties for the ServerId value that 4472 // you specify. 4473 // 4474 // Users is a required field 4475 Users []*ListedUser `type:"list" required:"true"` 4476} 4477 4478// String returns the string representation 4479func (s ListUsersOutput) String() string { 4480 return awsutil.Prettify(s) 4481} 4482 4483// GoString returns the string representation 4484func (s ListUsersOutput) GoString() string { 4485 return s.String() 4486} 4487 4488// SetNextToken sets the NextToken field's value. 4489func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput { 4490 s.NextToken = &v 4491 return s 4492} 4493 4494// SetServerId sets the ServerId field's value. 4495func (s *ListUsersOutput) SetServerId(v string) *ListUsersOutput { 4496 s.ServerId = &v 4497 return s 4498} 4499 4500// SetUsers sets the Users field's value. 4501func (s *ListUsersOutput) SetUsers(v []*ListedUser) *ListUsersOutput { 4502 s.Users = v 4503 return s 4504} 4505 4506// Returns properties of a file transfer protocol-enabled server that was specified. 4507type ListedServer struct { 4508 _ struct{} `type:"structure"` 4509 4510 // Specifies the unique Amazon Resource Name (ARN) for a server to be listed. 4511 // 4512 // Arn is a required field 4513 Arn *string `min:"20" type:"string" required:"true"` 4514 4515 // Specifies the type of VPC endpoint that your server is connected to. If your 4516 // server is connected to a VPC endpoint, your server isn't accessible over 4517 // the public internet. 4518 EndpointType *string `type:"string" enum:"EndpointType"` 4519 4520 // Specifies the authentication method used to validate a user for a server 4521 // that was specified. This can include Secure Shell (SSH), user name and password 4522 // combinations, or your own custom authentication method. Valid values include 4523 // SERVICE_MANAGED or API_GATEWAY. 4524 IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` 4525 4526 // Specifies the AWS Identity and Access Management (IAM) role that allows a 4527 // server to turn on Amazon CloudWatch logging. 4528 LoggingRole *string `min:"20" type:"string"` 4529 4530 // Specifies the unique system assigned identifier for the servers that were 4531 // listed. 4532 ServerId *string `min:"19" type:"string"` 4533 4534 // Specifies the condition of a server for the server that was described. A 4535 // value of ONLINE indicates that the server can accept jobs and transfer files. 4536 // A State value of OFFLINE means that the server cannot perform file transfer 4537 // operations. 4538 // 4539 // The states of STARTING and STOPPING indicate that the server is in an intermediate 4540 // state, either not fully able to respond, or not fully offline. The values 4541 // of START_FAILED or STOP_FAILED can indicate an error condition. 4542 State *string `type:"string" enum:"State"` 4543 4544 // Specifies the number of users that are assigned to a server you specified 4545 // with the ServerId. 4546 UserCount *int64 `type:"integer"` 4547} 4548 4549// String returns the string representation 4550func (s ListedServer) String() string { 4551 return awsutil.Prettify(s) 4552} 4553 4554// GoString returns the string representation 4555func (s ListedServer) GoString() string { 4556 return s.String() 4557} 4558 4559// SetArn sets the Arn field's value. 4560func (s *ListedServer) SetArn(v string) *ListedServer { 4561 s.Arn = &v 4562 return s 4563} 4564 4565// SetEndpointType sets the EndpointType field's value. 4566func (s *ListedServer) SetEndpointType(v string) *ListedServer { 4567 s.EndpointType = &v 4568 return s 4569} 4570 4571// SetIdentityProviderType sets the IdentityProviderType field's value. 4572func (s *ListedServer) SetIdentityProviderType(v string) *ListedServer { 4573 s.IdentityProviderType = &v 4574 return s 4575} 4576 4577// SetLoggingRole sets the LoggingRole field's value. 4578func (s *ListedServer) SetLoggingRole(v string) *ListedServer { 4579 s.LoggingRole = &v 4580 return s 4581} 4582 4583// SetServerId sets the ServerId field's value. 4584func (s *ListedServer) SetServerId(v string) *ListedServer { 4585 s.ServerId = &v 4586 return s 4587} 4588 4589// SetState sets the State field's value. 4590func (s *ListedServer) SetState(v string) *ListedServer { 4591 s.State = &v 4592 return s 4593} 4594 4595// SetUserCount sets the UserCount field's value. 4596func (s *ListedServer) SetUserCount(v int64) *ListedServer { 4597 s.UserCount = &v 4598 return s 4599} 4600 4601// Returns properties of the user that you specify. 4602type ListedUser struct { 4603 _ struct{} `type:"structure"` 4604 4605 // Provides the unique Amazon Resource Name (ARN) for the user that you want 4606 // to learn about. 4607 // 4608 // Arn is a required field 4609 Arn *string `min:"20" type:"string" required:"true"` 4610 4611 // Specifies the location that files are written to or read from an Amazon S3 4612 // bucket for the user you specify by their ARN. 4613 HomeDirectory *string `type:"string"` 4614 4615 // Specifies the type of landing directory (folder) you mapped for your users' 4616 // home directory. If you set it to PATH, the user will see the absolute Amazon 4617 // S3 bucket paths as is in their file transfer protocol clients. If you set 4618 // it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings 4619 // for how you want to make Amazon S3 paths visible to your users. 4620 HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` 4621 4622 // Specifies the role that is in use by this user. A role is an AWS Identity 4623 // and Access Management (IAM) entity that, in this case, allows a file transfer 4624 // protocol-enabled server to act on a user's behalf. It allows the server to 4625 // inherit the trust relationship that enables that user to perform file operations 4626 // to their Amazon S3 bucket. 4627 Role *string `min:"20" type:"string"` 4628 4629 // Specifies the number of SSH public keys stored for the user you specified. 4630 SshPublicKeyCount *int64 `type:"integer"` 4631 4632 // Specifies the name of the user whose ARN was specified. User names are used 4633 // for authentication purposes. 4634 UserName *string `min:"3" type:"string"` 4635} 4636 4637// String returns the string representation 4638func (s ListedUser) String() string { 4639 return awsutil.Prettify(s) 4640} 4641 4642// GoString returns the string representation 4643func (s ListedUser) GoString() string { 4644 return s.String() 4645} 4646 4647// SetArn sets the Arn field's value. 4648func (s *ListedUser) SetArn(v string) *ListedUser { 4649 s.Arn = &v 4650 return s 4651} 4652 4653// SetHomeDirectory sets the HomeDirectory field's value. 4654func (s *ListedUser) SetHomeDirectory(v string) *ListedUser { 4655 s.HomeDirectory = &v 4656 return s 4657} 4658 4659// SetHomeDirectoryType sets the HomeDirectoryType field's value. 4660func (s *ListedUser) SetHomeDirectoryType(v string) *ListedUser { 4661 s.HomeDirectoryType = &v 4662 return s 4663} 4664 4665// SetRole sets the Role field's value. 4666func (s *ListedUser) SetRole(v string) *ListedUser { 4667 s.Role = &v 4668 return s 4669} 4670 4671// SetSshPublicKeyCount sets the SshPublicKeyCount field's value. 4672func (s *ListedUser) SetSshPublicKeyCount(v int64) *ListedUser { 4673 s.SshPublicKeyCount = &v 4674 return s 4675} 4676 4677// SetUserName sets the UserName field's value. 4678func (s *ListedUser) SetUserName(v string) *ListedUser { 4679 s.UserName = &v 4680 return s 4681} 4682 4683// The requested resource does not exist. 4684type ResourceExistsException struct { 4685 _ struct{} `type:"structure"` 4686 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4687 4688 Message_ *string `locationName:"Message" type:"string"` 4689 4690 // Resource is a required field 4691 Resource *string `type:"string" required:"true"` 4692 4693 // ResourceType is a required field 4694 ResourceType *string `type:"string" required:"true"` 4695} 4696 4697// String returns the string representation 4698func (s ResourceExistsException) String() string { 4699 return awsutil.Prettify(s) 4700} 4701 4702// GoString returns the string representation 4703func (s ResourceExistsException) GoString() string { 4704 return s.String() 4705} 4706 4707func newErrorResourceExistsException(v protocol.ResponseMetadata) error { 4708 return &ResourceExistsException{ 4709 RespMetadata: v, 4710 } 4711} 4712 4713// Code returns the exception type name. 4714func (s *ResourceExistsException) Code() string { 4715 return "ResourceExistsException" 4716} 4717 4718// Message returns the exception's message. 4719func (s *ResourceExistsException) Message() string { 4720 if s.Message_ != nil { 4721 return *s.Message_ 4722 } 4723 return "" 4724} 4725 4726// OrigErr always returns nil, satisfies awserr.Error interface. 4727func (s *ResourceExistsException) OrigErr() error { 4728 return nil 4729} 4730 4731func (s *ResourceExistsException) Error() string { 4732 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4733} 4734 4735// Status code returns the HTTP status code for the request's response error. 4736func (s *ResourceExistsException) StatusCode() int { 4737 return s.RespMetadata.StatusCode 4738} 4739 4740// RequestID returns the service's response RequestID for request. 4741func (s *ResourceExistsException) RequestID() string { 4742 return s.RespMetadata.RequestID 4743} 4744 4745// This exception is thrown when a resource is not found by the AWS Transfer 4746// Family service. 4747type ResourceNotFoundException struct { 4748 _ struct{} `type:"structure"` 4749 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4750 4751 Message_ *string `locationName:"Message" type:"string"` 4752 4753 // Resource is a required field 4754 Resource *string `type:"string" required:"true"` 4755 4756 // ResourceType is a required field 4757 ResourceType *string `type:"string" required:"true"` 4758} 4759 4760// String returns the string representation 4761func (s ResourceNotFoundException) String() string { 4762 return awsutil.Prettify(s) 4763} 4764 4765// GoString returns the string representation 4766func (s ResourceNotFoundException) GoString() string { 4767 return s.String() 4768} 4769 4770func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 4771 return &ResourceNotFoundException{ 4772 RespMetadata: v, 4773 } 4774} 4775 4776// Code returns the exception type name. 4777func (s *ResourceNotFoundException) Code() string { 4778 return "ResourceNotFoundException" 4779} 4780 4781// Message returns the exception's message. 4782func (s *ResourceNotFoundException) Message() string { 4783 if s.Message_ != nil { 4784 return *s.Message_ 4785 } 4786 return "" 4787} 4788 4789// OrigErr always returns nil, satisfies awserr.Error interface. 4790func (s *ResourceNotFoundException) OrigErr() error { 4791 return nil 4792} 4793 4794func (s *ResourceNotFoundException) Error() string { 4795 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4796} 4797 4798// Status code returns the HTTP status code for the request's response error. 4799func (s *ResourceNotFoundException) StatusCode() int { 4800 return s.RespMetadata.StatusCode 4801} 4802 4803// RequestID returns the service's response RequestID for request. 4804func (s *ResourceNotFoundException) RequestID() string { 4805 return s.RespMetadata.RequestID 4806} 4807 4808// The request has failed because the AWS Transfer Family service is not available. 4809type ServiceUnavailableException struct { 4810 _ struct{} `type:"structure"` 4811 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4812 4813 Message_ *string `locationName:"Message" type:"string"` 4814} 4815 4816// String returns the string representation 4817func (s ServiceUnavailableException) String() string { 4818 return awsutil.Prettify(s) 4819} 4820 4821// GoString returns the string representation 4822func (s ServiceUnavailableException) GoString() string { 4823 return s.String() 4824} 4825 4826func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { 4827 return &ServiceUnavailableException{ 4828 RespMetadata: v, 4829 } 4830} 4831 4832// Code returns the exception type name. 4833func (s *ServiceUnavailableException) Code() string { 4834 return "ServiceUnavailableException" 4835} 4836 4837// Message returns the exception's message. 4838func (s *ServiceUnavailableException) Message() string { 4839 if s.Message_ != nil { 4840 return *s.Message_ 4841 } 4842 return "" 4843} 4844 4845// OrigErr always returns nil, satisfies awserr.Error interface. 4846func (s *ServiceUnavailableException) OrigErr() error { 4847 return nil 4848} 4849 4850func (s *ServiceUnavailableException) Error() string { 4851 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4852} 4853 4854// Status code returns the HTTP status code for the request's response error. 4855func (s *ServiceUnavailableException) StatusCode() int { 4856 return s.RespMetadata.StatusCode 4857} 4858 4859// RequestID returns the service's response RequestID for request. 4860func (s *ServiceUnavailableException) RequestID() string { 4861 return s.RespMetadata.RequestID 4862} 4863 4864// Provides information about the public Secure Shell (SSH) key that is associated 4865// with a user account for the specific file transfer protocol-enabled server 4866// (as identified by ServerId). The information returned includes the date the 4867// key was imported, the public key contents, and the public key ID. A user 4868// can store more than one SSH public key associated with their user name on 4869// a specific server. 4870type SshPublicKey struct { 4871 _ struct{} `type:"structure"` 4872 4873 // Specifies the date that the public key was added to the user account. 4874 // 4875 // DateImported is a required field 4876 DateImported *time.Time `type:"timestamp" required:"true"` 4877 4878 // Specifies the content of the SSH public key as specified by the PublicKeyId. 4879 // 4880 // SshPublicKeyBody is a required field 4881 SshPublicKeyBody *string `type:"string" required:"true"` 4882 4883 // Specifies the SshPublicKeyId parameter contains the identifier of the public 4884 // key. 4885 // 4886 // SshPublicKeyId is a required field 4887 SshPublicKeyId *string `min:"21" type:"string" required:"true"` 4888} 4889 4890// String returns the string representation 4891func (s SshPublicKey) String() string { 4892 return awsutil.Prettify(s) 4893} 4894 4895// GoString returns the string representation 4896func (s SshPublicKey) GoString() string { 4897 return s.String() 4898} 4899 4900// SetDateImported sets the DateImported field's value. 4901func (s *SshPublicKey) SetDateImported(v time.Time) *SshPublicKey { 4902 s.DateImported = &v 4903 return s 4904} 4905 4906// SetSshPublicKeyBody sets the SshPublicKeyBody field's value. 4907func (s *SshPublicKey) SetSshPublicKeyBody(v string) *SshPublicKey { 4908 s.SshPublicKeyBody = &v 4909 return s 4910} 4911 4912// SetSshPublicKeyId sets the SshPublicKeyId field's value. 4913func (s *SshPublicKey) SetSshPublicKeyId(v string) *SshPublicKey { 4914 s.SshPublicKeyId = &v 4915 return s 4916} 4917 4918type StartServerInput struct { 4919 _ struct{} `type:"structure"` 4920 4921 // A system-assigned unique identifier for a server that you start. 4922 // 4923 // ServerId is a required field 4924 ServerId *string `min:"19" type:"string" required:"true"` 4925} 4926 4927// String returns the string representation 4928func (s StartServerInput) String() string { 4929 return awsutil.Prettify(s) 4930} 4931 4932// GoString returns the string representation 4933func (s StartServerInput) GoString() string { 4934 return s.String() 4935} 4936 4937// Validate inspects the fields of the type to determine if they are valid. 4938func (s *StartServerInput) Validate() error { 4939 invalidParams := request.ErrInvalidParams{Context: "StartServerInput"} 4940 if s.ServerId == nil { 4941 invalidParams.Add(request.NewErrParamRequired("ServerId")) 4942 } 4943 if s.ServerId != nil && len(*s.ServerId) < 19 { 4944 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 4945 } 4946 4947 if invalidParams.Len() > 0 { 4948 return invalidParams 4949 } 4950 return nil 4951} 4952 4953// SetServerId sets the ServerId field's value. 4954func (s *StartServerInput) SetServerId(v string) *StartServerInput { 4955 s.ServerId = &v 4956 return s 4957} 4958 4959type StartServerOutput struct { 4960 _ struct{} `type:"structure"` 4961} 4962 4963// String returns the string representation 4964func (s StartServerOutput) String() string { 4965 return awsutil.Prettify(s) 4966} 4967 4968// GoString returns the string representation 4969func (s StartServerOutput) GoString() string { 4970 return s.String() 4971} 4972 4973type StopServerInput struct { 4974 _ struct{} `type:"structure"` 4975 4976 // A system-assigned unique identifier for a server that you stopped. 4977 // 4978 // ServerId is a required field 4979 ServerId *string `min:"19" type:"string" required:"true"` 4980} 4981 4982// String returns the string representation 4983func (s StopServerInput) String() string { 4984 return awsutil.Prettify(s) 4985} 4986 4987// GoString returns the string representation 4988func (s StopServerInput) GoString() string { 4989 return s.String() 4990} 4991 4992// Validate inspects the fields of the type to determine if they are valid. 4993func (s *StopServerInput) Validate() error { 4994 invalidParams := request.ErrInvalidParams{Context: "StopServerInput"} 4995 if s.ServerId == nil { 4996 invalidParams.Add(request.NewErrParamRequired("ServerId")) 4997 } 4998 if s.ServerId != nil && len(*s.ServerId) < 19 { 4999 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 5000 } 5001 5002 if invalidParams.Len() > 0 { 5003 return invalidParams 5004 } 5005 return nil 5006} 5007 5008// SetServerId sets the ServerId field's value. 5009func (s *StopServerInput) SetServerId(v string) *StopServerInput { 5010 s.ServerId = &v 5011 return s 5012} 5013 5014type StopServerOutput struct { 5015 _ struct{} `type:"structure"` 5016} 5017 5018// String returns the string representation 5019func (s StopServerOutput) String() string { 5020 return awsutil.Prettify(s) 5021} 5022 5023// GoString returns the string representation 5024func (s StopServerOutput) GoString() string { 5025 return s.String() 5026} 5027 5028// Creates a key-value pair for a specific resource. Tags are metadata that 5029// you can use to search for and group a resource for various purposes. You 5030// can apply tags to servers, users, and roles. A tag key can take more than 5031// one value. For example, to group servers for accounting purposes, you might 5032// create a tag called Group and assign the values Research and Accounting to 5033// that group. 5034type Tag struct { 5035 _ struct{} `type:"structure"` 5036 5037 // The name assigned to the tag that you create. 5038 // 5039 // Key is a required field 5040 Key *string `type:"string" required:"true"` 5041 5042 // Contains one or more values that you assigned to the key name you create. 5043 // 5044 // Value is a required field 5045 Value *string `type:"string" required:"true"` 5046} 5047 5048// String returns the string representation 5049func (s Tag) String() string { 5050 return awsutil.Prettify(s) 5051} 5052 5053// GoString returns the string representation 5054func (s Tag) GoString() string { 5055 return s.String() 5056} 5057 5058// Validate inspects the fields of the type to determine if they are valid. 5059func (s *Tag) Validate() error { 5060 invalidParams := request.ErrInvalidParams{Context: "Tag"} 5061 if s.Key == nil { 5062 invalidParams.Add(request.NewErrParamRequired("Key")) 5063 } 5064 if s.Value == nil { 5065 invalidParams.Add(request.NewErrParamRequired("Value")) 5066 } 5067 5068 if invalidParams.Len() > 0 { 5069 return invalidParams 5070 } 5071 return nil 5072} 5073 5074// SetKey sets the Key field's value. 5075func (s *Tag) SetKey(v string) *Tag { 5076 s.Key = &v 5077 return s 5078} 5079 5080// SetValue sets the Value field's value. 5081func (s *Tag) SetValue(v string) *Tag { 5082 s.Value = &v 5083 return s 5084} 5085 5086type TagResourceInput struct { 5087 _ struct{} `type:"structure"` 5088 5089 // An Amazon Resource Name (ARN) for a specific AWS resource, such as a server, 5090 // user, or role. 5091 // 5092 // Arn is a required field 5093 Arn *string `min:"20" type:"string" required:"true"` 5094 5095 // Key-value pairs assigned to ARNs that you can use to group and search for 5096 // resources by type. You can attach this metadata to user accounts for any 5097 // purpose. 5098 // 5099 // Tags is a required field 5100 Tags []*Tag `min:"1" type:"list" required:"true"` 5101} 5102 5103// String returns the string representation 5104func (s TagResourceInput) String() string { 5105 return awsutil.Prettify(s) 5106} 5107 5108// GoString returns the string representation 5109func (s TagResourceInput) GoString() string { 5110 return s.String() 5111} 5112 5113// Validate inspects the fields of the type to determine if they are valid. 5114func (s *TagResourceInput) Validate() error { 5115 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 5116 if s.Arn == nil { 5117 invalidParams.Add(request.NewErrParamRequired("Arn")) 5118 } 5119 if s.Arn != nil && len(*s.Arn) < 20 { 5120 invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) 5121 } 5122 if s.Tags == nil { 5123 invalidParams.Add(request.NewErrParamRequired("Tags")) 5124 } 5125 if s.Tags != nil && len(s.Tags) < 1 { 5126 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 5127 } 5128 if s.Tags != nil { 5129 for i, v := range s.Tags { 5130 if v == nil { 5131 continue 5132 } 5133 if err := v.Validate(); err != nil { 5134 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 5135 } 5136 } 5137 } 5138 5139 if invalidParams.Len() > 0 { 5140 return invalidParams 5141 } 5142 return nil 5143} 5144 5145// SetArn sets the Arn field's value. 5146func (s *TagResourceInput) SetArn(v string) *TagResourceInput { 5147 s.Arn = &v 5148 return s 5149} 5150 5151// SetTags sets the Tags field's value. 5152func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 5153 s.Tags = v 5154 return s 5155} 5156 5157type TagResourceOutput struct { 5158 _ struct{} `type:"structure"` 5159} 5160 5161// String returns the string representation 5162func (s TagResourceOutput) String() string { 5163 return awsutil.Prettify(s) 5164} 5165 5166// GoString returns the string representation 5167func (s TagResourceOutput) GoString() string { 5168 return s.String() 5169} 5170 5171type TestIdentityProviderInput struct { 5172 _ struct{} `type:"structure"` 5173 5174 // A system-assigned identifier for a specific server. That server's user authentication 5175 // method is tested with a user name and password. 5176 // 5177 // ServerId is a required field 5178 ServerId *string `min:"19" type:"string" required:"true"` 5179 5180 // The type of file transfer protocol to be tested. 5181 // 5182 // The available protocols are: 5183 // 5184 // * Secure Shell (SSH) File Transfer Protocol (SFTP) 5185 // 5186 // * File Transfer Protocol Secure (FTPS) 5187 // 5188 // * File Transfer Protocol (FTP) 5189 ServerProtocol *string `type:"string" enum:"Protocol"` 5190 5191 // The source IP address of the user account to be tested. 5192 SourceIp *string `type:"string"` 5193 5194 // The name of the user account to be tested. 5195 // 5196 // UserName is a required field 5197 UserName *string `min:"3" type:"string" required:"true"` 5198 5199 // The password of the user account to be tested. 5200 UserPassword *string `type:"string" sensitive:"true"` 5201} 5202 5203// String returns the string representation 5204func (s TestIdentityProviderInput) String() string { 5205 return awsutil.Prettify(s) 5206} 5207 5208// GoString returns the string representation 5209func (s TestIdentityProviderInput) GoString() string { 5210 return s.String() 5211} 5212 5213// Validate inspects the fields of the type to determine if they are valid. 5214func (s *TestIdentityProviderInput) Validate() error { 5215 invalidParams := request.ErrInvalidParams{Context: "TestIdentityProviderInput"} 5216 if s.ServerId == nil { 5217 invalidParams.Add(request.NewErrParamRequired("ServerId")) 5218 } 5219 if s.ServerId != nil && len(*s.ServerId) < 19 { 5220 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 5221 } 5222 if s.UserName == nil { 5223 invalidParams.Add(request.NewErrParamRequired("UserName")) 5224 } 5225 if s.UserName != nil && len(*s.UserName) < 3 { 5226 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 5227 } 5228 5229 if invalidParams.Len() > 0 { 5230 return invalidParams 5231 } 5232 return nil 5233} 5234 5235// SetServerId sets the ServerId field's value. 5236func (s *TestIdentityProviderInput) SetServerId(v string) *TestIdentityProviderInput { 5237 s.ServerId = &v 5238 return s 5239} 5240 5241// SetServerProtocol sets the ServerProtocol field's value. 5242func (s *TestIdentityProviderInput) SetServerProtocol(v string) *TestIdentityProviderInput { 5243 s.ServerProtocol = &v 5244 return s 5245} 5246 5247// SetSourceIp sets the SourceIp field's value. 5248func (s *TestIdentityProviderInput) SetSourceIp(v string) *TestIdentityProviderInput { 5249 s.SourceIp = &v 5250 return s 5251} 5252 5253// SetUserName sets the UserName field's value. 5254func (s *TestIdentityProviderInput) SetUserName(v string) *TestIdentityProviderInput { 5255 s.UserName = &v 5256 return s 5257} 5258 5259// SetUserPassword sets the UserPassword field's value. 5260func (s *TestIdentityProviderInput) SetUserPassword(v string) *TestIdentityProviderInput { 5261 s.UserPassword = &v 5262 return s 5263} 5264 5265type TestIdentityProviderOutput struct { 5266 _ struct{} `type:"structure"` 5267 5268 // A message that indicates whether the test was successful or not. 5269 Message *string `type:"string"` 5270 5271 // The response that is returned from your API Gateway. 5272 Response *string `type:"string"` 5273 5274 // The HTTP status code that is the response from your API Gateway. 5275 // 5276 // StatusCode is a required field 5277 StatusCode *int64 `type:"integer" required:"true"` 5278 5279 // The endpoint of the service used to authenticate a user. 5280 // 5281 // Url is a required field 5282 Url *string `type:"string" required:"true"` 5283} 5284 5285// String returns the string representation 5286func (s TestIdentityProviderOutput) String() string { 5287 return awsutil.Prettify(s) 5288} 5289 5290// GoString returns the string representation 5291func (s TestIdentityProviderOutput) GoString() string { 5292 return s.String() 5293} 5294 5295// SetMessage sets the Message field's value. 5296func (s *TestIdentityProviderOutput) SetMessage(v string) *TestIdentityProviderOutput { 5297 s.Message = &v 5298 return s 5299} 5300 5301// SetResponse sets the Response field's value. 5302func (s *TestIdentityProviderOutput) SetResponse(v string) *TestIdentityProviderOutput { 5303 s.Response = &v 5304 return s 5305} 5306 5307// SetStatusCode sets the StatusCode field's value. 5308func (s *TestIdentityProviderOutput) SetStatusCode(v int64) *TestIdentityProviderOutput { 5309 s.StatusCode = &v 5310 return s 5311} 5312 5313// SetUrl sets the Url field's value. 5314func (s *TestIdentityProviderOutput) SetUrl(v string) *TestIdentityProviderOutput { 5315 s.Url = &v 5316 return s 5317} 5318 5319// The request was denied due to request throttling. 5320// 5321// HTTP Status Code: 400 5322type ThrottlingException struct { 5323 _ struct{} `type:"structure"` 5324 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5325 5326 Message_ *string `locationName:"message" type:"string"` 5327 5328 RetryAfterSeconds *string `type:"string"` 5329} 5330 5331// String returns the string representation 5332func (s ThrottlingException) String() string { 5333 return awsutil.Prettify(s) 5334} 5335 5336// GoString returns the string representation 5337func (s ThrottlingException) GoString() string { 5338 return s.String() 5339} 5340 5341func newErrorThrottlingException(v protocol.ResponseMetadata) error { 5342 return &ThrottlingException{ 5343 RespMetadata: v, 5344 } 5345} 5346 5347// Code returns the exception type name. 5348func (s *ThrottlingException) Code() string { 5349 return "ThrottlingException" 5350} 5351 5352// Message returns the exception's message. 5353func (s *ThrottlingException) Message() string { 5354 if s.Message_ != nil { 5355 return *s.Message_ 5356 } 5357 return "" 5358} 5359 5360// OrigErr always returns nil, satisfies awserr.Error interface. 5361func (s *ThrottlingException) OrigErr() error { 5362 return nil 5363} 5364 5365func (s *ThrottlingException) Error() string { 5366 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5367} 5368 5369// Status code returns the HTTP status code for the request's response error. 5370func (s *ThrottlingException) StatusCode() int { 5371 return s.RespMetadata.StatusCode 5372} 5373 5374// RequestID returns the service's response RequestID for request. 5375func (s *ThrottlingException) RequestID() string { 5376 return s.RespMetadata.RequestID 5377} 5378 5379type UntagResourceInput struct { 5380 _ struct{} `type:"structure"` 5381 5382 // The value of the resource that will have the tag removed. An Amazon Resource 5383 // Name (ARN) is an identifier for a specific AWS resource, such as a server, 5384 // user, or role. 5385 // 5386 // Arn is a required field 5387 Arn *string `min:"20" type:"string" required:"true"` 5388 5389 // TagKeys are key-value pairs assigned to ARNs that can be used to group and 5390 // search for resources by type. This metadata can be attached to resources 5391 // for any purpose. 5392 // 5393 // TagKeys is a required field 5394 TagKeys []*string `min:"1" type:"list" required:"true"` 5395} 5396 5397// String returns the string representation 5398func (s UntagResourceInput) String() string { 5399 return awsutil.Prettify(s) 5400} 5401 5402// GoString returns the string representation 5403func (s UntagResourceInput) GoString() string { 5404 return s.String() 5405} 5406 5407// Validate inspects the fields of the type to determine if they are valid. 5408func (s *UntagResourceInput) Validate() error { 5409 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 5410 if s.Arn == nil { 5411 invalidParams.Add(request.NewErrParamRequired("Arn")) 5412 } 5413 if s.Arn != nil && len(*s.Arn) < 20 { 5414 invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) 5415 } 5416 if s.TagKeys == nil { 5417 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 5418 } 5419 if s.TagKeys != nil && len(s.TagKeys) < 1 { 5420 invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) 5421 } 5422 5423 if invalidParams.Len() > 0 { 5424 return invalidParams 5425 } 5426 return nil 5427} 5428 5429// SetArn sets the Arn field's value. 5430func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { 5431 s.Arn = &v 5432 return s 5433} 5434 5435// SetTagKeys sets the TagKeys field's value. 5436func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 5437 s.TagKeys = v 5438 return s 5439} 5440 5441type UntagResourceOutput struct { 5442 _ struct{} `type:"structure"` 5443} 5444 5445// String returns the string representation 5446func (s UntagResourceOutput) String() string { 5447 return awsutil.Prettify(s) 5448} 5449 5450// GoString returns the string representation 5451func (s UntagResourceOutput) GoString() string { 5452 return s.String() 5453} 5454 5455type UpdateServerInput struct { 5456 _ struct{} `type:"structure"` 5457 5458 // The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. 5459 // Required when Protocols is set to FTPS. 5460 // 5461 // To request a new public certificate, see Request a public certificate (https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html) 5462 // in the AWS Certificate Manager User Guide. 5463 // 5464 // To import an existing certificate into ACM, see Importing certificates into 5465 // ACM (https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) 5466 // in the AWS Certificate Manager User Guide. 5467 // 5468 // To request a private certificate to use FTPS through private IP addresses, 5469 // see Request a private certificate (https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html) 5470 // in the AWS Certificate Manager User Guide. 5471 // 5472 // Certificates with the following cryptographic algorithms and key sizes are 5473 // supported: 5474 // 5475 // * 2048-bit RSA (RSA_2048) 5476 // 5477 // * 4096-bit RSA (RSA_4096) 5478 // 5479 // * Elliptic Prime Curve 256 bit (EC_prime256v1) 5480 // 5481 // * Elliptic Prime Curve 384 bit (EC_secp384r1) 5482 // 5483 // * Elliptic Prime Curve 521 bit (EC_secp521r1) 5484 // 5485 // The certificate must be a valid SSL/TLS X.509 version 3 certificate with 5486 // FQDN or IP address specified and information about the issuer. 5487 Certificate *string `type:"string"` 5488 5489 // The virtual private cloud (VPC) endpoint settings that are configured for 5490 // your server. With a VPC endpoint, you can restrict access to your server 5491 // to resources only within your VPC. To control incoming internet traffic, 5492 // you will need to associate one or more Elastic IP addresses with your server's 5493 // endpoint. 5494 EndpointDetails *EndpointDetails `type:"structure"` 5495 5496 // The type of endpoint that you want your server to connect to. You can choose 5497 // to connect to the public internet or a VPC endpoint. With a VPC endpoint, 5498 // you can restrict access to your server and resources only within your VPC. 5499 // 5500 // It is recommended that you use VPC as the EndpointType. With this endpoint 5501 // type, you have the option to directly associate up to three Elastic IPv4 5502 // addresses (BYO IP included) with your server's endpoint and use VPC security 5503 // groups to restrict traffic by the client's public IP address. This is not 5504 // possible with EndpointType set to VPC_ENDPOINT. 5505 EndpointType *string `type:"string" enum:"EndpointType"` 5506 5507 // The RSA private key as generated by ssh-keygen -N "" -m PEM -f my-new-server-key. 5508 // 5509 // If you aren't planning to migrate existing users from an existing server 5510 // to a new server, don't update the host key. Accidentally changing a server's 5511 // host key can be disruptive. 5512 // 5513 // For more information, see Change the host key for your SFTP-enabled server 5514 // (https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key) 5515 // in the AWS Transfer Family User Guide. 5516 HostKey *string `type:"string" sensitive:"true"` 5517 5518 // An array containing all of the information required to call a customer's 5519 // authentication API method. 5520 IdentityProviderDetails *IdentityProviderDetails `type:"structure"` 5521 5522 // Changes the AWS Identity and Access Management (IAM) role that allows Amazon 5523 // S3 events to be logged in Amazon CloudWatch, turning logging on or off. 5524 LoggingRole *string `type:"string"` 5525 5526 // Specifies the file transfer protocol or protocols over which your file transfer 5527 // protocol client can connect to your server's endpoint. The available protocols 5528 // are: 5529 // 5530 // * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over 5531 // SSH 5532 // 5533 // * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption 5534 // 5535 // * File Transfer Protocol (FTP): Unencrypted file transfer 5536 // 5537 // If you select FTPS, you must choose a certificate stored in AWS Certificate 5538 // Manager (ACM) which will be used to identify your server when clients connect 5539 // to it over FTPS. 5540 // 5541 // If Protocol includes either FTP or FTPS, then the EndpointType must be VPC 5542 // and the IdentityProviderType must be API_GATEWAY. 5543 // 5544 // If Protocol includes FTP, then AddressAllocationIds cannot be associated. 5545 // 5546 // If Protocol is set only to SFTP, the EndpointType can be set to PUBLIC and 5547 // the IdentityProviderType can be set to SERVICE_MANAGED. 5548 Protocols []*string `min:"1" type:"list"` 5549 5550 // Specifies the name of the security policy that is attached to the server. 5551 SecurityPolicyName *string `type:"string"` 5552 5553 // A system-assigned unique identifier for a server instance that the user account 5554 // is assigned to. 5555 // 5556 // ServerId is a required field 5557 ServerId *string `min:"19" type:"string" required:"true"` 5558} 5559 5560// String returns the string representation 5561func (s UpdateServerInput) String() string { 5562 return awsutil.Prettify(s) 5563} 5564 5565// GoString returns the string representation 5566func (s UpdateServerInput) GoString() string { 5567 return s.String() 5568} 5569 5570// Validate inspects the fields of the type to determine if they are valid. 5571func (s *UpdateServerInput) Validate() error { 5572 invalidParams := request.ErrInvalidParams{Context: "UpdateServerInput"} 5573 if s.Protocols != nil && len(s.Protocols) < 1 { 5574 invalidParams.Add(request.NewErrParamMinLen("Protocols", 1)) 5575 } 5576 if s.ServerId == nil { 5577 invalidParams.Add(request.NewErrParamRequired("ServerId")) 5578 } 5579 if s.ServerId != nil && len(*s.ServerId) < 19 { 5580 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 5581 } 5582 if s.EndpointDetails != nil { 5583 if err := s.EndpointDetails.Validate(); err != nil { 5584 invalidParams.AddNested("EndpointDetails", err.(request.ErrInvalidParams)) 5585 } 5586 } 5587 if s.IdentityProviderDetails != nil { 5588 if err := s.IdentityProviderDetails.Validate(); err != nil { 5589 invalidParams.AddNested("IdentityProviderDetails", err.(request.ErrInvalidParams)) 5590 } 5591 } 5592 5593 if invalidParams.Len() > 0 { 5594 return invalidParams 5595 } 5596 return nil 5597} 5598 5599// SetCertificate sets the Certificate field's value. 5600func (s *UpdateServerInput) SetCertificate(v string) *UpdateServerInput { 5601 s.Certificate = &v 5602 return s 5603} 5604 5605// SetEndpointDetails sets the EndpointDetails field's value. 5606func (s *UpdateServerInput) SetEndpointDetails(v *EndpointDetails) *UpdateServerInput { 5607 s.EndpointDetails = v 5608 return s 5609} 5610 5611// SetEndpointType sets the EndpointType field's value. 5612func (s *UpdateServerInput) SetEndpointType(v string) *UpdateServerInput { 5613 s.EndpointType = &v 5614 return s 5615} 5616 5617// SetHostKey sets the HostKey field's value. 5618func (s *UpdateServerInput) SetHostKey(v string) *UpdateServerInput { 5619 s.HostKey = &v 5620 return s 5621} 5622 5623// SetIdentityProviderDetails sets the IdentityProviderDetails field's value. 5624func (s *UpdateServerInput) SetIdentityProviderDetails(v *IdentityProviderDetails) *UpdateServerInput { 5625 s.IdentityProviderDetails = v 5626 return s 5627} 5628 5629// SetLoggingRole sets the LoggingRole field's value. 5630func (s *UpdateServerInput) SetLoggingRole(v string) *UpdateServerInput { 5631 s.LoggingRole = &v 5632 return s 5633} 5634 5635// SetProtocols sets the Protocols field's value. 5636func (s *UpdateServerInput) SetProtocols(v []*string) *UpdateServerInput { 5637 s.Protocols = v 5638 return s 5639} 5640 5641// SetSecurityPolicyName sets the SecurityPolicyName field's value. 5642func (s *UpdateServerInput) SetSecurityPolicyName(v string) *UpdateServerInput { 5643 s.SecurityPolicyName = &v 5644 return s 5645} 5646 5647// SetServerId sets the ServerId field's value. 5648func (s *UpdateServerInput) SetServerId(v string) *UpdateServerInput { 5649 s.ServerId = &v 5650 return s 5651} 5652 5653type UpdateServerOutput struct { 5654 _ struct{} `type:"structure"` 5655 5656 // A system-assigned unique identifier for a server that the user account is 5657 // assigned to. 5658 // 5659 // ServerId is a required field 5660 ServerId *string `min:"19" type:"string" required:"true"` 5661} 5662 5663// String returns the string representation 5664func (s UpdateServerOutput) String() string { 5665 return awsutil.Prettify(s) 5666} 5667 5668// GoString returns the string representation 5669func (s UpdateServerOutput) GoString() string { 5670 return s.String() 5671} 5672 5673// SetServerId sets the ServerId field's value. 5674func (s *UpdateServerOutput) SetServerId(v string) *UpdateServerOutput { 5675 s.ServerId = &v 5676 return s 5677} 5678 5679type UpdateUserInput struct { 5680 _ struct{} `type:"structure"` 5681 5682 // Specifies the landing directory (folder) for a user when they log in to the 5683 // server using their file transfer protocol client. 5684 // 5685 // An example is your-Amazon-S3-bucket-name>/home/username. 5686 HomeDirectory *string `type:"string"` 5687 5688 // Logical directory mappings that specify what Amazon S3 paths and keys should 5689 // be visible to your user and how you want to make them visible. You will need 5690 // to specify the "Entry" and "Target" pair, where Entry shows how the path 5691 // is made visible and Target is the actual Amazon S3 path. If you only specify 5692 // a target, it will be displayed as is. You will need to also make sure that 5693 // your IAM role provides access to paths in Target. The following is an example. 5694 // 5695 // '[ "/bucket2/documentation", { "Entry": "your-personal-report.pdf", "Target": 5696 // "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]' 5697 // 5698 // In most cases, you can use this value instead of the scope-down policy to 5699 // lock your user down to the designated home directory ("chroot"). To do this, 5700 // you can set Entry to '/' and set Target to the HomeDirectory parameter value. 5701 // 5702 // If the target of a logical directory entry does not exist in Amazon S3, the 5703 // entry will be ignored. As a workaround, you can use the Amazon S3 API to 5704 // create 0 byte objects as place holders for your directory. If using the CLI, 5705 // use the s3api call instead of s3 so you can use the put-object operation. 5706 // For example, you use the following: aws s3api put-object --bucket bucketname 5707 // --key path/to/folder/. Make sure that the end of the key name ends in a / 5708 // for it to be considered a folder. 5709 HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` 5710 5711 // The type of landing directory (folder) you want your users' home directory 5712 // to be when they log into the server. If you set it to PATH, the user will 5713 // see the absolute Amazon S3 bucket paths as is in their file transfer protocol 5714 // clients. If you set it LOGICAL, you will need to provide mappings in the 5715 // HomeDirectoryMappings for how you want to make Amazon S3 paths visible to 5716 // your users. 5717 HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` 5718 5719 // Allows you to supply a scope-down policy for your user so you can use the 5720 // same IAM role across multiple users. The policy scopes down user access to 5721 // portions of your Amazon S3 bucket. Variables you can use inside this policy 5722 // include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}. 5723 // 5724 // For scope-down policies, AWS Transfer Family stores the policy as a JSON 5725 // blob, instead of the Amazon Resource Name (ARN) of the policy. You save the 5726 // policy as a JSON blob and pass it in the Policy argument. 5727 // 5728 // For an example of a scope-down policy, see Creating a scope-down policy (https://docs.aws.amazon.com/transfer/latest/userguide/users.html#users-policies-scope-down). 5729 // 5730 // For more information, see AssumeRole (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) 5731 // in the AWS Security Token Service API Reference. 5732 Policy *string `type:"string"` 5733 5734 // The IAM role that controls your users' access to your Amazon S3 bucket. The 5735 // policies attached to this role will determine the level of access you want 5736 // to provide your users when transferring files into and out of your Amazon 5737 // S3 bucket or buckets. The IAM role should also contain a trust relationship 5738 // that allows the server to access your resources when servicing your users' 5739 // transfer requests. 5740 Role *string `min:"20" type:"string"` 5741 5742 // A system-assigned unique identifier for a server instance that the user account 5743 // is assigned to. 5744 // 5745 // ServerId is a required field 5746 ServerId *string `min:"19" type:"string" required:"true"` 5747 5748 // A unique string that identifies a user and is associated with a server as 5749 // specified by the ServerId. This user name must be a minimum of 3 and a maximum 5750 // of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, 5751 // underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't 5752 // start with a hyphen, period, or at sign. 5753 // 5754 // UserName is a required field 5755 UserName *string `min:"3" type:"string" required:"true"` 5756} 5757 5758// String returns the string representation 5759func (s UpdateUserInput) String() string { 5760 return awsutil.Prettify(s) 5761} 5762 5763// GoString returns the string representation 5764func (s UpdateUserInput) GoString() string { 5765 return s.String() 5766} 5767 5768// Validate inspects the fields of the type to determine if they are valid. 5769func (s *UpdateUserInput) Validate() error { 5770 invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} 5771 if s.HomeDirectoryMappings != nil && len(s.HomeDirectoryMappings) < 1 { 5772 invalidParams.Add(request.NewErrParamMinLen("HomeDirectoryMappings", 1)) 5773 } 5774 if s.Role != nil && len(*s.Role) < 20 { 5775 invalidParams.Add(request.NewErrParamMinLen("Role", 20)) 5776 } 5777 if s.ServerId == nil { 5778 invalidParams.Add(request.NewErrParamRequired("ServerId")) 5779 } 5780 if s.ServerId != nil && len(*s.ServerId) < 19 { 5781 invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) 5782 } 5783 if s.UserName == nil { 5784 invalidParams.Add(request.NewErrParamRequired("UserName")) 5785 } 5786 if s.UserName != nil && len(*s.UserName) < 3 { 5787 invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) 5788 } 5789 if s.HomeDirectoryMappings != nil { 5790 for i, v := range s.HomeDirectoryMappings { 5791 if v == nil { 5792 continue 5793 } 5794 if err := v.Validate(); err != nil { 5795 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HomeDirectoryMappings", i), err.(request.ErrInvalidParams)) 5796 } 5797 } 5798 } 5799 5800 if invalidParams.Len() > 0 { 5801 return invalidParams 5802 } 5803 return nil 5804} 5805 5806// SetHomeDirectory sets the HomeDirectory field's value. 5807func (s *UpdateUserInput) SetHomeDirectory(v string) *UpdateUserInput { 5808 s.HomeDirectory = &v 5809 return s 5810} 5811 5812// SetHomeDirectoryMappings sets the HomeDirectoryMappings field's value. 5813func (s *UpdateUserInput) SetHomeDirectoryMappings(v []*HomeDirectoryMapEntry) *UpdateUserInput { 5814 s.HomeDirectoryMappings = v 5815 return s 5816} 5817 5818// SetHomeDirectoryType sets the HomeDirectoryType field's value. 5819func (s *UpdateUserInput) SetHomeDirectoryType(v string) *UpdateUserInput { 5820 s.HomeDirectoryType = &v 5821 return s 5822} 5823 5824// SetPolicy sets the Policy field's value. 5825func (s *UpdateUserInput) SetPolicy(v string) *UpdateUserInput { 5826 s.Policy = &v 5827 return s 5828} 5829 5830// SetRole sets the Role field's value. 5831func (s *UpdateUserInput) SetRole(v string) *UpdateUserInput { 5832 s.Role = &v 5833 return s 5834} 5835 5836// SetServerId sets the ServerId field's value. 5837func (s *UpdateUserInput) SetServerId(v string) *UpdateUserInput { 5838 s.ServerId = &v 5839 return s 5840} 5841 5842// SetUserName sets the UserName field's value. 5843func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput { 5844 s.UserName = &v 5845 return s 5846} 5847 5848// UpdateUserResponse returns the user name and identifier for the request to 5849// update a user's properties. 5850type UpdateUserOutput struct { 5851 _ struct{} `type:"structure"` 5852 5853 // A system-assigned unique identifier for a server instance that the user account 5854 // is assigned to. 5855 // 5856 // ServerId is a required field 5857 ServerId *string `min:"19" type:"string" required:"true"` 5858 5859 // The unique identifier for a user that is assigned to a server instance that 5860 // was specified in the request. 5861 // 5862 // UserName is a required field 5863 UserName *string `min:"3" type:"string" required:"true"` 5864} 5865 5866// String returns the string representation 5867func (s UpdateUserOutput) String() string { 5868 return awsutil.Prettify(s) 5869} 5870 5871// GoString returns the string representation 5872func (s UpdateUserOutput) GoString() string { 5873 return s.String() 5874} 5875 5876// SetServerId sets the ServerId field's value. 5877func (s *UpdateUserOutput) SetServerId(v string) *UpdateUserOutput { 5878 s.ServerId = &v 5879 return s 5880} 5881 5882// SetUserName sets the UserName field's value. 5883func (s *UpdateUserOutput) SetUserName(v string) *UpdateUserOutput { 5884 s.UserName = &v 5885 return s 5886} 5887 5888const ( 5889 // EndpointTypePublic is a EndpointType enum value 5890 EndpointTypePublic = "PUBLIC" 5891 5892 // EndpointTypeVpc is a EndpointType enum value 5893 EndpointTypeVpc = "VPC" 5894 5895 // EndpointTypeVpcEndpoint is a EndpointType enum value 5896 EndpointTypeVpcEndpoint = "VPC_ENDPOINT" 5897) 5898 5899// EndpointType_Values returns all elements of the EndpointType enum 5900func EndpointType_Values() []string { 5901 return []string{ 5902 EndpointTypePublic, 5903 EndpointTypeVpc, 5904 EndpointTypeVpcEndpoint, 5905 } 5906} 5907 5908const ( 5909 // HomeDirectoryTypePath is a HomeDirectoryType enum value 5910 HomeDirectoryTypePath = "PATH" 5911 5912 // HomeDirectoryTypeLogical is a HomeDirectoryType enum value 5913 HomeDirectoryTypeLogical = "LOGICAL" 5914) 5915 5916// HomeDirectoryType_Values returns all elements of the HomeDirectoryType enum 5917func HomeDirectoryType_Values() []string { 5918 return []string{ 5919 HomeDirectoryTypePath, 5920 HomeDirectoryTypeLogical, 5921 } 5922} 5923 5924// Returns information related to the type of user authentication that is in 5925// use for a file transfer protocol-enabled server's users. For SERVICE_MANAGED 5926// authentication, the Secure Shell (SSH) public keys are stored with a user 5927// on the server instance. For API_GATEWAY authentication, your custom authentication 5928// method is implemented by using an API call. The server can have only one 5929// method of authentication. 5930const ( 5931 // IdentityProviderTypeServiceManaged is a IdentityProviderType enum value 5932 IdentityProviderTypeServiceManaged = "SERVICE_MANAGED" 5933 5934 // IdentityProviderTypeApiGateway is a IdentityProviderType enum value 5935 IdentityProviderTypeApiGateway = "API_GATEWAY" 5936) 5937 5938// IdentityProviderType_Values returns all elements of the IdentityProviderType enum 5939func IdentityProviderType_Values() []string { 5940 return []string{ 5941 IdentityProviderTypeServiceManaged, 5942 IdentityProviderTypeApiGateway, 5943 } 5944} 5945 5946const ( 5947 // ProtocolSftp is a Protocol enum value 5948 ProtocolSftp = "SFTP" 5949 5950 // ProtocolFtp is a Protocol enum value 5951 ProtocolFtp = "FTP" 5952 5953 // ProtocolFtps is a Protocol enum value 5954 ProtocolFtps = "FTPS" 5955) 5956 5957// Protocol_Values returns all elements of the Protocol enum 5958func Protocol_Values() []string { 5959 return []string{ 5960 ProtocolSftp, 5961 ProtocolFtp, 5962 ProtocolFtps, 5963 } 5964} 5965 5966// Describes the condition of a file transfer protocol-enabled server with respect 5967// to its ability to perform file operations. There are six possible states: 5968// OFFLINE, ONLINE, STARTING, STOPPING, START_FAILED, and STOP_FAILED. 5969// 5970// OFFLINE indicates that the server exists, but that it is not available for 5971// file operations. ONLINE indicates that the server is available to perform 5972// file operations. STARTING indicates that the server's was instantiated, but 5973// the server is not yet available to perform file operations. Under normal 5974// conditions, it can take a couple of minutes for the server to be completely 5975// operational. Both START_FAILED and STOP_FAILED are error conditions. 5976const ( 5977 // StateOffline is a State enum value 5978 StateOffline = "OFFLINE" 5979 5980 // StateOnline is a State enum value 5981 StateOnline = "ONLINE" 5982 5983 // StateStarting is a State enum value 5984 StateStarting = "STARTING" 5985 5986 // StateStopping is a State enum value 5987 StateStopping = "STOPPING" 5988 5989 // StateStartFailed is a State enum value 5990 StateStartFailed = "START_FAILED" 5991 5992 // StateStopFailed is a State enum value 5993 StateStopFailed = "STOP_FAILED" 5994) 5995 5996// State_Values returns all elements of the State enum 5997func State_Values() []string { 5998 return []string{ 5999 StateOffline, 6000 StateOnline, 6001 StateStarting, 6002 StateStopping, 6003 StateStartFailed, 6004 StateStopFailed, 6005 } 6006} 6007