1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package datasync 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 opCancelTaskExecution = "CancelTaskExecution" 17 18// CancelTaskExecutionRequest generates a "aws/request.Request" representing the 19// client's request for the CancelTaskExecution 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 CancelTaskExecution for more information on using the CancelTaskExecution 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 CancelTaskExecutionRequest method. 34// req, resp := client.CancelTaskExecutionRequest(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/datasync-2018-11-09/CancelTaskExecution 42func (c *DataSync) CancelTaskExecutionRequest(input *CancelTaskExecutionInput) (req *request.Request, output *CancelTaskExecutionOutput) { 43 op := &request.Operation{ 44 Name: opCancelTaskExecution, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CancelTaskExecutionInput{} 51 } 52 53 output = &CancelTaskExecutionOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57} 58 59// CancelTaskExecution API operation for AWS DataSync. 60// 61// Cancels execution of a task. 62// 63// When you cancel a task execution, the transfer of some files are abruptly 64// interrupted. The contents of files that are transferred to the destination 65// might be incomplete or inconsistent with the source files. However, if you 66// start a new task execution on the same task and you allow the task execution 67// to complete, file content on the destination is complete and consistent. 68// This applies to other unexpected failures that interrupt a task execution. 69// In all of these cases, AWS DataSync successfully complete the transfer when 70// you start the next task execution. 71// 72// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 73// with awserr.Error's Code and Message methods to get detailed information about 74// the error. 75// 76// See the AWS API reference guide for AWS DataSync's 77// API operation CancelTaskExecution for usage and error information. 78// 79// Returned Error Codes: 80// * ErrCodeInvalidRequestException "InvalidRequestException" 81// This exception is thrown when the client submits a malformed request. 82// 83// * ErrCodeInternalException "InternalException" 84// This exception is thrown when an error occurs in the AWS DataSync service. 85// 86// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution 87func (c *DataSync) CancelTaskExecution(input *CancelTaskExecutionInput) (*CancelTaskExecutionOutput, error) { 88 req, out := c.CancelTaskExecutionRequest(input) 89 return out, req.Send() 90} 91 92// CancelTaskExecutionWithContext is the same as CancelTaskExecution with the addition of 93// the ability to pass a context and additional request options. 94// 95// See CancelTaskExecution for details on how to use this API operation. 96// 97// The context must be non-nil and will be used for request cancellation. If 98// the context is nil a panic will occur. In the future the SDK may create 99// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 100// for more information on using Contexts. 101func (c *DataSync) CancelTaskExecutionWithContext(ctx aws.Context, input *CancelTaskExecutionInput, opts ...request.Option) (*CancelTaskExecutionOutput, error) { 102 req, out := c.CancelTaskExecutionRequest(input) 103 req.SetContext(ctx) 104 req.ApplyOptions(opts...) 105 return out, req.Send() 106} 107 108const opCreateAgent = "CreateAgent" 109 110// CreateAgentRequest generates a "aws/request.Request" representing the 111// client's request for the CreateAgent operation. The "output" return 112// value will be populated with the request's response once the request completes 113// successfully. 114// 115// Use "Send" method on the returned Request to send the API call to the service. 116// the "output" return value is not valid until after Send returns without error. 117// 118// See CreateAgent for more information on using the CreateAgent 119// API call, and error handling. 120// 121// This method is useful when you want to inject custom logic or configuration 122// into the SDK's request lifecycle. Such as custom headers, or retry logic. 123// 124// 125// // Example sending a request using the CreateAgentRequest method. 126// req, resp := client.CreateAgentRequest(params) 127// 128// err := req.Send() 129// if err == nil { // resp is now filled 130// fmt.Println(resp) 131// } 132// 133// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent 134func (c *DataSync) CreateAgentRequest(input *CreateAgentInput) (req *request.Request, output *CreateAgentOutput) { 135 op := &request.Operation{ 136 Name: opCreateAgent, 137 HTTPMethod: "POST", 138 HTTPPath: "/", 139 } 140 141 if input == nil { 142 input = &CreateAgentInput{} 143 } 144 145 output = &CreateAgentOutput{} 146 req = c.newRequest(op, input, output) 147 return 148} 149 150// CreateAgent API operation for AWS DataSync. 151// 152// Activates an AWS DataSync agent that you have deployed on your host. The 153// activation process associates your agent with your account. In the activation 154// process, you specify information such as the AWS Region that you want to 155// activate the agent in. You activate the agent in the AWS Region where your 156// target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created 157// in this AWS Region. 158// 159// You can activate the agent in a VPC (Virtual private Cloud) or provide the 160// agent access to a VPC endpoint so you can run tasks without going over the 161// public Internet. 162// 163// You can use an agent for more than one location. If a task uses multiple 164// agents, all of them need to have status AVAILABLE for the task to run. If 165// you use multiple agents for a source location, the status of all the agents 166// must be AVAILABLE for the task to run. 167// 168// Agents are automatically updated by AWS on a regular basis, using a mechanism 169// that ensures minimal interruption to your tasks. 170// 171// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 172// with awserr.Error's Code and Message methods to get detailed information about 173// the error. 174// 175// See the AWS API reference guide for AWS DataSync's 176// API operation CreateAgent for usage and error information. 177// 178// Returned Error Codes: 179// * ErrCodeInvalidRequestException "InvalidRequestException" 180// This exception is thrown when the client submits a malformed request. 181// 182// * ErrCodeInternalException "InternalException" 183// This exception is thrown when an error occurs in the AWS DataSync service. 184// 185// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent 186func (c *DataSync) CreateAgent(input *CreateAgentInput) (*CreateAgentOutput, error) { 187 req, out := c.CreateAgentRequest(input) 188 return out, req.Send() 189} 190 191// CreateAgentWithContext is the same as CreateAgent with the addition of 192// the ability to pass a context and additional request options. 193// 194// See CreateAgent for details on how to use this API operation. 195// 196// The context must be non-nil and will be used for request cancellation. If 197// the context is nil a panic will occur. In the future the SDK may create 198// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 199// for more information on using Contexts. 200func (c *DataSync) CreateAgentWithContext(ctx aws.Context, input *CreateAgentInput, opts ...request.Option) (*CreateAgentOutput, error) { 201 req, out := c.CreateAgentRequest(input) 202 req.SetContext(ctx) 203 req.ApplyOptions(opts...) 204 return out, req.Send() 205} 206 207const opCreateLocationEfs = "CreateLocationEfs" 208 209// CreateLocationEfsRequest generates a "aws/request.Request" representing the 210// client's request for the CreateLocationEfs operation. The "output" return 211// value will be populated with the request's response once the request completes 212// successfully. 213// 214// Use "Send" method on the returned Request to send the API call to the service. 215// the "output" return value is not valid until after Send returns without error. 216// 217// See CreateLocationEfs for more information on using the CreateLocationEfs 218// API call, and error handling. 219// 220// This method is useful when you want to inject custom logic or configuration 221// into the SDK's request lifecycle. Such as custom headers, or retry logic. 222// 223// 224// // Example sending a request using the CreateLocationEfsRequest method. 225// req, resp := client.CreateLocationEfsRequest(params) 226// 227// err := req.Send() 228// if err == nil { // resp is now filled 229// fmt.Println(resp) 230// } 231// 232// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs 233func (c *DataSync) CreateLocationEfsRequest(input *CreateLocationEfsInput) (req *request.Request, output *CreateLocationEfsOutput) { 234 op := &request.Operation{ 235 Name: opCreateLocationEfs, 236 HTTPMethod: "POST", 237 HTTPPath: "/", 238 } 239 240 if input == nil { 241 input = &CreateLocationEfsInput{} 242 } 243 244 output = &CreateLocationEfsOutput{} 245 req = c.newRequest(op, input, output) 246 return 247} 248 249// CreateLocationEfs API operation for AWS DataSync. 250// 251// Creates an endpoint for an Amazon EFS file system. 252// 253// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 254// with awserr.Error's Code and Message methods to get detailed information about 255// the error. 256// 257// See the AWS API reference guide for AWS DataSync's 258// API operation CreateLocationEfs for usage and error information. 259// 260// Returned Error Codes: 261// * ErrCodeInvalidRequestException "InvalidRequestException" 262// This exception is thrown when the client submits a malformed request. 263// 264// * ErrCodeInternalException "InternalException" 265// This exception is thrown when an error occurs in the AWS DataSync service. 266// 267// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs 268func (c *DataSync) CreateLocationEfs(input *CreateLocationEfsInput) (*CreateLocationEfsOutput, error) { 269 req, out := c.CreateLocationEfsRequest(input) 270 return out, req.Send() 271} 272 273// CreateLocationEfsWithContext is the same as CreateLocationEfs with the addition of 274// the ability to pass a context and additional request options. 275// 276// See CreateLocationEfs for details on how to use this API operation. 277// 278// The context must be non-nil and will be used for request cancellation. If 279// the context is nil a panic will occur. In the future the SDK may create 280// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 281// for more information on using Contexts. 282func (c *DataSync) CreateLocationEfsWithContext(ctx aws.Context, input *CreateLocationEfsInput, opts ...request.Option) (*CreateLocationEfsOutput, error) { 283 req, out := c.CreateLocationEfsRequest(input) 284 req.SetContext(ctx) 285 req.ApplyOptions(opts...) 286 return out, req.Send() 287} 288 289const opCreateLocationNfs = "CreateLocationNfs" 290 291// CreateLocationNfsRequest generates a "aws/request.Request" representing the 292// client's request for the CreateLocationNfs operation. The "output" return 293// value will be populated with the request's response once the request completes 294// successfully. 295// 296// Use "Send" method on the returned Request to send the API call to the service. 297// the "output" return value is not valid until after Send returns without error. 298// 299// See CreateLocationNfs for more information on using the CreateLocationNfs 300// API call, and error handling. 301// 302// This method is useful when you want to inject custom logic or configuration 303// into the SDK's request lifecycle. Such as custom headers, or retry logic. 304// 305// 306// // Example sending a request using the CreateLocationNfsRequest method. 307// req, resp := client.CreateLocationNfsRequest(params) 308// 309// err := req.Send() 310// if err == nil { // resp is now filled 311// fmt.Println(resp) 312// } 313// 314// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs 315func (c *DataSync) CreateLocationNfsRequest(input *CreateLocationNfsInput) (req *request.Request, output *CreateLocationNfsOutput) { 316 op := &request.Operation{ 317 Name: opCreateLocationNfs, 318 HTTPMethod: "POST", 319 HTTPPath: "/", 320 } 321 322 if input == nil { 323 input = &CreateLocationNfsInput{} 324 } 325 326 output = &CreateLocationNfsOutput{} 327 req = c.newRequest(op, input, output) 328 return 329} 330 331// CreateLocationNfs API operation for AWS DataSync. 332// 333// Creates an endpoint for a Network File System (NFS) file system. 334// 335// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 336// with awserr.Error's Code and Message methods to get detailed information about 337// the error. 338// 339// See the AWS API reference guide for AWS DataSync's 340// API operation CreateLocationNfs for usage and error information. 341// 342// Returned Error Codes: 343// * ErrCodeInvalidRequestException "InvalidRequestException" 344// This exception is thrown when the client submits a malformed request. 345// 346// * ErrCodeInternalException "InternalException" 347// This exception is thrown when an error occurs in the AWS DataSync service. 348// 349// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs 350func (c *DataSync) CreateLocationNfs(input *CreateLocationNfsInput) (*CreateLocationNfsOutput, error) { 351 req, out := c.CreateLocationNfsRequest(input) 352 return out, req.Send() 353} 354 355// CreateLocationNfsWithContext is the same as CreateLocationNfs with the addition of 356// the ability to pass a context and additional request options. 357// 358// See CreateLocationNfs for details on how to use this API operation. 359// 360// The context must be non-nil and will be used for request cancellation. If 361// the context is nil a panic will occur. In the future the SDK may create 362// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 363// for more information on using Contexts. 364func (c *DataSync) CreateLocationNfsWithContext(ctx aws.Context, input *CreateLocationNfsInput, opts ...request.Option) (*CreateLocationNfsOutput, error) { 365 req, out := c.CreateLocationNfsRequest(input) 366 req.SetContext(ctx) 367 req.ApplyOptions(opts...) 368 return out, req.Send() 369} 370 371const opCreateLocationS3 = "CreateLocationS3" 372 373// CreateLocationS3Request generates a "aws/request.Request" representing the 374// client's request for the CreateLocationS3 operation. The "output" return 375// value will be populated with the request's response once the request completes 376// successfully. 377// 378// Use "Send" method on the returned Request to send the API call to the service. 379// the "output" return value is not valid until after Send returns without error. 380// 381// See CreateLocationS3 for more information on using the CreateLocationS3 382// API call, and error handling. 383// 384// This method is useful when you want to inject custom logic or configuration 385// into the SDK's request lifecycle. Such as custom headers, or retry logic. 386// 387// 388// // Example sending a request using the CreateLocationS3Request method. 389// req, resp := client.CreateLocationS3Request(params) 390// 391// err := req.Send() 392// if err == nil { // resp is now filled 393// fmt.Println(resp) 394// } 395// 396// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 397func (c *DataSync) CreateLocationS3Request(input *CreateLocationS3Input) (req *request.Request, output *CreateLocationS3Output) { 398 op := &request.Operation{ 399 Name: opCreateLocationS3, 400 HTTPMethod: "POST", 401 HTTPPath: "/", 402 } 403 404 if input == nil { 405 input = &CreateLocationS3Input{} 406 } 407 408 output = &CreateLocationS3Output{} 409 req = c.newRequest(op, input, output) 410 return 411} 412 413// CreateLocationS3 API operation for AWS DataSync. 414// 415// Creates an endpoint for an Amazon S3 bucket. 416// 417// For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity 418// and Access Management (IAM) role that has the required permissions. You can 419// set up the required permissions by creating an IAM policy that grants the 420// required permissions and attaching the policy to the role. An example of 421// such a policy is shown in the examples section. 422// 423// For more information, see Configuring Amazon S3 Location Settings in the 424// AWS DataSync User Guide. 425// 426// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 427// with awserr.Error's Code and Message methods to get detailed information about 428// the error. 429// 430// See the AWS API reference guide for AWS DataSync's 431// API operation CreateLocationS3 for usage and error information. 432// 433// Returned Error Codes: 434// * ErrCodeInvalidRequestException "InvalidRequestException" 435// This exception is thrown when the client submits a malformed request. 436// 437// * ErrCodeInternalException "InternalException" 438// This exception is thrown when an error occurs in the AWS DataSync service. 439// 440// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 441func (c *DataSync) CreateLocationS3(input *CreateLocationS3Input) (*CreateLocationS3Output, error) { 442 req, out := c.CreateLocationS3Request(input) 443 return out, req.Send() 444} 445 446// CreateLocationS3WithContext is the same as CreateLocationS3 with the addition of 447// the ability to pass a context and additional request options. 448// 449// See CreateLocationS3 for details on how to use this API operation. 450// 451// The context must be non-nil and will be used for request cancellation. If 452// the context is nil a panic will occur. In the future the SDK may create 453// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 454// for more information on using Contexts. 455func (c *DataSync) CreateLocationS3WithContext(ctx aws.Context, input *CreateLocationS3Input, opts ...request.Option) (*CreateLocationS3Output, error) { 456 req, out := c.CreateLocationS3Request(input) 457 req.SetContext(ctx) 458 req.ApplyOptions(opts...) 459 return out, req.Send() 460} 461 462const opCreateLocationSmb = "CreateLocationSmb" 463 464// CreateLocationSmbRequest generates a "aws/request.Request" representing the 465// client's request for the CreateLocationSmb operation. The "output" return 466// value will be populated with the request's response once the request completes 467// successfully. 468// 469// Use "Send" method on the returned Request to send the API call to the service. 470// the "output" return value is not valid until after Send returns without error. 471// 472// See CreateLocationSmb for more information on using the CreateLocationSmb 473// API call, and error handling. 474// 475// This method is useful when you want to inject custom logic or configuration 476// into the SDK's request lifecycle. Such as custom headers, or retry logic. 477// 478// 479// // Example sending a request using the CreateLocationSmbRequest method. 480// req, resp := client.CreateLocationSmbRequest(params) 481// 482// err := req.Send() 483// if err == nil { // resp is now filled 484// fmt.Println(resp) 485// } 486// 487// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationSmb 488func (c *DataSync) CreateLocationSmbRequest(input *CreateLocationSmbInput) (req *request.Request, output *CreateLocationSmbOutput) { 489 op := &request.Operation{ 490 Name: opCreateLocationSmb, 491 HTTPMethod: "POST", 492 HTTPPath: "/", 493 } 494 495 if input == nil { 496 input = &CreateLocationSmbInput{} 497 } 498 499 output = &CreateLocationSmbOutput{} 500 req = c.newRequest(op, input, output) 501 return 502} 503 504// CreateLocationSmb API operation for AWS DataSync. 505// 506// Creates an endpoint for a Server Message Block (SMB) file system. 507// 508// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 509// with awserr.Error's Code and Message methods to get detailed information about 510// the error. 511// 512// See the AWS API reference guide for AWS DataSync's 513// API operation CreateLocationSmb for usage and error information. 514// 515// Returned Error Codes: 516// * ErrCodeInvalidRequestException "InvalidRequestException" 517// This exception is thrown when the client submits a malformed request. 518// 519// * ErrCodeInternalException "InternalException" 520// This exception is thrown when an error occurs in the AWS DataSync service. 521// 522// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationSmb 523func (c *DataSync) CreateLocationSmb(input *CreateLocationSmbInput) (*CreateLocationSmbOutput, error) { 524 req, out := c.CreateLocationSmbRequest(input) 525 return out, req.Send() 526} 527 528// CreateLocationSmbWithContext is the same as CreateLocationSmb with the addition of 529// the ability to pass a context and additional request options. 530// 531// See CreateLocationSmb for details on how to use this API operation. 532// 533// The context must be non-nil and will be used for request cancellation. If 534// the context is nil a panic will occur. In the future the SDK may create 535// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 536// for more information on using Contexts. 537func (c *DataSync) CreateLocationSmbWithContext(ctx aws.Context, input *CreateLocationSmbInput, opts ...request.Option) (*CreateLocationSmbOutput, error) { 538 req, out := c.CreateLocationSmbRequest(input) 539 req.SetContext(ctx) 540 req.ApplyOptions(opts...) 541 return out, req.Send() 542} 543 544const opCreateTask = "CreateTask" 545 546// CreateTaskRequest generates a "aws/request.Request" representing the 547// client's request for the CreateTask operation. The "output" return 548// value will be populated with the request's response once the request completes 549// successfully. 550// 551// Use "Send" method on the returned Request to send the API call to the service. 552// the "output" return value is not valid until after Send returns without error. 553// 554// See CreateTask for more information on using the CreateTask 555// API call, and error handling. 556// 557// This method is useful when you want to inject custom logic or configuration 558// into the SDK's request lifecycle. Such as custom headers, or retry logic. 559// 560// 561// // Example sending a request using the CreateTaskRequest method. 562// req, resp := client.CreateTaskRequest(params) 563// 564// err := req.Send() 565// if err == nil { // resp is now filled 566// fmt.Println(resp) 567// } 568// 569// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask 570func (c *DataSync) CreateTaskRequest(input *CreateTaskInput) (req *request.Request, output *CreateTaskOutput) { 571 op := &request.Operation{ 572 Name: opCreateTask, 573 HTTPMethod: "POST", 574 HTTPPath: "/", 575 } 576 577 if input == nil { 578 input = &CreateTaskInput{} 579 } 580 581 output = &CreateTaskOutput{} 582 req = c.newRequest(op, input, output) 583 return 584} 585 586// CreateTask API operation for AWS DataSync. 587// 588// Creates a task. A task is a set of two locations (source and destination) 589// and a set of Options that you use to control the behavior of a task. If you 590// don't specify Options when you create a task, AWS DataSync populates them 591// with service defaults. 592// 593// When you create a task, it first enters the CREATING state. During CREATING 594// AWS DataSync attempts to mount the on-premises Network File System (NFS) 595// location. The task transitions to the AVAILABLE state without waiting for 596// the AWS location to become mounted. If required, AWS DataSync mounts the 597// AWS location before each task execution. 598// 599// If an agent that is associated with a source (NFS) location goes offline, 600// the task transitions to the UNAVAILABLE status. If the status of the task 601// remains in the CREATING status for more than a few minutes, it means that 602// your agent might be having trouble mounting the source NFS file system. Check 603// the task's ErrorCode and ErrorDetail. Mount issues are often caused by either 604// a misconfigured firewall or a mistyped NFS server host name. 605// 606// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 607// with awserr.Error's Code and Message methods to get detailed information about 608// the error. 609// 610// See the AWS API reference guide for AWS DataSync's 611// API operation CreateTask for usage and error information. 612// 613// Returned Error Codes: 614// * ErrCodeInvalidRequestException "InvalidRequestException" 615// This exception is thrown when the client submits a malformed request. 616// 617// * ErrCodeInternalException "InternalException" 618// This exception is thrown when an error occurs in the AWS DataSync service. 619// 620// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask 621func (c *DataSync) CreateTask(input *CreateTaskInput) (*CreateTaskOutput, error) { 622 req, out := c.CreateTaskRequest(input) 623 return out, req.Send() 624} 625 626// CreateTaskWithContext is the same as CreateTask with the addition of 627// the ability to pass a context and additional request options. 628// 629// See CreateTask for details on how to use this API operation. 630// 631// The context must be non-nil and will be used for request cancellation. If 632// the context is nil a panic will occur. In the future the SDK may create 633// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 634// for more information on using Contexts. 635func (c *DataSync) CreateTaskWithContext(ctx aws.Context, input *CreateTaskInput, opts ...request.Option) (*CreateTaskOutput, error) { 636 req, out := c.CreateTaskRequest(input) 637 req.SetContext(ctx) 638 req.ApplyOptions(opts...) 639 return out, req.Send() 640} 641 642const opDeleteAgent = "DeleteAgent" 643 644// DeleteAgentRequest generates a "aws/request.Request" representing the 645// client's request for the DeleteAgent operation. The "output" return 646// value will be populated with the request's response once the request completes 647// successfully. 648// 649// Use "Send" method on the returned Request to send the API call to the service. 650// the "output" return value is not valid until after Send returns without error. 651// 652// See DeleteAgent for more information on using the DeleteAgent 653// API call, and error handling. 654// 655// This method is useful when you want to inject custom logic or configuration 656// into the SDK's request lifecycle. Such as custom headers, or retry logic. 657// 658// 659// // Example sending a request using the DeleteAgentRequest method. 660// req, resp := client.DeleteAgentRequest(params) 661// 662// err := req.Send() 663// if err == nil { // resp is now filled 664// fmt.Println(resp) 665// } 666// 667// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent 668func (c *DataSync) DeleteAgentRequest(input *DeleteAgentInput) (req *request.Request, output *DeleteAgentOutput) { 669 op := &request.Operation{ 670 Name: opDeleteAgent, 671 HTTPMethod: "POST", 672 HTTPPath: "/", 673 } 674 675 if input == nil { 676 input = &DeleteAgentInput{} 677 } 678 679 output = &DeleteAgentOutput{} 680 req = c.newRequest(op, input, output) 681 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 682 return 683} 684 685// DeleteAgent API operation for AWS DataSync. 686// 687// Deletes an agent. To specify which agent to delete, use the Amazon Resource 688// Name (ARN) of the agent in your request. The operation disassociates the 689// agent from your AWS account. However, it doesn't delete the agent virtual 690// machine (VM) from your on-premises environment. 691// 692// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 693// with awserr.Error's Code and Message methods to get detailed information about 694// the error. 695// 696// See the AWS API reference guide for AWS DataSync's 697// API operation DeleteAgent for usage and error information. 698// 699// Returned Error Codes: 700// * ErrCodeInvalidRequestException "InvalidRequestException" 701// This exception is thrown when the client submits a malformed request. 702// 703// * ErrCodeInternalException "InternalException" 704// This exception is thrown when an error occurs in the AWS DataSync service. 705// 706// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent 707func (c *DataSync) DeleteAgent(input *DeleteAgentInput) (*DeleteAgentOutput, error) { 708 req, out := c.DeleteAgentRequest(input) 709 return out, req.Send() 710} 711 712// DeleteAgentWithContext is the same as DeleteAgent with the addition of 713// the ability to pass a context and additional request options. 714// 715// See DeleteAgent for details on how to use this API operation. 716// 717// The context must be non-nil and will be used for request cancellation. If 718// the context is nil a panic will occur. In the future the SDK may create 719// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 720// for more information on using Contexts. 721func (c *DataSync) DeleteAgentWithContext(ctx aws.Context, input *DeleteAgentInput, opts ...request.Option) (*DeleteAgentOutput, error) { 722 req, out := c.DeleteAgentRequest(input) 723 req.SetContext(ctx) 724 req.ApplyOptions(opts...) 725 return out, req.Send() 726} 727 728const opDeleteLocation = "DeleteLocation" 729 730// DeleteLocationRequest generates a "aws/request.Request" representing the 731// client's request for the DeleteLocation operation. The "output" return 732// value will be populated with the request's response once the request completes 733// successfully. 734// 735// Use "Send" method on the returned Request to send the API call to the service. 736// the "output" return value is not valid until after Send returns without error. 737// 738// See DeleteLocation for more information on using the DeleteLocation 739// API call, and error handling. 740// 741// This method is useful when you want to inject custom logic or configuration 742// into the SDK's request lifecycle. Such as custom headers, or retry logic. 743// 744// 745// // Example sending a request using the DeleteLocationRequest method. 746// req, resp := client.DeleteLocationRequest(params) 747// 748// err := req.Send() 749// if err == nil { // resp is now filled 750// fmt.Println(resp) 751// } 752// 753// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation 754func (c *DataSync) DeleteLocationRequest(input *DeleteLocationInput) (req *request.Request, output *DeleteLocationOutput) { 755 op := &request.Operation{ 756 Name: opDeleteLocation, 757 HTTPMethod: "POST", 758 HTTPPath: "/", 759 } 760 761 if input == nil { 762 input = &DeleteLocationInput{} 763 } 764 765 output = &DeleteLocationOutput{} 766 req = c.newRequest(op, input, output) 767 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 768 return 769} 770 771// DeleteLocation API operation for AWS DataSync. 772// 773// Deletes the configuration of a location used by AWS DataSync. 774// 775// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 776// with awserr.Error's Code and Message methods to get detailed information about 777// the error. 778// 779// See the AWS API reference guide for AWS DataSync's 780// API operation DeleteLocation for usage and error information. 781// 782// Returned Error Codes: 783// * ErrCodeInvalidRequestException "InvalidRequestException" 784// This exception is thrown when the client submits a malformed request. 785// 786// * ErrCodeInternalException "InternalException" 787// This exception is thrown when an error occurs in the AWS DataSync service. 788// 789// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation 790func (c *DataSync) DeleteLocation(input *DeleteLocationInput) (*DeleteLocationOutput, error) { 791 req, out := c.DeleteLocationRequest(input) 792 return out, req.Send() 793} 794 795// DeleteLocationWithContext is the same as DeleteLocation with the addition of 796// the ability to pass a context and additional request options. 797// 798// See DeleteLocation for details on how to use this API operation. 799// 800// The context must be non-nil and will be used for request cancellation. If 801// the context is nil a panic will occur. In the future the SDK may create 802// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 803// for more information on using Contexts. 804func (c *DataSync) DeleteLocationWithContext(ctx aws.Context, input *DeleteLocationInput, opts ...request.Option) (*DeleteLocationOutput, error) { 805 req, out := c.DeleteLocationRequest(input) 806 req.SetContext(ctx) 807 req.ApplyOptions(opts...) 808 return out, req.Send() 809} 810 811const opDeleteTask = "DeleteTask" 812 813// DeleteTaskRequest generates a "aws/request.Request" representing the 814// client's request for the DeleteTask operation. The "output" return 815// value will be populated with the request's response once the request completes 816// successfully. 817// 818// Use "Send" method on the returned Request to send the API call to the service. 819// the "output" return value is not valid until after Send returns without error. 820// 821// See DeleteTask for more information on using the DeleteTask 822// API call, and error handling. 823// 824// This method is useful when you want to inject custom logic or configuration 825// into the SDK's request lifecycle. Such as custom headers, or retry logic. 826// 827// 828// // Example sending a request using the DeleteTaskRequest method. 829// req, resp := client.DeleteTaskRequest(params) 830// 831// err := req.Send() 832// if err == nil { // resp is now filled 833// fmt.Println(resp) 834// } 835// 836// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask 837func (c *DataSync) DeleteTaskRequest(input *DeleteTaskInput) (req *request.Request, output *DeleteTaskOutput) { 838 op := &request.Operation{ 839 Name: opDeleteTask, 840 HTTPMethod: "POST", 841 HTTPPath: "/", 842 } 843 844 if input == nil { 845 input = &DeleteTaskInput{} 846 } 847 848 output = &DeleteTaskOutput{} 849 req = c.newRequest(op, input, output) 850 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 851 return 852} 853 854// DeleteTask API operation for AWS DataSync. 855// 856// Deletes a task. 857// 858// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 859// with awserr.Error's Code and Message methods to get detailed information about 860// the error. 861// 862// See the AWS API reference guide for AWS DataSync's 863// API operation DeleteTask for usage and error information. 864// 865// Returned Error Codes: 866// * ErrCodeInvalidRequestException "InvalidRequestException" 867// This exception is thrown when the client submits a malformed request. 868// 869// * ErrCodeInternalException "InternalException" 870// This exception is thrown when an error occurs in the AWS DataSync service. 871// 872// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask 873func (c *DataSync) DeleteTask(input *DeleteTaskInput) (*DeleteTaskOutput, error) { 874 req, out := c.DeleteTaskRequest(input) 875 return out, req.Send() 876} 877 878// DeleteTaskWithContext is the same as DeleteTask with the addition of 879// the ability to pass a context and additional request options. 880// 881// See DeleteTask for details on how to use this API operation. 882// 883// The context must be non-nil and will be used for request cancellation. If 884// the context is nil a panic will occur. In the future the SDK may create 885// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 886// for more information on using Contexts. 887func (c *DataSync) DeleteTaskWithContext(ctx aws.Context, input *DeleteTaskInput, opts ...request.Option) (*DeleteTaskOutput, error) { 888 req, out := c.DeleteTaskRequest(input) 889 req.SetContext(ctx) 890 req.ApplyOptions(opts...) 891 return out, req.Send() 892} 893 894const opDescribeAgent = "DescribeAgent" 895 896// DescribeAgentRequest generates a "aws/request.Request" representing the 897// client's request for the DescribeAgent operation. The "output" return 898// value will be populated with the request's response once the request completes 899// successfully. 900// 901// Use "Send" method on the returned Request to send the API call to the service. 902// the "output" return value is not valid until after Send returns without error. 903// 904// See DescribeAgent for more information on using the DescribeAgent 905// API call, and error handling. 906// 907// This method is useful when you want to inject custom logic or configuration 908// into the SDK's request lifecycle. Such as custom headers, or retry logic. 909// 910// 911// // Example sending a request using the DescribeAgentRequest method. 912// req, resp := client.DescribeAgentRequest(params) 913// 914// err := req.Send() 915// if err == nil { // resp is now filled 916// fmt.Println(resp) 917// } 918// 919// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent 920func (c *DataSync) DescribeAgentRequest(input *DescribeAgentInput) (req *request.Request, output *DescribeAgentOutput) { 921 op := &request.Operation{ 922 Name: opDescribeAgent, 923 HTTPMethod: "POST", 924 HTTPPath: "/", 925 } 926 927 if input == nil { 928 input = &DescribeAgentInput{} 929 } 930 931 output = &DescribeAgentOutput{} 932 req = c.newRequest(op, input, output) 933 return 934} 935 936// DescribeAgent API operation for AWS DataSync. 937// 938// Returns metadata such as the name, the network interfaces, and the status 939// (that is, whether the agent is running or not) for an agent. To specify which 940// agent to describe, use the Amazon Resource Name (ARN) of the agent in your 941// request. 942// 943// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 944// with awserr.Error's Code and Message methods to get detailed information about 945// the error. 946// 947// See the AWS API reference guide for AWS DataSync's 948// API operation DescribeAgent for usage and error information. 949// 950// Returned Error Codes: 951// * ErrCodeInvalidRequestException "InvalidRequestException" 952// This exception is thrown when the client submits a malformed request. 953// 954// * ErrCodeInternalException "InternalException" 955// This exception is thrown when an error occurs in the AWS DataSync service. 956// 957// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent 958func (c *DataSync) DescribeAgent(input *DescribeAgentInput) (*DescribeAgentOutput, error) { 959 req, out := c.DescribeAgentRequest(input) 960 return out, req.Send() 961} 962 963// DescribeAgentWithContext is the same as DescribeAgent with the addition of 964// the ability to pass a context and additional request options. 965// 966// See DescribeAgent for details on how to use this API operation. 967// 968// The context must be non-nil and will be used for request cancellation. If 969// the context is nil a panic will occur. In the future the SDK may create 970// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 971// for more information on using Contexts. 972func (c *DataSync) DescribeAgentWithContext(ctx aws.Context, input *DescribeAgentInput, opts ...request.Option) (*DescribeAgentOutput, error) { 973 req, out := c.DescribeAgentRequest(input) 974 req.SetContext(ctx) 975 req.ApplyOptions(opts...) 976 return out, req.Send() 977} 978 979const opDescribeLocationEfs = "DescribeLocationEfs" 980 981// DescribeLocationEfsRequest generates a "aws/request.Request" representing the 982// client's request for the DescribeLocationEfs operation. The "output" return 983// value will be populated with the request's response once the request completes 984// successfully. 985// 986// Use "Send" method on the returned Request to send the API call to the service. 987// the "output" return value is not valid until after Send returns without error. 988// 989// See DescribeLocationEfs for more information on using the DescribeLocationEfs 990// API call, and error handling. 991// 992// This method is useful when you want to inject custom logic or configuration 993// into the SDK's request lifecycle. Such as custom headers, or retry logic. 994// 995// 996// // Example sending a request using the DescribeLocationEfsRequest method. 997// req, resp := client.DescribeLocationEfsRequest(params) 998// 999// err := req.Send() 1000// if err == nil { // resp is now filled 1001// fmt.Println(resp) 1002// } 1003// 1004// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs 1005func (c *DataSync) DescribeLocationEfsRequest(input *DescribeLocationEfsInput) (req *request.Request, output *DescribeLocationEfsOutput) { 1006 op := &request.Operation{ 1007 Name: opDescribeLocationEfs, 1008 HTTPMethod: "POST", 1009 HTTPPath: "/", 1010 } 1011 1012 if input == nil { 1013 input = &DescribeLocationEfsInput{} 1014 } 1015 1016 output = &DescribeLocationEfsOutput{} 1017 req = c.newRequest(op, input, output) 1018 return 1019} 1020 1021// DescribeLocationEfs API operation for AWS DataSync. 1022// 1023// Returns metadata, such as the path information about an Amazon EFS location. 1024// 1025// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1026// with awserr.Error's Code and Message methods to get detailed information about 1027// the error. 1028// 1029// See the AWS API reference guide for AWS DataSync's 1030// API operation DescribeLocationEfs for usage and error information. 1031// 1032// Returned Error Codes: 1033// * ErrCodeInvalidRequestException "InvalidRequestException" 1034// This exception is thrown when the client submits a malformed request. 1035// 1036// * ErrCodeInternalException "InternalException" 1037// This exception is thrown when an error occurs in the AWS DataSync service. 1038// 1039// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs 1040func (c *DataSync) DescribeLocationEfs(input *DescribeLocationEfsInput) (*DescribeLocationEfsOutput, error) { 1041 req, out := c.DescribeLocationEfsRequest(input) 1042 return out, req.Send() 1043} 1044 1045// DescribeLocationEfsWithContext is the same as DescribeLocationEfs with the addition of 1046// the ability to pass a context and additional request options. 1047// 1048// See DescribeLocationEfs for details on how to use this API operation. 1049// 1050// The context must be non-nil and will be used for request cancellation. If 1051// the context is nil a panic will occur. In the future the SDK may create 1052// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1053// for more information on using Contexts. 1054func (c *DataSync) DescribeLocationEfsWithContext(ctx aws.Context, input *DescribeLocationEfsInput, opts ...request.Option) (*DescribeLocationEfsOutput, error) { 1055 req, out := c.DescribeLocationEfsRequest(input) 1056 req.SetContext(ctx) 1057 req.ApplyOptions(opts...) 1058 return out, req.Send() 1059} 1060 1061const opDescribeLocationNfs = "DescribeLocationNfs" 1062 1063// DescribeLocationNfsRequest generates a "aws/request.Request" representing the 1064// client's request for the DescribeLocationNfs operation. The "output" return 1065// value will be populated with the request's response once the request completes 1066// successfully. 1067// 1068// Use "Send" method on the returned Request to send the API call to the service. 1069// the "output" return value is not valid until after Send returns without error. 1070// 1071// See DescribeLocationNfs for more information on using the DescribeLocationNfs 1072// API call, and error handling. 1073// 1074// This method is useful when you want to inject custom logic or configuration 1075// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1076// 1077// 1078// // Example sending a request using the DescribeLocationNfsRequest method. 1079// req, resp := client.DescribeLocationNfsRequest(params) 1080// 1081// err := req.Send() 1082// if err == nil { // resp is now filled 1083// fmt.Println(resp) 1084// } 1085// 1086// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs 1087func (c *DataSync) DescribeLocationNfsRequest(input *DescribeLocationNfsInput) (req *request.Request, output *DescribeLocationNfsOutput) { 1088 op := &request.Operation{ 1089 Name: opDescribeLocationNfs, 1090 HTTPMethod: "POST", 1091 HTTPPath: "/", 1092 } 1093 1094 if input == nil { 1095 input = &DescribeLocationNfsInput{} 1096 } 1097 1098 output = &DescribeLocationNfsOutput{} 1099 req = c.newRequest(op, input, output) 1100 return 1101} 1102 1103// DescribeLocationNfs API operation for AWS DataSync. 1104// 1105// Returns metadata, such as the path information, about a NFS location. 1106// 1107// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1108// with awserr.Error's Code and Message methods to get detailed information about 1109// the error. 1110// 1111// See the AWS API reference guide for AWS DataSync's 1112// API operation DescribeLocationNfs for usage and error information. 1113// 1114// Returned Error Codes: 1115// * ErrCodeInvalidRequestException "InvalidRequestException" 1116// This exception is thrown when the client submits a malformed request. 1117// 1118// * ErrCodeInternalException "InternalException" 1119// This exception is thrown when an error occurs in the AWS DataSync service. 1120// 1121// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs 1122func (c *DataSync) DescribeLocationNfs(input *DescribeLocationNfsInput) (*DescribeLocationNfsOutput, error) { 1123 req, out := c.DescribeLocationNfsRequest(input) 1124 return out, req.Send() 1125} 1126 1127// DescribeLocationNfsWithContext is the same as DescribeLocationNfs with the addition of 1128// the ability to pass a context and additional request options. 1129// 1130// See DescribeLocationNfs for details on how to use this API operation. 1131// 1132// The context must be non-nil and will be used for request cancellation. If 1133// the context is nil a panic will occur. In the future the SDK may create 1134// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1135// for more information on using Contexts. 1136func (c *DataSync) DescribeLocationNfsWithContext(ctx aws.Context, input *DescribeLocationNfsInput, opts ...request.Option) (*DescribeLocationNfsOutput, error) { 1137 req, out := c.DescribeLocationNfsRequest(input) 1138 req.SetContext(ctx) 1139 req.ApplyOptions(opts...) 1140 return out, req.Send() 1141} 1142 1143const opDescribeLocationS3 = "DescribeLocationS3" 1144 1145// DescribeLocationS3Request generates a "aws/request.Request" representing the 1146// client's request for the DescribeLocationS3 operation. The "output" return 1147// value will be populated with the request's response once the request completes 1148// successfully. 1149// 1150// Use "Send" method on the returned Request to send the API call to the service. 1151// the "output" return value is not valid until after Send returns without error. 1152// 1153// See DescribeLocationS3 for more information on using the DescribeLocationS3 1154// API call, and error handling. 1155// 1156// This method is useful when you want to inject custom logic or configuration 1157// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1158// 1159// 1160// // Example sending a request using the DescribeLocationS3Request method. 1161// req, resp := client.DescribeLocationS3Request(params) 1162// 1163// err := req.Send() 1164// if err == nil { // resp is now filled 1165// fmt.Println(resp) 1166// } 1167// 1168// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 1169func (c *DataSync) DescribeLocationS3Request(input *DescribeLocationS3Input) (req *request.Request, output *DescribeLocationS3Output) { 1170 op := &request.Operation{ 1171 Name: opDescribeLocationS3, 1172 HTTPMethod: "POST", 1173 HTTPPath: "/", 1174 } 1175 1176 if input == nil { 1177 input = &DescribeLocationS3Input{} 1178 } 1179 1180 output = &DescribeLocationS3Output{} 1181 req = c.newRequest(op, input, output) 1182 return 1183} 1184 1185// DescribeLocationS3 API operation for AWS DataSync. 1186// 1187// Returns metadata, such as bucket name, about an Amazon S3 bucket location. 1188// 1189// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1190// with awserr.Error's Code and Message methods to get detailed information about 1191// the error. 1192// 1193// See the AWS API reference guide for AWS DataSync's 1194// API operation DescribeLocationS3 for usage and error information. 1195// 1196// Returned Error Codes: 1197// * ErrCodeInvalidRequestException "InvalidRequestException" 1198// This exception is thrown when the client submits a malformed request. 1199// 1200// * ErrCodeInternalException "InternalException" 1201// This exception is thrown when an error occurs in the AWS DataSync service. 1202// 1203// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 1204func (c *DataSync) DescribeLocationS3(input *DescribeLocationS3Input) (*DescribeLocationS3Output, error) { 1205 req, out := c.DescribeLocationS3Request(input) 1206 return out, req.Send() 1207} 1208 1209// DescribeLocationS3WithContext is the same as DescribeLocationS3 with the addition of 1210// the ability to pass a context and additional request options. 1211// 1212// See DescribeLocationS3 for details on how to use this API operation. 1213// 1214// The context must be non-nil and will be used for request cancellation. If 1215// the context is nil a panic will occur. In the future the SDK may create 1216// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1217// for more information on using Contexts. 1218func (c *DataSync) DescribeLocationS3WithContext(ctx aws.Context, input *DescribeLocationS3Input, opts ...request.Option) (*DescribeLocationS3Output, error) { 1219 req, out := c.DescribeLocationS3Request(input) 1220 req.SetContext(ctx) 1221 req.ApplyOptions(opts...) 1222 return out, req.Send() 1223} 1224 1225const opDescribeLocationSmb = "DescribeLocationSmb" 1226 1227// DescribeLocationSmbRequest generates a "aws/request.Request" representing the 1228// client's request for the DescribeLocationSmb operation. The "output" return 1229// value will be populated with the request's response once the request completes 1230// successfully. 1231// 1232// Use "Send" method on the returned Request to send the API call to the service. 1233// the "output" return value is not valid until after Send returns without error. 1234// 1235// See DescribeLocationSmb for more information on using the DescribeLocationSmb 1236// API call, and error handling. 1237// 1238// This method is useful when you want to inject custom logic or configuration 1239// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1240// 1241// 1242// // Example sending a request using the DescribeLocationSmbRequest method. 1243// req, resp := client.DescribeLocationSmbRequest(params) 1244// 1245// err := req.Send() 1246// if err == nil { // resp is now filled 1247// fmt.Println(resp) 1248// } 1249// 1250// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationSmb 1251func (c *DataSync) DescribeLocationSmbRequest(input *DescribeLocationSmbInput) (req *request.Request, output *DescribeLocationSmbOutput) { 1252 op := &request.Operation{ 1253 Name: opDescribeLocationSmb, 1254 HTTPMethod: "POST", 1255 HTTPPath: "/", 1256 } 1257 1258 if input == nil { 1259 input = &DescribeLocationSmbInput{} 1260 } 1261 1262 output = &DescribeLocationSmbOutput{} 1263 req = c.newRequest(op, input, output) 1264 return 1265} 1266 1267// DescribeLocationSmb API operation for AWS DataSync. 1268// 1269// Returns metadata, such as the path and user information about a SMB location. 1270// 1271// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1272// with awserr.Error's Code and Message methods to get detailed information about 1273// the error. 1274// 1275// See the AWS API reference guide for AWS DataSync's 1276// API operation DescribeLocationSmb for usage and error information. 1277// 1278// Returned Error Codes: 1279// * ErrCodeInvalidRequestException "InvalidRequestException" 1280// This exception is thrown when the client submits a malformed request. 1281// 1282// * ErrCodeInternalException "InternalException" 1283// This exception is thrown when an error occurs in the AWS DataSync service. 1284// 1285// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationSmb 1286func (c *DataSync) DescribeLocationSmb(input *DescribeLocationSmbInput) (*DescribeLocationSmbOutput, error) { 1287 req, out := c.DescribeLocationSmbRequest(input) 1288 return out, req.Send() 1289} 1290 1291// DescribeLocationSmbWithContext is the same as DescribeLocationSmb with the addition of 1292// the ability to pass a context and additional request options. 1293// 1294// See DescribeLocationSmb for details on how to use this API operation. 1295// 1296// The context must be non-nil and will be used for request cancellation. If 1297// the context is nil a panic will occur. In the future the SDK may create 1298// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1299// for more information on using Contexts. 1300func (c *DataSync) DescribeLocationSmbWithContext(ctx aws.Context, input *DescribeLocationSmbInput, opts ...request.Option) (*DescribeLocationSmbOutput, error) { 1301 req, out := c.DescribeLocationSmbRequest(input) 1302 req.SetContext(ctx) 1303 req.ApplyOptions(opts...) 1304 return out, req.Send() 1305} 1306 1307const opDescribeTask = "DescribeTask" 1308 1309// DescribeTaskRequest generates a "aws/request.Request" representing the 1310// client's request for the DescribeTask operation. The "output" return 1311// value will be populated with the request's response once the request completes 1312// successfully. 1313// 1314// Use "Send" method on the returned Request to send the API call to the service. 1315// the "output" return value is not valid until after Send returns without error. 1316// 1317// See DescribeTask for more information on using the DescribeTask 1318// API call, and error handling. 1319// 1320// This method is useful when you want to inject custom logic or configuration 1321// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1322// 1323// 1324// // Example sending a request using the DescribeTaskRequest method. 1325// req, resp := client.DescribeTaskRequest(params) 1326// 1327// err := req.Send() 1328// if err == nil { // resp is now filled 1329// fmt.Println(resp) 1330// } 1331// 1332// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask 1333func (c *DataSync) DescribeTaskRequest(input *DescribeTaskInput) (req *request.Request, output *DescribeTaskOutput) { 1334 op := &request.Operation{ 1335 Name: opDescribeTask, 1336 HTTPMethod: "POST", 1337 HTTPPath: "/", 1338 } 1339 1340 if input == nil { 1341 input = &DescribeTaskInput{} 1342 } 1343 1344 output = &DescribeTaskOutput{} 1345 req = c.newRequest(op, input, output) 1346 return 1347} 1348 1349// DescribeTask API operation for AWS DataSync. 1350// 1351// Returns metadata about a task. 1352// 1353// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1354// with awserr.Error's Code and Message methods to get detailed information about 1355// the error. 1356// 1357// See the AWS API reference guide for AWS DataSync's 1358// API operation DescribeTask for usage and error information. 1359// 1360// Returned Error Codes: 1361// * ErrCodeInvalidRequestException "InvalidRequestException" 1362// This exception is thrown when the client submits a malformed request. 1363// 1364// * ErrCodeInternalException "InternalException" 1365// This exception is thrown when an error occurs in the AWS DataSync service. 1366// 1367// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask 1368func (c *DataSync) DescribeTask(input *DescribeTaskInput) (*DescribeTaskOutput, error) { 1369 req, out := c.DescribeTaskRequest(input) 1370 return out, req.Send() 1371} 1372 1373// DescribeTaskWithContext is the same as DescribeTask with the addition of 1374// the ability to pass a context and additional request options. 1375// 1376// See DescribeTask for details on how to use this API operation. 1377// 1378// The context must be non-nil and will be used for request cancellation. If 1379// the context is nil a panic will occur. In the future the SDK may create 1380// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1381// for more information on using Contexts. 1382func (c *DataSync) DescribeTaskWithContext(ctx aws.Context, input *DescribeTaskInput, opts ...request.Option) (*DescribeTaskOutput, error) { 1383 req, out := c.DescribeTaskRequest(input) 1384 req.SetContext(ctx) 1385 req.ApplyOptions(opts...) 1386 return out, req.Send() 1387} 1388 1389const opDescribeTaskExecution = "DescribeTaskExecution" 1390 1391// DescribeTaskExecutionRequest generates a "aws/request.Request" representing the 1392// client's request for the DescribeTaskExecution operation. The "output" return 1393// value will be populated with the request's response once the request completes 1394// successfully. 1395// 1396// Use "Send" method on the returned Request to send the API call to the service. 1397// the "output" return value is not valid until after Send returns without error. 1398// 1399// See DescribeTaskExecution for more information on using the DescribeTaskExecution 1400// API call, and error handling. 1401// 1402// This method is useful when you want to inject custom logic or configuration 1403// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1404// 1405// 1406// // Example sending a request using the DescribeTaskExecutionRequest method. 1407// req, resp := client.DescribeTaskExecutionRequest(params) 1408// 1409// err := req.Send() 1410// if err == nil { // resp is now filled 1411// fmt.Println(resp) 1412// } 1413// 1414// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution 1415func (c *DataSync) DescribeTaskExecutionRequest(input *DescribeTaskExecutionInput) (req *request.Request, output *DescribeTaskExecutionOutput) { 1416 op := &request.Operation{ 1417 Name: opDescribeTaskExecution, 1418 HTTPMethod: "POST", 1419 HTTPPath: "/", 1420 } 1421 1422 if input == nil { 1423 input = &DescribeTaskExecutionInput{} 1424 } 1425 1426 output = &DescribeTaskExecutionOutput{} 1427 req = c.newRequest(op, input, output) 1428 return 1429} 1430 1431// DescribeTaskExecution API operation for AWS DataSync. 1432// 1433// Returns detailed metadata about a task that is being executed. 1434// 1435// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1436// with awserr.Error's Code and Message methods to get detailed information about 1437// the error. 1438// 1439// See the AWS API reference guide for AWS DataSync's 1440// API operation DescribeTaskExecution for usage and error information. 1441// 1442// Returned Error Codes: 1443// * ErrCodeInvalidRequestException "InvalidRequestException" 1444// This exception is thrown when the client submits a malformed request. 1445// 1446// * ErrCodeInternalException "InternalException" 1447// This exception is thrown when an error occurs in the AWS DataSync service. 1448// 1449// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution 1450func (c *DataSync) DescribeTaskExecution(input *DescribeTaskExecutionInput) (*DescribeTaskExecutionOutput, error) { 1451 req, out := c.DescribeTaskExecutionRequest(input) 1452 return out, req.Send() 1453} 1454 1455// DescribeTaskExecutionWithContext is the same as DescribeTaskExecution with the addition of 1456// the ability to pass a context and additional request options. 1457// 1458// See DescribeTaskExecution for details on how to use this API operation. 1459// 1460// The context must be non-nil and will be used for request cancellation. If 1461// the context is nil a panic will occur. In the future the SDK may create 1462// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1463// for more information on using Contexts. 1464func (c *DataSync) DescribeTaskExecutionWithContext(ctx aws.Context, input *DescribeTaskExecutionInput, opts ...request.Option) (*DescribeTaskExecutionOutput, error) { 1465 req, out := c.DescribeTaskExecutionRequest(input) 1466 req.SetContext(ctx) 1467 req.ApplyOptions(opts...) 1468 return out, req.Send() 1469} 1470 1471const opListAgents = "ListAgents" 1472 1473// ListAgentsRequest generates a "aws/request.Request" representing the 1474// client's request for the ListAgents operation. The "output" return 1475// value will be populated with the request's response once the request completes 1476// successfully. 1477// 1478// Use "Send" method on the returned Request to send the API call to the service. 1479// the "output" return value is not valid until after Send returns without error. 1480// 1481// See ListAgents for more information on using the ListAgents 1482// API call, and error handling. 1483// 1484// This method is useful when you want to inject custom logic or configuration 1485// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1486// 1487// 1488// // Example sending a request using the ListAgentsRequest method. 1489// req, resp := client.ListAgentsRequest(params) 1490// 1491// err := req.Send() 1492// if err == nil { // resp is now filled 1493// fmt.Println(resp) 1494// } 1495// 1496// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents 1497func (c *DataSync) ListAgentsRequest(input *ListAgentsInput) (req *request.Request, output *ListAgentsOutput) { 1498 op := &request.Operation{ 1499 Name: opListAgents, 1500 HTTPMethod: "POST", 1501 HTTPPath: "/", 1502 Paginator: &request.Paginator{ 1503 InputTokens: []string{"NextToken"}, 1504 OutputTokens: []string{"NextToken"}, 1505 LimitToken: "MaxResults", 1506 TruncationToken: "", 1507 }, 1508 } 1509 1510 if input == nil { 1511 input = &ListAgentsInput{} 1512 } 1513 1514 output = &ListAgentsOutput{} 1515 req = c.newRequest(op, input, output) 1516 return 1517} 1518 1519// ListAgents API operation for AWS DataSync. 1520// 1521// Returns a list of agents owned by an AWS account in the AWS Region specified 1522// in the request. The returned list is ordered by agent Amazon Resource Name 1523// (ARN). 1524// 1525// By default, this operation returns a maximum of 100 agents. This operation 1526// supports pagination that enables you to optionally reduce the number of agents 1527// returned in a response. 1528// 1529// If you have more agents than are returned in a response (that is, the response 1530// returns only a truncated list of your agents), the response contains a marker 1531// that you can specify in your next request to fetch the next page of agents. 1532// 1533// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1534// with awserr.Error's Code and Message methods to get detailed information about 1535// the error. 1536// 1537// See the AWS API reference guide for AWS DataSync's 1538// API operation ListAgents for usage and error information. 1539// 1540// Returned Error Codes: 1541// * ErrCodeInvalidRequestException "InvalidRequestException" 1542// This exception is thrown when the client submits a malformed request. 1543// 1544// * ErrCodeInternalException "InternalException" 1545// This exception is thrown when an error occurs in the AWS DataSync service. 1546// 1547// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents 1548func (c *DataSync) ListAgents(input *ListAgentsInput) (*ListAgentsOutput, error) { 1549 req, out := c.ListAgentsRequest(input) 1550 return out, req.Send() 1551} 1552 1553// ListAgentsWithContext is the same as ListAgents with the addition of 1554// the ability to pass a context and additional request options. 1555// 1556// See ListAgents for details on how to use this API operation. 1557// 1558// The context must be non-nil and will be used for request cancellation. If 1559// the context is nil a panic will occur. In the future the SDK may create 1560// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1561// for more information on using Contexts. 1562func (c *DataSync) ListAgentsWithContext(ctx aws.Context, input *ListAgentsInput, opts ...request.Option) (*ListAgentsOutput, error) { 1563 req, out := c.ListAgentsRequest(input) 1564 req.SetContext(ctx) 1565 req.ApplyOptions(opts...) 1566 return out, req.Send() 1567} 1568 1569// ListAgentsPages iterates over the pages of a ListAgents operation, 1570// calling the "fn" function with the response data for each page. To stop 1571// iterating, return false from the fn function. 1572// 1573// See ListAgents method for more information on how to use this operation. 1574// 1575// Note: This operation can generate multiple requests to a service. 1576// 1577// // Example iterating over at most 3 pages of a ListAgents operation. 1578// pageNum := 0 1579// err := client.ListAgentsPages(params, 1580// func(page *datasync.ListAgentsOutput, lastPage bool) bool { 1581// pageNum++ 1582// fmt.Println(page) 1583// return pageNum <= 3 1584// }) 1585// 1586func (c *DataSync) ListAgentsPages(input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool) error { 1587 return c.ListAgentsPagesWithContext(aws.BackgroundContext(), input, fn) 1588} 1589 1590// ListAgentsPagesWithContext same as ListAgentsPages except 1591// it takes a Context and allows setting request options on the pages. 1592// 1593// The context must be non-nil and will be used for request cancellation. If 1594// the context is nil a panic will occur. In the future the SDK may create 1595// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1596// for more information on using Contexts. 1597func (c *DataSync) ListAgentsPagesWithContext(ctx aws.Context, input *ListAgentsInput, fn func(*ListAgentsOutput, bool) bool, opts ...request.Option) error { 1598 p := request.Pagination{ 1599 NewRequest: func() (*request.Request, error) { 1600 var inCpy *ListAgentsInput 1601 if input != nil { 1602 tmp := *input 1603 inCpy = &tmp 1604 } 1605 req, _ := c.ListAgentsRequest(inCpy) 1606 req.SetContext(ctx) 1607 req.ApplyOptions(opts...) 1608 return req, nil 1609 }, 1610 } 1611 1612 cont := true 1613 for p.Next() && cont { 1614 cont = fn(p.Page().(*ListAgentsOutput), !p.HasNextPage()) 1615 } 1616 return p.Err() 1617} 1618 1619const opListLocations = "ListLocations" 1620 1621// ListLocationsRequest generates a "aws/request.Request" representing the 1622// client's request for the ListLocations operation. The "output" return 1623// value will be populated with the request's response once the request completes 1624// successfully. 1625// 1626// Use "Send" method on the returned Request to send the API call to the service. 1627// the "output" return value is not valid until after Send returns without error. 1628// 1629// See ListLocations for more information on using the ListLocations 1630// API call, and error handling. 1631// 1632// This method is useful when you want to inject custom logic or configuration 1633// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1634// 1635// 1636// // Example sending a request using the ListLocationsRequest method. 1637// req, resp := client.ListLocationsRequest(params) 1638// 1639// err := req.Send() 1640// if err == nil { // resp is now filled 1641// fmt.Println(resp) 1642// } 1643// 1644// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations 1645func (c *DataSync) ListLocationsRequest(input *ListLocationsInput) (req *request.Request, output *ListLocationsOutput) { 1646 op := &request.Operation{ 1647 Name: opListLocations, 1648 HTTPMethod: "POST", 1649 HTTPPath: "/", 1650 Paginator: &request.Paginator{ 1651 InputTokens: []string{"NextToken"}, 1652 OutputTokens: []string{"NextToken"}, 1653 LimitToken: "MaxResults", 1654 TruncationToken: "", 1655 }, 1656 } 1657 1658 if input == nil { 1659 input = &ListLocationsInput{} 1660 } 1661 1662 output = &ListLocationsOutput{} 1663 req = c.newRequest(op, input, output) 1664 return 1665} 1666 1667// ListLocations API operation for AWS DataSync. 1668// 1669// Returns a lists of source and destination locations. 1670// 1671// If you have more locations than are returned in a response (that is, the 1672// response returns only a truncated list of your agents), the response contains 1673// a token that you can specify in your next request to fetch the next page 1674// of locations. 1675// 1676// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1677// with awserr.Error's Code and Message methods to get detailed information about 1678// the error. 1679// 1680// See the AWS API reference guide for AWS DataSync's 1681// API operation ListLocations for usage and error information. 1682// 1683// Returned Error Codes: 1684// * ErrCodeInvalidRequestException "InvalidRequestException" 1685// This exception is thrown when the client submits a malformed request. 1686// 1687// * ErrCodeInternalException "InternalException" 1688// This exception is thrown when an error occurs in the AWS DataSync service. 1689// 1690// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations 1691func (c *DataSync) ListLocations(input *ListLocationsInput) (*ListLocationsOutput, error) { 1692 req, out := c.ListLocationsRequest(input) 1693 return out, req.Send() 1694} 1695 1696// ListLocationsWithContext is the same as ListLocations with the addition of 1697// the ability to pass a context and additional request options. 1698// 1699// See ListLocations for details on how to use this API operation. 1700// 1701// The context must be non-nil and will be used for request cancellation. If 1702// the context is nil a panic will occur. In the future the SDK may create 1703// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1704// for more information on using Contexts. 1705func (c *DataSync) ListLocationsWithContext(ctx aws.Context, input *ListLocationsInput, opts ...request.Option) (*ListLocationsOutput, error) { 1706 req, out := c.ListLocationsRequest(input) 1707 req.SetContext(ctx) 1708 req.ApplyOptions(opts...) 1709 return out, req.Send() 1710} 1711 1712// ListLocationsPages iterates over the pages of a ListLocations operation, 1713// calling the "fn" function with the response data for each page. To stop 1714// iterating, return false from the fn function. 1715// 1716// See ListLocations method for more information on how to use this operation. 1717// 1718// Note: This operation can generate multiple requests to a service. 1719// 1720// // Example iterating over at most 3 pages of a ListLocations operation. 1721// pageNum := 0 1722// err := client.ListLocationsPages(params, 1723// func(page *datasync.ListLocationsOutput, lastPage bool) bool { 1724// pageNum++ 1725// fmt.Println(page) 1726// return pageNum <= 3 1727// }) 1728// 1729func (c *DataSync) ListLocationsPages(input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool) error { 1730 return c.ListLocationsPagesWithContext(aws.BackgroundContext(), input, fn) 1731} 1732 1733// ListLocationsPagesWithContext same as ListLocationsPages except 1734// it takes a Context and allows setting request options on the pages. 1735// 1736// The context must be non-nil and will be used for request cancellation. If 1737// the context is nil a panic will occur. In the future the SDK may create 1738// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1739// for more information on using Contexts. 1740func (c *DataSync) ListLocationsPagesWithContext(ctx aws.Context, input *ListLocationsInput, fn func(*ListLocationsOutput, bool) bool, opts ...request.Option) error { 1741 p := request.Pagination{ 1742 NewRequest: func() (*request.Request, error) { 1743 var inCpy *ListLocationsInput 1744 if input != nil { 1745 tmp := *input 1746 inCpy = &tmp 1747 } 1748 req, _ := c.ListLocationsRequest(inCpy) 1749 req.SetContext(ctx) 1750 req.ApplyOptions(opts...) 1751 return req, nil 1752 }, 1753 } 1754 1755 cont := true 1756 for p.Next() && cont { 1757 cont = fn(p.Page().(*ListLocationsOutput), !p.HasNextPage()) 1758 } 1759 return p.Err() 1760} 1761 1762const opListTagsForResource = "ListTagsForResource" 1763 1764// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1765// client's request for the ListTagsForResource operation. The "output" return 1766// value will be populated with the request's response once the request completes 1767// successfully. 1768// 1769// Use "Send" method on the returned Request to send the API call to the service. 1770// the "output" return value is not valid until after Send returns without error. 1771// 1772// See ListTagsForResource for more information on using the ListTagsForResource 1773// API call, and error handling. 1774// 1775// This method is useful when you want to inject custom logic or configuration 1776// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1777// 1778// 1779// // Example sending a request using the ListTagsForResourceRequest method. 1780// req, resp := client.ListTagsForResourceRequest(params) 1781// 1782// err := req.Send() 1783// if err == nil { // resp is now filled 1784// fmt.Println(resp) 1785// } 1786// 1787// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource 1788func (c *DataSync) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1789 op := &request.Operation{ 1790 Name: opListTagsForResource, 1791 HTTPMethod: "POST", 1792 HTTPPath: "/", 1793 Paginator: &request.Paginator{ 1794 InputTokens: []string{"NextToken"}, 1795 OutputTokens: []string{"NextToken"}, 1796 LimitToken: "MaxResults", 1797 TruncationToken: "", 1798 }, 1799 } 1800 1801 if input == nil { 1802 input = &ListTagsForResourceInput{} 1803 } 1804 1805 output = &ListTagsForResourceOutput{} 1806 req = c.newRequest(op, input, output) 1807 return 1808} 1809 1810// ListTagsForResource API operation for AWS DataSync. 1811// 1812// Returns all the tags associated with a specified resources. 1813// 1814// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1815// with awserr.Error's Code and Message methods to get detailed information about 1816// the error. 1817// 1818// See the AWS API reference guide for AWS DataSync's 1819// API operation ListTagsForResource for usage and error information. 1820// 1821// Returned Error Codes: 1822// * ErrCodeInvalidRequestException "InvalidRequestException" 1823// This exception is thrown when the client submits a malformed request. 1824// 1825// * ErrCodeInternalException "InternalException" 1826// This exception is thrown when an error occurs in the AWS DataSync service. 1827// 1828// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource 1829func (c *DataSync) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1830 req, out := c.ListTagsForResourceRequest(input) 1831 return out, req.Send() 1832} 1833 1834// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1835// the ability to pass a context and additional request options. 1836// 1837// See ListTagsForResource for details on how to use this API operation. 1838// 1839// The context must be non-nil and will be used for request cancellation. If 1840// the context is nil a panic will occur. In the future the SDK may create 1841// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1842// for more information on using Contexts. 1843func (c *DataSync) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1844 req, out := c.ListTagsForResourceRequest(input) 1845 req.SetContext(ctx) 1846 req.ApplyOptions(opts...) 1847 return out, req.Send() 1848} 1849 1850// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, 1851// calling the "fn" function with the response data for each page. To stop 1852// iterating, return false from the fn function. 1853// 1854// See ListTagsForResource method for more information on how to use this operation. 1855// 1856// Note: This operation can generate multiple requests to a service. 1857// 1858// // Example iterating over at most 3 pages of a ListTagsForResource operation. 1859// pageNum := 0 1860// err := client.ListTagsForResourcePages(params, 1861// func(page *datasync.ListTagsForResourceOutput, lastPage bool) bool { 1862// pageNum++ 1863// fmt.Println(page) 1864// return pageNum <= 3 1865// }) 1866// 1867func (c *DataSync) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { 1868 return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) 1869} 1870 1871// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except 1872// it takes a Context and allows setting request options on the pages. 1873// 1874// The context must be non-nil and will be used for request cancellation. If 1875// the context is nil a panic will occur. In the future the SDK may create 1876// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1877// for more information on using Contexts. 1878func (c *DataSync) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { 1879 p := request.Pagination{ 1880 NewRequest: func() (*request.Request, error) { 1881 var inCpy *ListTagsForResourceInput 1882 if input != nil { 1883 tmp := *input 1884 inCpy = &tmp 1885 } 1886 req, _ := c.ListTagsForResourceRequest(inCpy) 1887 req.SetContext(ctx) 1888 req.ApplyOptions(opts...) 1889 return req, nil 1890 }, 1891 } 1892 1893 cont := true 1894 for p.Next() && cont { 1895 cont = fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) 1896 } 1897 return p.Err() 1898} 1899 1900const opListTaskExecutions = "ListTaskExecutions" 1901 1902// ListTaskExecutionsRequest generates a "aws/request.Request" representing the 1903// client's request for the ListTaskExecutions operation. The "output" return 1904// value will be populated with the request's response once the request completes 1905// successfully. 1906// 1907// Use "Send" method on the returned Request to send the API call to the service. 1908// the "output" return value is not valid until after Send returns without error. 1909// 1910// See ListTaskExecutions for more information on using the ListTaskExecutions 1911// API call, and error handling. 1912// 1913// This method is useful when you want to inject custom logic or configuration 1914// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1915// 1916// 1917// // Example sending a request using the ListTaskExecutionsRequest method. 1918// req, resp := client.ListTaskExecutionsRequest(params) 1919// 1920// err := req.Send() 1921// if err == nil { // resp is now filled 1922// fmt.Println(resp) 1923// } 1924// 1925// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions 1926func (c *DataSync) ListTaskExecutionsRequest(input *ListTaskExecutionsInput) (req *request.Request, output *ListTaskExecutionsOutput) { 1927 op := &request.Operation{ 1928 Name: opListTaskExecutions, 1929 HTTPMethod: "POST", 1930 HTTPPath: "/", 1931 Paginator: &request.Paginator{ 1932 InputTokens: []string{"NextToken"}, 1933 OutputTokens: []string{"NextToken"}, 1934 LimitToken: "MaxResults", 1935 TruncationToken: "", 1936 }, 1937 } 1938 1939 if input == nil { 1940 input = &ListTaskExecutionsInput{} 1941 } 1942 1943 output = &ListTaskExecutionsOutput{} 1944 req = c.newRequest(op, input, output) 1945 return 1946} 1947 1948// ListTaskExecutions API operation for AWS DataSync. 1949// 1950// Returns a list of executed tasks. 1951// 1952// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1953// with awserr.Error's Code and Message methods to get detailed information about 1954// the error. 1955// 1956// See the AWS API reference guide for AWS DataSync's 1957// API operation ListTaskExecutions for usage and error information. 1958// 1959// Returned Error Codes: 1960// * ErrCodeInvalidRequestException "InvalidRequestException" 1961// This exception is thrown when the client submits a malformed request. 1962// 1963// * ErrCodeInternalException "InternalException" 1964// This exception is thrown when an error occurs in the AWS DataSync service. 1965// 1966// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions 1967func (c *DataSync) ListTaskExecutions(input *ListTaskExecutionsInput) (*ListTaskExecutionsOutput, error) { 1968 req, out := c.ListTaskExecutionsRequest(input) 1969 return out, req.Send() 1970} 1971 1972// ListTaskExecutionsWithContext is the same as ListTaskExecutions with the addition of 1973// the ability to pass a context and additional request options. 1974// 1975// See ListTaskExecutions for details on how to use this API operation. 1976// 1977// The context must be non-nil and will be used for request cancellation. If 1978// the context is nil a panic will occur. In the future the SDK may create 1979// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1980// for more information on using Contexts. 1981func (c *DataSync) ListTaskExecutionsWithContext(ctx aws.Context, input *ListTaskExecutionsInput, opts ...request.Option) (*ListTaskExecutionsOutput, error) { 1982 req, out := c.ListTaskExecutionsRequest(input) 1983 req.SetContext(ctx) 1984 req.ApplyOptions(opts...) 1985 return out, req.Send() 1986} 1987 1988// ListTaskExecutionsPages iterates over the pages of a ListTaskExecutions operation, 1989// calling the "fn" function with the response data for each page. To stop 1990// iterating, return false from the fn function. 1991// 1992// See ListTaskExecutions method for more information on how to use this operation. 1993// 1994// Note: This operation can generate multiple requests to a service. 1995// 1996// // Example iterating over at most 3 pages of a ListTaskExecutions operation. 1997// pageNum := 0 1998// err := client.ListTaskExecutionsPages(params, 1999// func(page *datasync.ListTaskExecutionsOutput, lastPage bool) bool { 2000// pageNum++ 2001// fmt.Println(page) 2002// return pageNum <= 3 2003// }) 2004// 2005func (c *DataSync) ListTaskExecutionsPages(input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool) error { 2006 return c.ListTaskExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) 2007} 2008 2009// ListTaskExecutionsPagesWithContext same as ListTaskExecutionsPages except 2010// it takes a Context and allows setting request options on the pages. 2011// 2012// The context must be non-nil and will be used for request cancellation. If 2013// the context is nil a panic will occur. In the future the SDK may create 2014// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2015// for more information on using Contexts. 2016func (c *DataSync) ListTaskExecutionsPagesWithContext(ctx aws.Context, input *ListTaskExecutionsInput, fn func(*ListTaskExecutionsOutput, bool) bool, opts ...request.Option) error { 2017 p := request.Pagination{ 2018 NewRequest: func() (*request.Request, error) { 2019 var inCpy *ListTaskExecutionsInput 2020 if input != nil { 2021 tmp := *input 2022 inCpy = &tmp 2023 } 2024 req, _ := c.ListTaskExecutionsRequest(inCpy) 2025 req.SetContext(ctx) 2026 req.ApplyOptions(opts...) 2027 return req, nil 2028 }, 2029 } 2030 2031 cont := true 2032 for p.Next() && cont { 2033 cont = fn(p.Page().(*ListTaskExecutionsOutput), !p.HasNextPage()) 2034 } 2035 return p.Err() 2036} 2037 2038const opListTasks = "ListTasks" 2039 2040// ListTasksRequest generates a "aws/request.Request" representing the 2041// client's request for the ListTasks operation. The "output" return 2042// value will be populated with the request's response once the request completes 2043// successfully. 2044// 2045// Use "Send" method on the returned Request to send the API call to the service. 2046// the "output" return value is not valid until after Send returns without error. 2047// 2048// See ListTasks for more information on using the ListTasks 2049// API call, and error handling. 2050// 2051// This method is useful when you want to inject custom logic or configuration 2052// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2053// 2054// 2055// // Example sending a request using the ListTasksRequest method. 2056// req, resp := client.ListTasksRequest(params) 2057// 2058// err := req.Send() 2059// if err == nil { // resp is now filled 2060// fmt.Println(resp) 2061// } 2062// 2063// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks 2064func (c *DataSync) ListTasksRequest(input *ListTasksInput) (req *request.Request, output *ListTasksOutput) { 2065 op := &request.Operation{ 2066 Name: opListTasks, 2067 HTTPMethod: "POST", 2068 HTTPPath: "/", 2069 Paginator: &request.Paginator{ 2070 InputTokens: []string{"NextToken"}, 2071 OutputTokens: []string{"NextToken"}, 2072 LimitToken: "MaxResults", 2073 TruncationToken: "", 2074 }, 2075 } 2076 2077 if input == nil { 2078 input = &ListTasksInput{} 2079 } 2080 2081 output = &ListTasksOutput{} 2082 req = c.newRequest(op, input, output) 2083 return 2084} 2085 2086// ListTasks API operation for AWS DataSync. 2087// 2088// Returns a list of all the tasks. 2089// 2090// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2091// with awserr.Error's Code and Message methods to get detailed information about 2092// the error. 2093// 2094// See the AWS API reference guide for AWS DataSync's 2095// API operation ListTasks for usage and error information. 2096// 2097// Returned Error Codes: 2098// * ErrCodeInvalidRequestException "InvalidRequestException" 2099// This exception is thrown when the client submits a malformed request. 2100// 2101// * ErrCodeInternalException "InternalException" 2102// This exception is thrown when an error occurs in the AWS DataSync service. 2103// 2104// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks 2105func (c *DataSync) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) { 2106 req, out := c.ListTasksRequest(input) 2107 return out, req.Send() 2108} 2109 2110// ListTasksWithContext is the same as ListTasks with the addition of 2111// the ability to pass a context and additional request options. 2112// 2113// See ListTasks for details on how to use this API operation. 2114// 2115// The context must be non-nil and will be used for request cancellation. If 2116// the context is nil a panic will occur. In the future the SDK may create 2117// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2118// for more information on using Contexts. 2119func (c *DataSync) ListTasksWithContext(ctx aws.Context, input *ListTasksInput, opts ...request.Option) (*ListTasksOutput, error) { 2120 req, out := c.ListTasksRequest(input) 2121 req.SetContext(ctx) 2122 req.ApplyOptions(opts...) 2123 return out, req.Send() 2124} 2125 2126// ListTasksPages iterates over the pages of a ListTasks operation, 2127// calling the "fn" function with the response data for each page. To stop 2128// iterating, return false from the fn function. 2129// 2130// See ListTasks method for more information on how to use this operation. 2131// 2132// Note: This operation can generate multiple requests to a service. 2133// 2134// // Example iterating over at most 3 pages of a ListTasks operation. 2135// pageNum := 0 2136// err := client.ListTasksPages(params, 2137// func(page *datasync.ListTasksOutput, lastPage bool) bool { 2138// pageNum++ 2139// fmt.Println(page) 2140// return pageNum <= 3 2141// }) 2142// 2143func (c *DataSync) ListTasksPages(input *ListTasksInput, fn func(*ListTasksOutput, bool) bool) error { 2144 return c.ListTasksPagesWithContext(aws.BackgroundContext(), input, fn) 2145} 2146 2147// ListTasksPagesWithContext same as ListTasksPages except 2148// it takes a Context and allows setting request options on the pages. 2149// 2150// The context must be non-nil and will be used for request cancellation. If 2151// the context is nil a panic will occur. In the future the SDK may create 2152// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2153// for more information on using Contexts. 2154func (c *DataSync) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, fn func(*ListTasksOutput, bool) bool, opts ...request.Option) error { 2155 p := request.Pagination{ 2156 NewRequest: func() (*request.Request, error) { 2157 var inCpy *ListTasksInput 2158 if input != nil { 2159 tmp := *input 2160 inCpy = &tmp 2161 } 2162 req, _ := c.ListTasksRequest(inCpy) 2163 req.SetContext(ctx) 2164 req.ApplyOptions(opts...) 2165 return req, nil 2166 }, 2167 } 2168 2169 cont := true 2170 for p.Next() && cont { 2171 cont = fn(p.Page().(*ListTasksOutput), !p.HasNextPage()) 2172 } 2173 return p.Err() 2174} 2175 2176const opStartTaskExecution = "StartTaskExecution" 2177 2178// StartTaskExecutionRequest generates a "aws/request.Request" representing the 2179// client's request for the StartTaskExecution operation. The "output" return 2180// value will be populated with the request's response once the request completes 2181// successfully. 2182// 2183// Use "Send" method on the returned Request to send the API call to the service. 2184// the "output" return value is not valid until after Send returns without error. 2185// 2186// See StartTaskExecution for more information on using the StartTaskExecution 2187// API call, and error handling. 2188// 2189// This method is useful when you want to inject custom logic or configuration 2190// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2191// 2192// 2193// // Example sending a request using the StartTaskExecutionRequest method. 2194// req, resp := client.StartTaskExecutionRequest(params) 2195// 2196// err := req.Send() 2197// if err == nil { // resp is now filled 2198// fmt.Println(resp) 2199// } 2200// 2201// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution 2202func (c *DataSync) StartTaskExecutionRequest(input *StartTaskExecutionInput) (req *request.Request, output *StartTaskExecutionOutput) { 2203 op := &request.Operation{ 2204 Name: opStartTaskExecution, 2205 HTTPMethod: "POST", 2206 HTTPPath: "/", 2207 } 2208 2209 if input == nil { 2210 input = &StartTaskExecutionInput{} 2211 } 2212 2213 output = &StartTaskExecutionOutput{} 2214 req = c.newRequest(op, input, output) 2215 return 2216} 2217 2218// StartTaskExecution API operation for AWS DataSync. 2219// 2220// Starts a specific invocation of a task. A TaskExecution value represents 2221// an individual run of a task. Each task can have at most one TaskExecution 2222// at a time. 2223// 2224// TaskExecution has the following transition phases: INITIALIZING | PREPARING 2225// | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. 2226// 2227// For detailed information, see the Task Execution section in the Components 2228// and Terminology topic in the AWS DataSync User Guide. 2229// 2230// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2231// with awserr.Error's Code and Message methods to get detailed information about 2232// the error. 2233// 2234// See the AWS API reference guide for AWS DataSync's 2235// API operation StartTaskExecution for usage and error information. 2236// 2237// Returned Error Codes: 2238// * ErrCodeInvalidRequestException "InvalidRequestException" 2239// This exception is thrown when the client submits a malformed request. 2240// 2241// * ErrCodeInternalException "InternalException" 2242// This exception is thrown when an error occurs in the AWS DataSync service. 2243// 2244// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution 2245func (c *DataSync) StartTaskExecution(input *StartTaskExecutionInput) (*StartTaskExecutionOutput, error) { 2246 req, out := c.StartTaskExecutionRequest(input) 2247 return out, req.Send() 2248} 2249 2250// StartTaskExecutionWithContext is the same as StartTaskExecution with the addition of 2251// the ability to pass a context and additional request options. 2252// 2253// See StartTaskExecution for details on how to use this API operation. 2254// 2255// The context must be non-nil and will be used for request cancellation. If 2256// the context is nil a panic will occur. In the future the SDK may create 2257// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2258// for more information on using Contexts. 2259func (c *DataSync) StartTaskExecutionWithContext(ctx aws.Context, input *StartTaskExecutionInput, opts ...request.Option) (*StartTaskExecutionOutput, error) { 2260 req, out := c.StartTaskExecutionRequest(input) 2261 req.SetContext(ctx) 2262 req.ApplyOptions(opts...) 2263 return out, req.Send() 2264} 2265 2266const opTagResource = "TagResource" 2267 2268// TagResourceRequest generates a "aws/request.Request" representing the 2269// client's request for the TagResource operation. The "output" return 2270// value will be populated with the request's response once the request completes 2271// successfully. 2272// 2273// Use "Send" method on the returned Request to send the API call to the service. 2274// the "output" return value is not valid until after Send returns without error. 2275// 2276// See TagResource for more information on using the TagResource 2277// API call, and error handling. 2278// 2279// This method is useful when you want to inject custom logic or configuration 2280// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2281// 2282// 2283// // Example sending a request using the TagResourceRequest method. 2284// req, resp := client.TagResourceRequest(params) 2285// 2286// err := req.Send() 2287// if err == nil { // resp is now filled 2288// fmt.Println(resp) 2289// } 2290// 2291// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource 2292func (c *DataSync) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 2293 op := &request.Operation{ 2294 Name: opTagResource, 2295 HTTPMethod: "POST", 2296 HTTPPath: "/", 2297 } 2298 2299 if input == nil { 2300 input = &TagResourceInput{} 2301 } 2302 2303 output = &TagResourceOutput{} 2304 req = c.newRequest(op, input, output) 2305 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2306 return 2307} 2308 2309// TagResource API operation for AWS DataSync. 2310// 2311// Applies a key-value pair to an AWS resource. 2312// 2313// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2314// with awserr.Error's Code and Message methods to get detailed information about 2315// the error. 2316// 2317// See the AWS API reference guide for AWS DataSync's 2318// API operation TagResource for usage and error information. 2319// 2320// Returned Error Codes: 2321// * ErrCodeInvalidRequestException "InvalidRequestException" 2322// This exception is thrown when the client submits a malformed request. 2323// 2324// * ErrCodeInternalException "InternalException" 2325// This exception is thrown when an error occurs in the AWS DataSync service. 2326// 2327// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource 2328func (c *DataSync) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 2329 req, out := c.TagResourceRequest(input) 2330 return out, req.Send() 2331} 2332 2333// TagResourceWithContext is the same as TagResource with the addition of 2334// the ability to pass a context and additional request options. 2335// 2336// See TagResource for details on how to use this API operation. 2337// 2338// The context must be non-nil and will be used for request cancellation. If 2339// the context is nil a panic will occur. In the future the SDK may create 2340// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2341// for more information on using Contexts. 2342func (c *DataSync) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 2343 req, out := c.TagResourceRequest(input) 2344 req.SetContext(ctx) 2345 req.ApplyOptions(opts...) 2346 return out, req.Send() 2347} 2348 2349const opUntagResource = "UntagResource" 2350 2351// UntagResourceRequest generates a "aws/request.Request" representing the 2352// client's request for the UntagResource operation. The "output" return 2353// value will be populated with the request's response once the request completes 2354// successfully. 2355// 2356// Use "Send" method on the returned Request to send the API call to the service. 2357// the "output" return value is not valid until after Send returns without error. 2358// 2359// See UntagResource for more information on using the UntagResource 2360// API call, and error handling. 2361// 2362// This method is useful when you want to inject custom logic or configuration 2363// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2364// 2365// 2366// // Example sending a request using the UntagResourceRequest method. 2367// req, resp := client.UntagResourceRequest(params) 2368// 2369// err := req.Send() 2370// if err == nil { // resp is now filled 2371// fmt.Println(resp) 2372// } 2373// 2374// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource 2375func (c *DataSync) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2376 op := &request.Operation{ 2377 Name: opUntagResource, 2378 HTTPMethod: "POST", 2379 HTTPPath: "/", 2380 } 2381 2382 if input == nil { 2383 input = &UntagResourceInput{} 2384 } 2385 2386 output = &UntagResourceOutput{} 2387 req = c.newRequest(op, input, output) 2388 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2389 return 2390} 2391 2392// UntagResource API operation for AWS DataSync. 2393// 2394// Removes a tag from an AWS resource. 2395// 2396// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2397// with awserr.Error's Code and Message methods to get detailed information about 2398// the error. 2399// 2400// See the AWS API reference guide for AWS DataSync's 2401// API operation UntagResource for usage and error information. 2402// 2403// Returned Error Codes: 2404// * ErrCodeInvalidRequestException "InvalidRequestException" 2405// This exception is thrown when the client submits a malformed request. 2406// 2407// * ErrCodeInternalException "InternalException" 2408// This exception is thrown when an error occurs in the AWS DataSync service. 2409// 2410// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource 2411func (c *DataSync) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2412 req, out := c.UntagResourceRequest(input) 2413 return out, req.Send() 2414} 2415 2416// UntagResourceWithContext is the same as UntagResource with the addition of 2417// the ability to pass a context and additional request options. 2418// 2419// See UntagResource for details on how to use this API operation. 2420// 2421// The context must be non-nil and will be used for request cancellation. If 2422// the context is nil a panic will occur. In the future the SDK may create 2423// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2424// for more information on using Contexts. 2425func (c *DataSync) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2426 req, out := c.UntagResourceRequest(input) 2427 req.SetContext(ctx) 2428 req.ApplyOptions(opts...) 2429 return out, req.Send() 2430} 2431 2432const opUpdateAgent = "UpdateAgent" 2433 2434// UpdateAgentRequest generates a "aws/request.Request" representing the 2435// client's request for the UpdateAgent operation. The "output" return 2436// value will be populated with the request's response once the request completes 2437// successfully. 2438// 2439// Use "Send" method on the returned Request to send the API call to the service. 2440// the "output" return value is not valid until after Send returns without error. 2441// 2442// See UpdateAgent for more information on using the UpdateAgent 2443// API call, and error handling. 2444// 2445// This method is useful when you want to inject custom logic or configuration 2446// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2447// 2448// 2449// // Example sending a request using the UpdateAgentRequest method. 2450// req, resp := client.UpdateAgentRequest(params) 2451// 2452// err := req.Send() 2453// if err == nil { // resp is now filled 2454// fmt.Println(resp) 2455// } 2456// 2457// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent 2458func (c *DataSync) UpdateAgentRequest(input *UpdateAgentInput) (req *request.Request, output *UpdateAgentOutput) { 2459 op := &request.Operation{ 2460 Name: opUpdateAgent, 2461 HTTPMethod: "POST", 2462 HTTPPath: "/", 2463 } 2464 2465 if input == nil { 2466 input = &UpdateAgentInput{} 2467 } 2468 2469 output = &UpdateAgentOutput{} 2470 req = c.newRequest(op, input, output) 2471 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2472 return 2473} 2474 2475// UpdateAgent API operation for AWS DataSync. 2476// 2477// Updates the name of an agent. 2478// 2479// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2480// with awserr.Error's Code and Message methods to get detailed information about 2481// the error. 2482// 2483// See the AWS API reference guide for AWS DataSync's 2484// API operation UpdateAgent for usage and error information. 2485// 2486// Returned Error Codes: 2487// * ErrCodeInvalidRequestException "InvalidRequestException" 2488// This exception is thrown when the client submits a malformed request. 2489// 2490// * ErrCodeInternalException "InternalException" 2491// This exception is thrown when an error occurs in the AWS DataSync service. 2492// 2493// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent 2494func (c *DataSync) UpdateAgent(input *UpdateAgentInput) (*UpdateAgentOutput, error) { 2495 req, out := c.UpdateAgentRequest(input) 2496 return out, req.Send() 2497} 2498 2499// UpdateAgentWithContext is the same as UpdateAgent with the addition of 2500// the ability to pass a context and additional request options. 2501// 2502// See UpdateAgent for details on how to use this API operation. 2503// 2504// The context must be non-nil and will be used for request cancellation. If 2505// the context is nil a panic will occur. In the future the SDK may create 2506// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2507// for more information on using Contexts. 2508func (c *DataSync) UpdateAgentWithContext(ctx aws.Context, input *UpdateAgentInput, opts ...request.Option) (*UpdateAgentOutput, error) { 2509 req, out := c.UpdateAgentRequest(input) 2510 req.SetContext(ctx) 2511 req.ApplyOptions(opts...) 2512 return out, req.Send() 2513} 2514 2515const opUpdateTask = "UpdateTask" 2516 2517// UpdateTaskRequest generates a "aws/request.Request" representing the 2518// client's request for the UpdateTask operation. The "output" return 2519// value will be populated with the request's response once the request completes 2520// successfully. 2521// 2522// Use "Send" method on the returned Request to send the API call to the service. 2523// the "output" return value is not valid until after Send returns without error. 2524// 2525// See UpdateTask for more information on using the UpdateTask 2526// API call, and error handling. 2527// 2528// This method is useful when you want to inject custom logic or configuration 2529// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2530// 2531// 2532// // Example sending a request using the UpdateTaskRequest method. 2533// req, resp := client.UpdateTaskRequest(params) 2534// 2535// err := req.Send() 2536// if err == nil { // resp is now filled 2537// fmt.Println(resp) 2538// } 2539// 2540// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask 2541func (c *DataSync) UpdateTaskRequest(input *UpdateTaskInput) (req *request.Request, output *UpdateTaskOutput) { 2542 op := &request.Operation{ 2543 Name: opUpdateTask, 2544 HTTPMethod: "POST", 2545 HTTPPath: "/", 2546 } 2547 2548 if input == nil { 2549 input = &UpdateTaskInput{} 2550 } 2551 2552 output = &UpdateTaskOutput{} 2553 req = c.newRequest(op, input, output) 2554 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2555 return 2556} 2557 2558// UpdateTask API operation for AWS DataSync. 2559// 2560// Updates the metadata associated with a task. 2561// 2562// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2563// with awserr.Error's Code and Message methods to get detailed information about 2564// the error. 2565// 2566// See the AWS API reference guide for AWS DataSync's 2567// API operation UpdateTask for usage and error information. 2568// 2569// Returned Error Codes: 2570// * ErrCodeInvalidRequestException "InvalidRequestException" 2571// This exception is thrown when the client submits a malformed request. 2572// 2573// * ErrCodeInternalException "InternalException" 2574// This exception is thrown when an error occurs in the AWS DataSync service. 2575// 2576// See also, https://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask 2577func (c *DataSync) UpdateTask(input *UpdateTaskInput) (*UpdateTaskOutput, error) { 2578 req, out := c.UpdateTaskRequest(input) 2579 return out, req.Send() 2580} 2581 2582// UpdateTaskWithContext is the same as UpdateTask with the addition of 2583// the ability to pass a context and additional request options. 2584// 2585// See UpdateTask for details on how to use this API operation. 2586// 2587// The context must be non-nil and will be used for request cancellation. If 2588// the context is nil a panic will occur. In the future the SDK may create 2589// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2590// for more information on using Contexts. 2591func (c *DataSync) UpdateTaskWithContext(ctx aws.Context, input *UpdateTaskInput, opts ...request.Option) (*UpdateTaskOutput, error) { 2592 req, out := c.UpdateTaskRequest(input) 2593 req.SetContext(ctx) 2594 req.ApplyOptions(opts...) 2595 return out, req.Send() 2596} 2597 2598// Represents a single entry in a list of agents. AgentListEntry returns an 2599// array that contains a list of agents when the ListAgents operation is called. 2600type AgentListEntry struct { 2601 _ struct{} `type:"structure"` 2602 2603 // The Amazon Resource Name (ARN) of the agent. 2604 AgentArn *string `type:"string"` 2605 2606 // The name of the agent. 2607 Name *string `min:"1" type:"string"` 2608 2609 // The status of the agent. 2610 Status *string `type:"string" enum:"AgentStatus"` 2611} 2612 2613// String returns the string representation 2614func (s AgentListEntry) String() string { 2615 return awsutil.Prettify(s) 2616} 2617 2618// GoString returns the string representation 2619func (s AgentListEntry) GoString() string { 2620 return s.String() 2621} 2622 2623// SetAgentArn sets the AgentArn field's value. 2624func (s *AgentListEntry) SetAgentArn(v string) *AgentListEntry { 2625 s.AgentArn = &v 2626 return s 2627} 2628 2629// SetName sets the Name field's value. 2630func (s *AgentListEntry) SetName(v string) *AgentListEntry { 2631 s.Name = &v 2632 return s 2633} 2634 2635// SetStatus sets the Status field's value. 2636func (s *AgentListEntry) SetStatus(v string) *AgentListEntry { 2637 s.Status = &v 2638 return s 2639} 2640 2641// CancelTaskExecutionRequest 2642type CancelTaskExecutionInput struct { 2643 _ struct{} `type:"structure"` 2644 2645 // The Amazon Resource Name (ARN) of the task execution to cancel. 2646 // 2647 // TaskExecutionArn is a required field 2648 TaskExecutionArn *string `type:"string" required:"true"` 2649} 2650 2651// String returns the string representation 2652func (s CancelTaskExecutionInput) String() string { 2653 return awsutil.Prettify(s) 2654} 2655 2656// GoString returns the string representation 2657func (s CancelTaskExecutionInput) GoString() string { 2658 return s.String() 2659} 2660 2661// Validate inspects the fields of the type to determine if they are valid. 2662func (s *CancelTaskExecutionInput) Validate() error { 2663 invalidParams := request.ErrInvalidParams{Context: "CancelTaskExecutionInput"} 2664 if s.TaskExecutionArn == nil { 2665 invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn")) 2666 } 2667 2668 if invalidParams.Len() > 0 { 2669 return invalidParams 2670 } 2671 return nil 2672} 2673 2674// SetTaskExecutionArn sets the TaskExecutionArn field's value. 2675func (s *CancelTaskExecutionInput) SetTaskExecutionArn(v string) *CancelTaskExecutionInput { 2676 s.TaskExecutionArn = &v 2677 return s 2678} 2679 2680type CancelTaskExecutionOutput struct { 2681 _ struct{} `type:"structure"` 2682} 2683 2684// String returns the string representation 2685func (s CancelTaskExecutionOutput) String() string { 2686 return awsutil.Prettify(s) 2687} 2688 2689// GoString returns the string representation 2690func (s CancelTaskExecutionOutput) GoString() string { 2691 return s.String() 2692} 2693 2694// CreateAgentRequest 2695type CreateAgentInput struct { 2696 _ struct{} `type:"structure"` 2697 2698 // Your agent activation key. You can get the activation key either by sending 2699 // an HTTP GET request with redirects that enable you to get the agent IP address 2700 // (port 80). Alternatively, you can get it from the AWS DataSync console. 2701 // 2702 // The redirect URL returned in the response provides you the activation key 2703 // for your agent in the query string parameter activationKey. It might also 2704 // include other activation-related parameters; however, these are merely defaults. 2705 // The arguments you pass to this API call determine the actual configuration 2706 // of your agent. 2707 // 2708 // For more information, see Activating an Agent in the AWS DataSync User Guide. 2709 // 2710 // ActivationKey is a required field 2711 ActivationKey *string `type:"string" required:"true"` 2712 2713 // The name you configured for your agent. This value is a text reference that 2714 // is used to identify the agent in the console. 2715 AgentName *string `min:"1" type:"string"` 2716 2717 // The ARNs of the security groups used to protect your data transfer task subnets. 2718 // See CreateAgentRequest$SubnetArns. 2719 SecurityGroupArns []*string `min:"1" type:"list"` 2720 2721 // The Amazon Resource Names (ARNs) of the subnets in which DataSync will create 2722 // Elastic Network Interfaces (ENIs) for each data transfer task. The agent 2723 // that runs a task must be private. When you start a task that is associated 2724 // with an agent created in a VPC, or one that has access to an IP address in 2725 // a VPC, then the task is also private. In this case, DataSync creates four 2726 // ENIs for each task in your subnet. For a data transfer to work, the agent 2727 // must be able to route to all these four ENIs. 2728 SubnetArns []*string `min:"1" type:"list"` 2729 2730 // The key-value pair that represents the tag that you want to associate with 2731 // the agent. The value can be an empty string. This value helps you manage, 2732 // filter, and search for your agents. 2733 // 2734 // Valid characters for key and value are letters, spaces, and numbers representable 2735 // in UTF-8 format, and the following special characters: + - = . _ : / @. 2736 Tags []*TagListEntry `type:"list"` 2737 2738 // The ID of the VPC (Virtual Private Cloud) endpoint that the agent has access 2739 // to. This is the client-side VPC endpoint, also called a PrivateLink. If you 2740 // don't have a PrivateLink VPC endpoint, see Creating a VPC Endpoint Service 2741 // Configuration (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html#create-endpoint-service) 2742 // in the AWS VPC User Guide. 2743 // 2744 // VPC endpoint ID looks like this: vpce-01234d5aff67890e1. 2745 VpcEndpointId *string `type:"string"` 2746} 2747 2748// String returns the string representation 2749func (s CreateAgentInput) String() string { 2750 return awsutil.Prettify(s) 2751} 2752 2753// GoString returns the string representation 2754func (s CreateAgentInput) GoString() string { 2755 return s.String() 2756} 2757 2758// Validate inspects the fields of the type to determine if they are valid. 2759func (s *CreateAgentInput) Validate() error { 2760 invalidParams := request.ErrInvalidParams{Context: "CreateAgentInput"} 2761 if s.ActivationKey == nil { 2762 invalidParams.Add(request.NewErrParamRequired("ActivationKey")) 2763 } 2764 if s.AgentName != nil && len(*s.AgentName) < 1 { 2765 invalidParams.Add(request.NewErrParamMinLen("AgentName", 1)) 2766 } 2767 if s.SecurityGroupArns != nil && len(s.SecurityGroupArns) < 1 { 2768 invalidParams.Add(request.NewErrParamMinLen("SecurityGroupArns", 1)) 2769 } 2770 if s.SubnetArns != nil && len(s.SubnetArns) < 1 { 2771 invalidParams.Add(request.NewErrParamMinLen("SubnetArns", 1)) 2772 } 2773 if s.Tags != nil { 2774 for i, v := range s.Tags { 2775 if v == nil { 2776 continue 2777 } 2778 if err := v.Validate(); err != nil { 2779 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2780 } 2781 } 2782 } 2783 2784 if invalidParams.Len() > 0 { 2785 return invalidParams 2786 } 2787 return nil 2788} 2789 2790// SetActivationKey sets the ActivationKey field's value. 2791func (s *CreateAgentInput) SetActivationKey(v string) *CreateAgentInput { 2792 s.ActivationKey = &v 2793 return s 2794} 2795 2796// SetAgentName sets the AgentName field's value. 2797func (s *CreateAgentInput) SetAgentName(v string) *CreateAgentInput { 2798 s.AgentName = &v 2799 return s 2800} 2801 2802// SetSecurityGroupArns sets the SecurityGroupArns field's value. 2803func (s *CreateAgentInput) SetSecurityGroupArns(v []*string) *CreateAgentInput { 2804 s.SecurityGroupArns = v 2805 return s 2806} 2807 2808// SetSubnetArns sets the SubnetArns field's value. 2809func (s *CreateAgentInput) SetSubnetArns(v []*string) *CreateAgentInput { 2810 s.SubnetArns = v 2811 return s 2812} 2813 2814// SetTags sets the Tags field's value. 2815func (s *CreateAgentInput) SetTags(v []*TagListEntry) *CreateAgentInput { 2816 s.Tags = v 2817 return s 2818} 2819 2820// SetVpcEndpointId sets the VpcEndpointId field's value. 2821func (s *CreateAgentInput) SetVpcEndpointId(v string) *CreateAgentInput { 2822 s.VpcEndpointId = &v 2823 return s 2824} 2825 2826// CreateAgentResponse 2827type CreateAgentOutput struct { 2828 _ struct{} `type:"structure"` 2829 2830 // The Amazon Resource Name (ARN) of the agent. Use the ListAgents operation 2831 // to return a list of agents for your account and AWS Region. 2832 AgentArn *string `type:"string"` 2833} 2834 2835// String returns the string representation 2836func (s CreateAgentOutput) String() string { 2837 return awsutil.Prettify(s) 2838} 2839 2840// GoString returns the string representation 2841func (s CreateAgentOutput) GoString() string { 2842 return s.String() 2843} 2844 2845// SetAgentArn sets the AgentArn field's value. 2846func (s *CreateAgentOutput) SetAgentArn(v string) *CreateAgentOutput { 2847 s.AgentArn = &v 2848 return s 2849} 2850 2851// CreateLocationEfsRequest 2852type CreateLocationEfsInput struct { 2853 _ struct{} `type:"structure"` 2854 2855 // The subnet and security group that the Amazon EFS file system uses. The security 2856 // group that you provide needs to be able to communicate with the security 2857 // group on the mount target in the subnet specified. 2858 // 2859 // The exact relationship between security group M (of the mount target) and 2860 // security group S (which you provide for DataSync to use at this stage) is 2861 // as follows: 2862 // 2863 // * Security group M (which you associate with the mount target) must allow 2864 // inbound access for the Transmission Control Protocol (TCP) on the NFS 2865 // port (2049) from security group S. You can enable inbound connections 2866 // either by IP address (CIDR range) or security group. 2867 // 2868 // * Security group S (provided to DataSync to access EFS) should have a 2869 // rule that enables outbound connections to the NFS port on one of the file 2870 // system’s mount targets. You can enable outbound connections either by 2871 // IP address (CIDR range) or security group. For information about security 2872 // groups and mount targets, see Security Groups for Amazon EC2 Instances 2873 // and Mount Targets in the Amazon EFS User Guide. 2874 // 2875 // Ec2Config is a required field 2876 Ec2Config *Ec2Config `type:"structure" required:"true"` 2877 2878 // The Amazon Resource Name (ARN) for the Amazon EFS file system. 2879 // 2880 // EfsFilesystemArn is a required field 2881 EfsFilesystemArn *string `type:"string" required:"true"` 2882 2883 // A subdirectory in the location’s path. This subdirectory in the EFS file 2884 // system is used to read data from the EFS source location or write data to 2885 // the EFS destination. By default, AWS DataSync uses the root directory. 2886 Subdirectory *string `type:"string"` 2887 2888 // The key-value pair that represents a tag that you want to add to the resource. 2889 // The value can be an empty string. This value helps you manage, filter, and 2890 // search for your resources. We recommend that you create a name tag for your 2891 // location. 2892 Tags []*TagListEntry `type:"list"` 2893} 2894 2895// String returns the string representation 2896func (s CreateLocationEfsInput) String() string { 2897 return awsutil.Prettify(s) 2898} 2899 2900// GoString returns the string representation 2901func (s CreateLocationEfsInput) GoString() string { 2902 return s.String() 2903} 2904 2905// Validate inspects the fields of the type to determine if they are valid. 2906func (s *CreateLocationEfsInput) Validate() error { 2907 invalidParams := request.ErrInvalidParams{Context: "CreateLocationEfsInput"} 2908 if s.Ec2Config == nil { 2909 invalidParams.Add(request.NewErrParamRequired("Ec2Config")) 2910 } 2911 if s.EfsFilesystemArn == nil { 2912 invalidParams.Add(request.NewErrParamRequired("EfsFilesystemArn")) 2913 } 2914 if s.Ec2Config != nil { 2915 if err := s.Ec2Config.Validate(); err != nil { 2916 invalidParams.AddNested("Ec2Config", err.(request.ErrInvalidParams)) 2917 } 2918 } 2919 if s.Tags != nil { 2920 for i, v := range s.Tags { 2921 if v == nil { 2922 continue 2923 } 2924 if err := v.Validate(); err != nil { 2925 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2926 } 2927 } 2928 } 2929 2930 if invalidParams.Len() > 0 { 2931 return invalidParams 2932 } 2933 return nil 2934} 2935 2936// SetEc2Config sets the Ec2Config field's value. 2937func (s *CreateLocationEfsInput) SetEc2Config(v *Ec2Config) *CreateLocationEfsInput { 2938 s.Ec2Config = v 2939 return s 2940} 2941 2942// SetEfsFilesystemArn sets the EfsFilesystemArn field's value. 2943func (s *CreateLocationEfsInput) SetEfsFilesystemArn(v string) *CreateLocationEfsInput { 2944 s.EfsFilesystemArn = &v 2945 return s 2946} 2947 2948// SetSubdirectory sets the Subdirectory field's value. 2949func (s *CreateLocationEfsInput) SetSubdirectory(v string) *CreateLocationEfsInput { 2950 s.Subdirectory = &v 2951 return s 2952} 2953 2954// SetTags sets the Tags field's value. 2955func (s *CreateLocationEfsInput) SetTags(v []*TagListEntry) *CreateLocationEfsInput { 2956 s.Tags = v 2957 return s 2958} 2959 2960// CreateLocationEfs 2961type CreateLocationEfsOutput struct { 2962 _ struct{} `type:"structure"` 2963 2964 // The Amazon Resource Name (ARN) of the Amazon EFS file system location that 2965 // is created. 2966 LocationArn *string `type:"string"` 2967} 2968 2969// String returns the string representation 2970func (s CreateLocationEfsOutput) String() string { 2971 return awsutil.Prettify(s) 2972} 2973 2974// GoString returns the string representation 2975func (s CreateLocationEfsOutput) GoString() string { 2976 return s.String() 2977} 2978 2979// SetLocationArn sets the LocationArn field's value. 2980func (s *CreateLocationEfsOutput) SetLocationArn(v string) *CreateLocationEfsOutput { 2981 s.LocationArn = &v 2982 return s 2983} 2984 2985// CreateLocationNfsRequest 2986type CreateLocationNfsInput struct { 2987 _ struct{} `type:"structure"` 2988 2989 // The NFS mount options that DataSync can use to mount your NFS share. 2990 MountOptions *NfsMountOptions `type:"structure"` 2991 2992 // Contains a list of Amazon Resource Names (ARNs) of agents that are used to 2993 // connect to an NFS server. 2994 // 2995 // OnPremConfig is a required field 2996 OnPremConfig *OnPremConfig `type:"structure" required:"true"` 2997 2998 // The name of the NFS server. This value is the IP address or Domain Name Service 2999 // (DNS) name of the NFS server. An agent that is installed on-premises uses 3000 // this host name to mount the NFS server in a network. 3001 // 3002 // This name must either be DNS-compliant or must be an IP version 4 (IPv4) 3003 // address. 3004 // 3005 // ServerHostname is a required field 3006 ServerHostname *string `type:"string" required:"true"` 3007 3008 // The subdirectory in the NFS file system that is used to read data from the 3009 // NFS source location or write data to the NFS destination. The NFS path should 3010 // be a path that's exported by the NFS server, or a subdirectory of that path. 3011 // The path should be such that it can be mounted by other NFS clients in your 3012 // network. 3013 // 3014 // To see all the paths exported by your NFS server. run "showmount -e nfs-server-name" 3015 // from an NFS client that has access to your server. You can specify any directory 3016 // that appears in the results, and any subdirectory of that directory. Ensure 3017 // that the NFS export is accessible without Kerberos authentication. 3018 // 3019 // To transfer all the data in the folder you specified, DataSync needs to have 3020 // permissions to read all the data. To ensure this, either configure the NFS 3021 // export with no_root_squash, or ensure that the permissions for all of the 3022 // files that you want DataSync allow read access for all users. Doing either 3023 // enables the agent to read the files. For the agent to access directories, 3024 // you must additionally enable all execute access. 3025 // 3026 // For information about NFS export configuration, see 18.7. The /etc/exports 3027 // Configuration File in the Red Hat Enterprise Linux documentation. 3028 // 3029 // Subdirectory is a required field 3030 Subdirectory *string `type:"string" required:"true"` 3031 3032 // The key-value pair that represents the tag that you want to add to the location. 3033 // The value can be an empty string. We recommend using tags to name your resources. 3034 Tags []*TagListEntry `type:"list"` 3035} 3036 3037// String returns the string representation 3038func (s CreateLocationNfsInput) String() string { 3039 return awsutil.Prettify(s) 3040} 3041 3042// GoString returns the string representation 3043func (s CreateLocationNfsInput) GoString() string { 3044 return s.String() 3045} 3046 3047// Validate inspects the fields of the type to determine if they are valid. 3048func (s *CreateLocationNfsInput) Validate() error { 3049 invalidParams := request.ErrInvalidParams{Context: "CreateLocationNfsInput"} 3050 if s.OnPremConfig == nil { 3051 invalidParams.Add(request.NewErrParamRequired("OnPremConfig")) 3052 } 3053 if s.ServerHostname == nil { 3054 invalidParams.Add(request.NewErrParamRequired("ServerHostname")) 3055 } 3056 if s.Subdirectory == nil { 3057 invalidParams.Add(request.NewErrParamRequired("Subdirectory")) 3058 } 3059 if s.OnPremConfig != nil { 3060 if err := s.OnPremConfig.Validate(); err != nil { 3061 invalidParams.AddNested("OnPremConfig", err.(request.ErrInvalidParams)) 3062 } 3063 } 3064 if s.Tags != nil { 3065 for i, v := range s.Tags { 3066 if v == nil { 3067 continue 3068 } 3069 if err := v.Validate(); err != nil { 3070 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3071 } 3072 } 3073 } 3074 3075 if invalidParams.Len() > 0 { 3076 return invalidParams 3077 } 3078 return nil 3079} 3080 3081// SetMountOptions sets the MountOptions field's value. 3082func (s *CreateLocationNfsInput) SetMountOptions(v *NfsMountOptions) *CreateLocationNfsInput { 3083 s.MountOptions = v 3084 return s 3085} 3086 3087// SetOnPremConfig sets the OnPremConfig field's value. 3088func (s *CreateLocationNfsInput) SetOnPremConfig(v *OnPremConfig) *CreateLocationNfsInput { 3089 s.OnPremConfig = v 3090 return s 3091} 3092 3093// SetServerHostname sets the ServerHostname field's value. 3094func (s *CreateLocationNfsInput) SetServerHostname(v string) *CreateLocationNfsInput { 3095 s.ServerHostname = &v 3096 return s 3097} 3098 3099// SetSubdirectory sets the Subdirectory field's value. 3100func (s *CreateLocationNfsInput) SetSubdirectory(v string) *CreateLocationNfsInput { 3101 s.Subdirectory = &v 3102 return s 3103} 3104 3105// SetTags sets the Tags field's value. 3106func (s *CreateLocationNfsInput) SetTags(v []*TagListEntry) *CreateLocationNfsInput { 3107 s.Tags = v 3108 return s 3109} 3110 3111// CreateLocationNfsResponse 3112type CreateLocationNfsOutput struct { 3113 _ struct{} `type:"structure"` 3114 3115 // The Amazon Resource Name (ARN) of the source NFS file system location that 3116 // is created. 3117 LocationArn *string `type:"string"` 3118} 3119 3120// String returns the string representation 3121func (s CreateLocationNfsOutput) String() string { 3122 return awsutil.Prettify(s) 3123} 3124 3125// GoString returns the string representation 3126func (s CreateLocationNfsOutput) GoString() string { 3127 return s.String() 3128} 3129 3130// SetLocationArn sets the LocationArn field's value. 3131func (s *CreateLocationNfsOutput) SetLocationArn(v string) *CreateLocationNfsOutput { 3132 s.LocationArn = &v 3133 return s 3134} 3135 3136// CreateLocationS3Request 3137type CreateLocationS3Input struct { 3138 _ struct{} `type:"structure"` 3139 3140 // The Amazon Resource Name (ARN) of the Amazon S3 bucket. 3141 // 3142 // S3BucketArn is a required field 3143 S3BucketArn *string `type:"string" required:"true"` 3144 3145 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 3146 // (IAM) role that is used to access an Amazon S3 bucket. 3147 // 3148 // For detailed information about using such a role, see Creating a Location 3149 // for Amazon S3 in the AWS DataSync User Guide. 3150 // 3151 // S3Config is a required field 3152 S3Config *S3Config `type:"structure" required:"true"` 3153 3154 // A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is 3155 // used to read data from the S3 source location or write data to the S3 destination. 3156 Subdirectory *string `type:"string"` 3157 3158 // The key-value pair that represents the tag that you want to add to the location. 3159 // The value can be an empty string. We recommend using tags to name your resources. 3160 Tags []*TagListEntry `type:"list"` 3161} 3162 3163// String returns the string representation 3164func (s CreateLocationS3Input) String() string { 3165 return awsutil.Prettify(s) 3166} 3167 3168// GoString returns the string representation 3169func (s CreateLocationS3Input) GoString() string { 3170 return s.String() 3171} 3172 3173// Validate inspects the fields of the type to determine if they are valid. 3174func (s *CreateLocationS3Input) Validate() error { 3175 invalidParams := request.ErrInvalidParams{Context: "CreateLocationS3Input"} 3176 if s.S3BucketArn == nil { 3177 invalidParams.Add(request.NewErrParamRequired("S3BucketArn")) 3178 } 3179 if s.S3Config == nil { 3180 invalidParams.Add(request.NewErrParamRequired("S3Config")) 3181 } 3182 if s.S3Config != nil { 3183 if err := s.S3Config.Validate(); err != nil { 3184 invalidParams.AddNested("S3Config", err.(request.ErrInvalidParams)) 3185 } 3186 } 3187 if s.Tags != nil { 3188 for i, v := range s.Tags { 3189 if v == nil { 3190 continue 3191 } 3192 if err := v.Validate(); err != nil { 3193 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3194 } 3195 } 3196 } 3197 3198 if invalidParams.Len() > 0 { 3199 return invalidParams 3200 } 3201 return nil 3202} 3203 3204// SetS3BucketArn sets the S3BucketArn field's value. 3205func (s *CreateLocationS3Input) SetS3BucketArn(v string) *CreateLocationS3Input { 3206 s.S3BucketArn = &v 3207 return s 3208} 3209 3210// SetS3Config sets the S3Config field's value. 3211func (s *CreateLocationS3Input) SetS3Config(v *S3Config) *CreateLocationS3Input { 3212 s.S3Config = v 3213 return s 3214} 3215 3216// SetSubdirectory sets the Subdirectory field's value. 3217func (s *CreateLocationS3Input) SetSubdirectory(v string) *CreateLocationS3Input { 3218 s.Subdirectory = &v 3219 return s 3220} 3221 3222// SetTags sets the Tags field's value. 3223func (s *CreateLocationS3Input) SetTags(v []*TagListEntry) *CreateLocationS3Input { 3224 s.Tags = v 3225 return s 3226} 3227 3228// CreateLocationS3Response 3229type CreateLocationS3Output struct { 3230 _ struct{} `type:"structure"` 3231 3232 // The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that 3233 // is created. 3234 LocationArn *string `type:"string"` 3235} 3236 3237// String returns the string representation 3238func (s CreateLocationS3Output) String() string { 3239 return awsutil.Prettify(s) 3240} 3241 3242// GoString returns the string representation 3243func (s CreateLocationS3Output) GoString() string { 3244 return s.String() 3245} 3246 3247// SetLocationArn sets the LocationArn field's value. 3248func (s *CreateLocationS3Output) SetLocationArn(v string) *CreateLocationS3Output { 3249 s.LocationArn = &v 3250 return s 3251} 3252 3253// CreateLocationSmbRequest 3254type CreateLocationSmbInput struct { 3255 _ struct{} `type:"structure"` 3256 3257 // The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block 3258 // (SMB) location. 3259 // 3260 // AgentArns is a required field 3261 AgentArns []*string `min:"1" type:"list" required:"true"` 3262 3263 // The name of the domain that the SMB server belongs to. 3264 Domain *string `type:"string"` 3265 3266 // The mount options that are available for DataSync to use to access an SMB 3267 // location. 3268 MountOptions *SmbMountOptions `type:"structure"` 3269 3270 // The password of the user who has permission to access the SMB server. 3271 // 3272 // Password is a required field 3273 Password *string `type:"string" required:"true"` 3274 3275 // The name of the SMB server. This value is the IP address or Domain Name Service 3276 // (DNS) name of the SMB server. An agent that is installed on-premises uses 3277 // this host name to mount the SMB server in a network. 3278 // 3279 // This name must either be DNS-compliant or must be an IP version 4 (IPv4) 3280 // address. 3281 // 3282 // ServerHostname is a required field 3283 ServerHostname *string `type:"string" required:"true"` 3284 3285 // The subdirectory in the SMB file system that is used to read data from the 3286 // SMB source location or write data to the SMB destination. The SMB path should 3287 // be a path that's exported by the SMB server, or a subdirectory of that path. 3288 // The path should be such that it can be mounted by other SMB clients in your 3289 // network. 3290 // 3291 // To transfer all the data in the folder you specified, DataSync needs to have 3292 // permissions to mount the SMB share, as well as to access all the data in 3293 // that share. To ensure this, either ensure that the user/password specified 3294 // belongs to the user who can mount the share, and who has the appropriate 3295 // permissions for all of the files and directories that you want DataSync to 3296 // access, or use credentials of a member of the Backup Operators group to mount 3297 // the share. Doing either enables the agent to access the data. For the agent 3298 // to access directories, you must additionally enable all execute access. 3299 // 3300 // Subdirectory is a required field 3301 Subdirectory *string `type:"string" required:"true"` 3302 3303 // The key-value pair that represents the tag that you want to add to the location. 3304 // The value can be an empty string. We recommend using tags to name your resources. 3305 Tags []*TagListEntry `type:"list"` 3306 3307 // The user who can mount the share, has the permissions to access files and 3308 // directories in the SMB share. 3309 // 3310 // User is a required field 3311 User *string `type:"string" required:"true"` 3312} 3313 3314// String returns the string representation 3315func (s CreateLocationSmbInput) String() string { 3316 return awsutil.Prettify(s) 3317} 3318 3319// GoString returns the string representation 3320func (s CreateLocationSmbInput) GoString() string { 3321 return s.String() 3322} 3323 3324// Validate inspects the fields of the type to determine if they are valid. 3325func (s *CreateLocationSmbInput) Validate() error { 3326 invalidParams := request.ErrInvalidParams{Context: "CreateLocationSmbInput"} 3327 if s.AgentArns == nil { 3328 invalidParams.Add(request.NewErrParamRequired("AgentArns")) 3329 } 3330 if s.AgentArns != nil && len(s.AgentArns) < 1 { 3331 invalidParams.Add(request.NewErrParamMinLen("AgentArns", 1)) 3332 } 3333 if s.Password == nil { 3334 invalidParams.Add(request.NewErrParamRequired("Password")) 3335 } 3336 if s.ServerHostname == nil { 3337 invalidParams.Add(request.NewErrParamRequired("ServerHostname")) 3338 } 3339 if s.Subdirectory == nil { 3340 invalidParams.Add(request.NewErrParamRequired("Subdirectory")) 3341 } 3342 if s.User == nil { 3343 invalidParams.Add(request.NewErrParamRequired("User")) 3344 } 3345 if s.Tags != nil { 3346 for i, v := range s.Tags { 3347 if v == nil { 3348 continue 3349 } 3350 if err := v.Validate(); err != nil { 3351 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3352 } 3353 } 3354 } 3355 3356 if invalidParams.Len() > 0 { 3357 return invalidParams 3358 } 3359 return nil 3360} 3361 3362// SetAgentArns sets the AgentArns field's value. 3363func (s *CreateLocationSmbInput) SetAgentArns(v []*string) *CreateLocationSmbInput { 3364 s.AgentArns = v 3365 return s 3366} 3367 3368// SetDomain sets the Domain field's value. 3369func (s *CreateLocationSmbInput) SetDomain(v string) *CreateLocationSmbInput { 3370 s.Domain = &v 3371 return s 3372} 3373 3374// SetMountOptions sets the MountOptions field's value. 3375func (s *CreateLocationSmbInput) SetMountOptions(v *SmbMountOptions) *CreateLocationSmbInput { 3376 s.MountOptions = v 3377 return s 3378} 3379 3380// SetPassword sets the Password field's value. 3381func (s *CreateLocationSmbInput) SetPassword(v string) *CreateLocationSmbInput { 3382 s.Password = &v 3383 return s 3384} 3385 3386// SetServerHostname sets the ServerHostname field's value. 3387func (s *CreateLocationSmbInput) SetServerHostname(v string) *CreateLocationSmbInput { 3388 s.ServerHostname = &v 3389 return s 3390} 3391 3392// SetSubdirectory sets the Subdirectory field's value. 3393func (s *CreateLocationSmbInput) SetSubdirectory(v string) *CreateLocationSmbInput { 3394 s.Subdirectory = &v 3395 return s 3396} 3397 3398// SetTags sets the Tags field's value. 3399func (s *CreateLocationSmbInput) SetTags(v []*TagListEntry) *CreateLocationSmbInput { 3400 s.Tags = v 3401 return s 3402} 3403 3404// SetUser sets the User field's value. 3405func (s *CreateLocationSmbInput) SetUser(v string) *CreateLocationSmbInput { 3406 s.User = &v 3407 return s 3408} 3409 3410// CreateLocationSmbResponse 3411type CreateLocationSmbOutput struct { 3412 _ struct{} `type:"structure"` 3413 3414 // The Amazon Resource Name (ARN) of the source SMB file system location that 3415 // is created. 3416 LocationArn *string `type:"string"` 3417} 3418 3419// String returns the string representation 3420func (s CreateLocationSmbOutput) String() string { 3421 return awsutil.Prettify(s) 3422} 3423 3424// GoString returns the string representation 3425func (s CreateLocationSmbOutput) GoString() string { 3426 return s.String() 3427} 3428 3429// SetLocationArn sets the LocationArn field's value. 3430func (s *CreateLocationSmbOutput) SetLocationArn(v string) *CreateLocationSmbOutput { 3431 s.LocationArn = &v 3432 return s 3433} 3434 3435// CreateTaskRequest 3436type CreateTaskInput struct { 3437 _ struct{} `type:"structure"` 3438 3439 // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is 3440 // used to monitor and log events in the task. 3441 // 3442 // For more information on these groups, see Working with Log Groups and Log 3443 // Streams in the Amazon CloudWatch User Guide. 3444 // 3445 // For more information about how to use CloudWatch Logs with DataSync, see 3446 // Monitoring Your Task in the AWS DataSync User Guide. 3447 CloudWatchLogGroupArn *string `type:"string"` 3448 3449 // The Amazon Resource Name (ARN) of an AWS storage resource's location. 3450 // 3451 // DestinationLocationArn is a required field 3452 DestinationLocationArn *string `type:"string" required:"true"` 3453 3454 // A list of filter rules that determines which files to exclude from a task. 3455 // The list should contain a single filter string that consists of the patterns 3456 // to exclude. The patterns are delimited by "|" (that is, a pipe), for example, 3457 // "/folder1|/folder2" 3458 Excludes []*FilterRule `type:"list"` 3459 3460 // The name of a task. This value is a text reference that is used to identify 3461 // the task in the console. 3462 Name *string `min:"1" type:"string"` 3463 3464 // The set of configuration options that control the behavior of a single execution 3465 // of the task that occurs when you call StartTaskExecution. You can configure 3466 // these options to preserve metadata such as user ID (UID) and group ID (GID), 3467 // file permissions, data integrity verification, and so on. 3468 // 3469 // For each individual task execution, you can override these options by specifying 3470 // the OverrideOptions before starting a the task execution. For more information, 3471 // see the operation. 3472 Options *Options `type:"structure"` 3473 3474 // The Amazon Resource Name (ARN) of the source location for the task. 3475 // 3476 // SourceLocationArn is a required field 3477 SourceLocationArn *string `type:"string" required:"true"` 3478 3479 // The key-value pair that represents the tag that you want to add to the resource. 3480 // The value can be an empty string. 3481 Tags []*TagListEntry `type:"list"` 3482} 3483 3484// String returns the string representation 3485func (s CreateTaskInput) String() string { 3486 return awsutil.Prettify(s) 3487} 3488 3489// GoString returns the string representation 3490func (s CreateTaskInput) GoString() string { 3491 return s.String() 3492} 3493 3494// Validate inspects the fields of the type to determine if they are valid. 3495func (s *CreateTaskInput) Validate() error { 3496 invalidParams := request.ErrInvalidParams{Context: "CreateTaskInput"} 3497 if s.DestinationLocationArn == nil { 3498 invalidParams.Add(request.NewErrParamRequired("DestinationLocationArn")) 3499 } 3500 if s.Name != nil && len(*s.Name) < 1 { 3501 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3502 } 3503 if s.SourceLocationArn == nil { 3504 invalidParams.Add(request.NewErrParamRequired("SourceLocationArn")) 3505 } 3506 if s.Options != nil { 3507 if err := s.Options.Validate(); err != nil { 3508 invalidParams.AddNested("Options", err.(request.ErrInvalidParams)) 3509 } 3510 } 3511 if s.Tags != nil { 3512 for i, v := range s.Tags { 3513 if v == nil { 3514 continue 3515 } 3516 if err := v.Validate(); err != nil { 3517 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3518 } 3519 } 3520 } 3521 3522 if invalidParams.Len() > 0 { 3523 return invalidParams 3524 } 3525 return nil 3526} 3527 3528// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. 3529func (s *CreateTaskInput) SetCloudWatchLogGroupArn(v string) *CreateTaskInput { 3530 s.CloudWatchLogGroupArn = &v 3531 return s 3532} 3533 3534// SetDestinationLocationArn sets the DestinationLocationArn field's value. 3535func (s *CreateTaskInput) SetDestinationLocationArn(v string) *CreateTaskInput { 3536 s.DestinationLocationArn = &v 3537 return s 3538} 3539 3540// SetExcludes sets the Excludes field's value. 3541func (s *CreateTaskInput) SetExcludes(v []*FilterRule) *CreateTaskInput { 3542 s.Excludes = v 3543 return s 3544} 3545 3546// SetName sets the Name field's value. 3547func (s *CreateTaskInput) SetName(v string) *CreateTaskInput { 3548 s.Name = &v 3549 return s 3550} 3551 3552// SetOptions sets the Options field's value. 3553func (s *CreateTaskInput) SetOptions(v *Options) *CreateTaskInput { 3554 s.Options = v 3555 return s 3556} 3557 3558// SetSourceLocationArn sets the SourceLocationArn field's value. 3559func (s *CreateTaskInput) SetSourceLocationArn(v string) *CreateTaskInput { 3560 s.SourceLocationArn = &v 3561 return s 3562} 3563 3564// SetTags sets the Tags field's value. 3565func (s *CreateTaskInput) SetTags(v []*TagListEntry) *CreateTaskInput { 3566 s.Tags = v 3567 return s 3568} 3569 3570// CreateTaskResponse 3571type CreateTaskOutput struct { 3572 _ struct{} `type:"structure"` 3573 3574 // The Amazon Resource Name (ARN) of the task. 3575 TaskArn *string `type:"string"` 3576} 3577 3578// String returns the string representation 3579func (s CreateTaskOutput) String() string { 3580 return awsutil.Prettify(s) 3581} 3582 3583// GoString returns the string representation 3584func (s CreateTaskOutput) GoString() string { 3585 return s.String() 3586} 3587 3588// SetTaskArn sets the TaskArn field's value. 3589func (s *CreateTaskOutput) SetTaskArn(v string) *CreateTaskOutput { 3590 s.TaskArn = &v 3591 return s 3592} 3593 3594// DeleteAgentRequest 3595type DeleteAgentInput struct { 3596 _ struct{} `type:"structure"` 3597 3598 // The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents 3599 // operation to return a list of agents for your account and AWS Region. 3600 // 3601 // AgentArn is a required field 3602 AgentArn *string `type:"string" required:"true"` 3603} 3604 3605// String returns the string representation 3606func (s DeleteAgentInput) String() string { 3607 return awsutil.Prettify(s) 3608} 3609 3610// GoString returns the string representation 3611func (s DeleteAgentInput) GoString() string { 3612 return s.String() 3613} 3614 3615// Validate inspects the fields of the type to determine if they are valid. 3616func (s *DeleteAgentInput) Validate() error { 3617 invalidParams := request.ErrInvalidParams{Context: "DeleteAgentInput"} 3618 if s.AgentArn == nil { 3619 invalidParams.Add(request.NewErrParamRequired("AgentArn")) 3620 } 3621 3622 if invalidParams.Len() > 0 { 3623 return invalidParams 3624 } 3625 return nil 3626} 3627 3628// SetAgentArn sets the AgentArn field's value. 3629func (s *DeleteAgentInput) SetAgentArn(v string) *DeleteAgentInput { 3630 s.AgentArn = &v 3631 return s 3632} 3633 3634type DeleteAgentOutput struct { 3635 _ struct{} `type:"structure"` 3636} 3637 3638// String returns the string representation 3639func (s DeleteAgentOutput) String() string { 3640 return awsutil.Prettify(s) 3641} 3642 3643// GoString returns the string representation 3644func (s DeleteAgentOutput) GoString() string { 3645 return s.String() 3646} 3647 3648// DeleteLocation 3649type DeleteLocationInput struct { 3650 _ struct{} `type:"structure"` 3651 3652 // The Amazon Resource Name (ARN) of the location to delete. 3653 // 3654 // LocationArn is a required field 3655 LocationArn *string `type:"string" required:"true"` 3656} 3657 3658// String returns the string representation 3659func (s DeleteLocationInput) String() string { 3660 return awsutil.Prettify(s) 3661} 3662 3663// GoString returns the string representation 3664func (s DeleteLocationInput) GoString() string { 3665 return s.String() 3666} 3667 3668// Validate inspects the fields of the type to determine if they are valid. 3669func (s *DeleteLocationInput) Validate() error { 3670 invalidParams := request.ErrInvalidParams{Context: "DeleteLocationInput"} 3671 if s.LocationArn == nil { 3672 invalidParams.Add(request.NewErrParamRequired("LocationArn")) 3673 } 3674 3675 if invalidParams.Len() > 0 { 3676 return invalidParams 3677 } 3678 return nil 3679} 3680 3681// SetLocationArn sets the LocationArn field's value. 3682func (s *DeleteLocationInput) SetLocationArn(v string) *DeleteLocationInput { 3683 s.LocationArn = &v 3684 return s 3685} 3686 3687type DeleteLocationOutput struct { 3688 _ struct{} `type:"structure"` 3689} 3690 3691// String returns the string representation 3692func (s DeleteLocationOutput) String() string { 3693 return awsutil.Prettify(s) 3694} 3695 3696// GoString returns the string representation 3697func (s DeleteLocationOutput) GoString() string { 3698 return s.String() 3699} 3700 3701// DeleteTask 3702type DeleteTaskInput struct { 3703 _ struct{} `type:"structure"` 3704 3705 // The Amazon Resource Name (ARN) of the task to delete. 3706 // 3707 // TaskArn is a required field 3708 TaskArn *string `type:"string" required:"true"` 3709} 3710 3711// String returns the string representation 3712func (s DeleteTaskInput) String() string { 3713 return awsutil.Prettify(s) 3714} 3715 3716// GoString returns the string representation 3717func (s DeleteTaskInput) GoString() string { 3718 return s.String() 3719} 3720 3721// Validate inspects the fields of the type to determine if they are valid. 3722func (s *DeleteTaskInput) Validate() error { 3723 invalidParams := request.ErrInvalidParams{Context: "DeleteTaskInput"} 3724 if s.TaskArn == nil { 3725 invalidParams.Add(request.NewErrParamRequired("TaskArn")) 3726 } 3727 3728 if invalidParams.Len() > 0 { 3729 return invalidParams 3730 } 3731 return nil 3732} 3733 3734// SetTaskArn sets the TaskArn field's value. 3735func (s *DeleteTaskInput) SetTaskArn(v string) *DeleteTaskInput { 3736 s.TaskArn = &v 3737 return s 3738} 3739 3740type DeleteTaskOutput struct { 3741 _ struct{} `type:"structure"` 3742} 3743 3744// String returns the string representation 3745func (s DeleteTaskOutput) String() string { 3746 return awsutil.Prettify(s) 3747} 3748 3749// GoString returns the string representation 3750func (s DeleteTaskOutput) GoString() string { 3751 return s.String() 3752} 3753 3754// DescribeAgent 3755type DescribeAgentInput struct { 3756 _ struct{} `type:"structure"` 3757 3758 // The Amazon Resource Name (ARN) of the agent to describe. 3759 // 3760 // AgentArn is a required field 3761 AgentArn *string `type:"string" required:"true"` 3762} 3763 3764// String returns the string representation 3765func (s DescribeAgentInput) String() string { 3766 return awsutil.Prettify(s) 3767} 3768 3769// GoString returns the string representation 3770func (s DescribeAgentInput) GoString() string { 3771 return s.String() 3772} 3773 3774// Validate inspects the fields of the type to determine if they are valid. 3775func (s *DescribeAgentInput) Validate() error { 3776 invalidParams := request.ErrInvalidParams{Context: "DescribeAgentInput"} 3777 if s.AgentArn == nil { 3778 invalidParams.Add(request.NewErrParamRequired("AgentArn")) 3779 } 3780 3781 if invalidParams.Len() > 0 { 3782 return invalidParams 3783 } 3784 return nil 3785} 3786 3787// SetAgentArn sets the AgentArn field's value. 3788func (s *DescribeAgentInput) SetAgentArn(v string) *DescribeAgentInput { 3789 s.AgentArn = &v 3790 return s 3791} 3792 3793// DescribeAgentResponse 3794type DescribeAgentOutput struct { 3795 _ struct{} `type:"structure"` 3796 3797 // The Amazon Resource Name (ARN) of the agent. 3798 AgentArn *string `type:"string"` 3799 3800 // The time that the agent was activated (that is, created in your account). 3801 CreationTime *time.Time `type:"timestamp"` 3802 3803 // The type of endpoint that your agent is connected to. If the endpoint is 3804 // a VPC endpoint, the agent is not accessible over the public Internet. 3805 EndpointType *string `type:"string" enum:"EndpointType"` 3806 3807 // The time that the agent last connected to DataSyc. 3808 LastConnectionTime *time.Time `type:"timestamp"` 3809 3810 // The name of the agent. 3811 Name *string `min:"1" type:"string"` 3812 3813 // The VPC endpoint, subnet and security group that an agent uses to access 3814 // IP addresses in a VPC (Virtual Private Cloud). 3815 PrivateLinkConfig *PrivateLinkConfig `type:"structure"` 3816 3817 // The status of the agent. If the status is ONLINE, then the agent is configured 3818 // properly and is available to use. The Running status is the normal running 3819 // status for an agent. If the status is OFFLINE, the agent's VM is turned off 3820 // or the agent is in an unhealthy state. When the issue that caused the unhealthy 3821 // state is resolved, the agent returns to ONLINE status. 3822 Status *string `type:"string" enum:"AgentStatus"` 3823} 3824 3825// String returns the string representation 3826func (s DescribeAgentOutput) String() string { 3827 return awsutil.Prettify(s) 3828} 3829 3830// GoString returns the string representation 3831func (s DescribeAgentOutput) GoString() string { 3832 return s.String() 3833} 3834 3835// SetAgentArn sets the AgentArn field's value. 3836func (s *DescribeAgentOutput) SetAgentArn(v string) *DescribeAgentOutput { 3837 s.AgentArn = &v 3838 return s 3839} 3840 3841// SetCreationTime sets the CreationTime field's value. 3842func (s *DescribeAgentOutput) SetCreationTime(v time.Time) *DescribeAgentOutput { 3843 s.CreationTime = &v 3844 return s 3845} 3846 3847// SetEndpointType sets the EndpointType field's value. 3848func (s *DescribeAgentOutput) SetEndpointType(v string) *DescribeAgentOutput { 3849 s.EndpointType = &v 3850 return s 3851} 3852 3853// SetLastConnectionTime sets the LastConnectionTime field's value. 3854func (s *DescribeAgentOutput) SetLastConnectionTime(v time.Time) *DescribeAgentOutput { 3855 s.LastConnectionTime = &v 3856 return s 3857} 3858 3859// SetName sets the Name field's value. 3860func (s *DescribeAgentOutput) SetName(v string) *DescribeAgentOutput { 3861 s.Name = &v 3862 return s 3863} 3864 3865// SetPrivateLinkConfig sets the PrivateLinkConfig field's value. 3866func (s *DescribeAgentOutput) SetPrivateLinkConfig(v *PrivateLinkConfig) *DescribeAgentOutput { 3867 s.PrivateLinkConfig = v 3868 return s 3869} 3870 3871// SetStatus sets the Status field's value. 3872func (s *DescribeAgentOutput) SetStatus(v string) *DescribeAgentOutput { 3873 s.Status = &v 3874 return s 3875} 3876 3877// DescribeLocationEfsRequest 3878type DescribeLocationEfsInput struct { 3879 _ struct{} `type:"structure"` 3880 3881 // The Amazon Resource Name (ARN) of the EFS location to describe. 3882 // 3883 // LocationArn is a required field 3884 LocationArn *string `type:"string" required:"true"` 3885} 3886 3887// String returns the string representation 3888func (s DescribeLocationEfsInput) String() string { 3889 return awsutil.Prettify(s) 3890} 3891 3892// GoString returns the string representation 3893func (s DescribeLocationEfsInput) GoString() string { 3894 return s.String() 3895} 3896 3897// Validate inspects the fields of the type to determine if they are valid. 3898func (s *DescribeLocationEfsInput) Validate() error { 3899 invalidParams := request.ErrInvalidParams{Context: "DescribeLocationEfsInput"} 3900 if s.LocationArn == nil { 3901 invalidParams.Add(request.NewErrParamRequired("LocationArn")) 3902 } 3903 3904 if invalidParams.Len() > 0 { 3905 return invalidParams 3906 } 3907 return nil 3908} 3909 3910// SetLocationArn sets the LocationArn field's value. 3911func (s *DescribeLocationEfsInput) SetLocationArn(v string) *DescribeLocationEfsInput { 3912 s.LocationArn = &v 3913 return s 3914} 3915 3916// DescribeLocationEfsResponse 3917type DescribeLocationEfsOutput struct { 3918 _ struct{} `type:"structure"` 3919 3920 // The time that the EFS location was created. 3921 CreationTime *time.Time `type:"timestamp"` 3922 3923 // The subnet and the security group that DataSync uses to access target EFS 3924 // file system. The subnet must have at least one mount target for that file 3925 // system. The security group that you provide needs to be able to communicate 3926 // with the security group on the mount target in the subnet specified. 3927 Ec2Config *Ec2Config `type:"structure"` 3928 3929 // The Amazon resource Name (ARN) of the EFS location that was described. 3930 LocationArn *string `type:"string"` 3931 3932 // The URL of the EFS location that was described. 3933 LocationUri *string `type:"string"` 3934} 3935 3936// String returns the string representation 3937func (s DescribeLocationEfsOutput) String() string { 3938 return awsutil.Prettify(s) 3939} 3940 3941// GoString returns the string representation 3942func (s DescribeLocationEfsOutput) GoString() string { 3943 return s.String() 3944} 3945 3946// SetCreationTime sets the CreationTime field's value. 3947func (s *DescribeLocationEfsOutput) SetCreationTime(v time.Time) *DescribeLocationEfsOutput { 3948 s.CreationTime = &v 3949 return s 3950} 3951 3952// SetEc2Config sets the Ec2Config field's value. 3953func (s *DescribeLocationEfsOutput) SetEc2Config(v *Ec2Config) *DescribeLocationEfsOutput { 3954 s.Ec2Config = v 3955 return s 3956} 3957 3958// SetLocationArn sets the LocationArn field's value. 3959func (s *DescribeLocationEfsOutput) SetLocationArn(v string) *DescribeLocationEfsOutput { 3960 s.LocationArn = &v 3961 return s 3962} 3963 3964// SetLocationUri sets the LocationUri field's value. 3965func (s *DescribeLocationEfsOutput) SetLocationUri(v string) *DescribeLocationEfsOutput { 3966 s.LocationUri = &v 3967 return s 3968} 3969 3970// DescribeLocationNfsRequest 3971type DescribeLocationNfsInput struct { 3972 _ struct{} `type:"structure"` 3973 3974 // The Amazon resource Name (ARN) of the NFS location to describe. 3975 // 3976 // LocationArn is a required field 3977 LocationArn *string `type:"string" required:"true"` 3978} 3979 3980// String returns the string representation 3981func (s DescribeLocationNfsInput) String() string { 3982 return awsutil.Prettify(s) 3983} 3984 3985// GoString returns the string representation 3986func (s DescribeLocationNfsInput) GoString() string { 3987 return s.String() 3988} 3989 3990// Validate inspects the fields of the type to determine if they are valid. 3991func (s *DescribeLocationNfsInput) Validate() error { 3992 invalidParams := request.ErrInvalidParams{Context: "DescribeLocationNfsInput"} 3993 if s.LocationArn == nil { 3994 invalidParams.Add(request.NewErrParamRequired("LocationArn")) 3995 } 3996 3997 if invalidParams.Len() > 0 { 3998 return invalidParams 3999 } 4000 return nil 4001} 4002 4003// SetLocationArn sets the LocationArn field's value. 4004func (s *DescribeLocationNfsInput) SetLocationArn(v string) *DescribeLocationNfsInput { 4005 s.LocationArn = &v 4006 return s 4007} 4008 4009// DescribeLocationNfsResponse 4010type DescribeLocationNfsOutput struct { 4011 _ struct{} `type:"structure"` 4012 4013 // The time that the NFS location was created. 4014 CreationTime *time.Time `type:"timestamp"` 4015 4016 // The Amazon resource Name (ARN) of the NFS location that was described. 4017 LocationArn *string `type:"string"` 4018 4019 // The URL of the source NFS location that was described. 4020 LocationUri *string `type:"string"` 4021 4022 // The NFS mount options that DataSync used to mount your NFS share. 4023 MountOptions *NfsMountOptions `type:"structure"` 4024 4025 // A list of Amazon Resource Names (ARNs) of agents to use for a Network File 4026 // System (NFS) location. 4027 OnPremConfig *OnPremConfig `type:"structure"` 4028} 4029 4030// String returns the string representation 4031func (s DescribeLocationNfsOutput) String() string { 4032 return awsutil.Prettify(s) 4033} 4034 4035// GoString returns the string representation 4036func (s DescribeLocationNfsOutput) GoString() string { 4037 return s.String() 4038} 4039 4040// SetCreationTime sets the CreationTime field's value. 4041func (s *DescribeLocationNfsOutput) SetCreationTime(v time.Time) *DescribeLocationNfsOutput { 4042 s.CreationTime = &v 4043 return s 4044} 4045 4046// SetLocationArn sets the LocationArn field's value. 4047func (s *DescribeLocationNfsOutput) SetLocationArn(v string) *DescribeLocationNfsOutput { 4048 s.LocationArn = &v 4049 return s 4050} 4051 4052// SetLocationUri sets the LocationUri field's value. 4053func (s *DescribeLocationNfsOutput) SetLocationUri(v string) *DescribeLocationNfsOutput { 4054 s.LocationUri = &v 4055 return s 4056} 4057 4058// SetMountOptions sets the MountOptions field's value. 4059func (s *DescribeLocationNfsOutput) SetMountOptions(v *NfsMountOptions) *DescribeLocationNfsOutput { 4060 s.MountOptions = v 4061 return s 4062} 4063 4064// SetOnPremConfig sets the OnPremConfig field's value. 4065func (s *DescribeLocationNfsOutput) SetOnPremConfig(v *OnPremConfig) *DescribeLocationNfsOutput { 4066 s.OnPremConfig = v 4067 return s 4068} 4069 4070// DescribeLocationS3Request 4071type DescribeLocationS3Input struct { 4072 _ struct{} `type:"structure"` 4073 4074 // The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe. 4075 // 4076 // LocationArn is a required field 4077 LocationArn *string `type:"string" required:"true"` 4078} 4079 4080// String returns the string representation 4081func (s DescribeLocationS3Input) String() string { 4082 return awsutil.Prettify(s) 4083} 4084 4085// GoString returns the string representation 4086func (s DescribeLocationS3Input) GoString() string { 4087 return s.String() 4088} 4089 4090// Validate inspects the fields of the type to determine if they are valid. 4091func (s *DescribeLocationS3Input) Validate() error { 4092 invalidParams := request.ErrInvalidParams{Context: "DescribeLocationS3Input"} 4093 if s.LocationArn == nil { 4094 invalidParams.Add(request.NewErrParamRequired("LocationArn")) 4095 } 4096 4097 if invalidParams.Len() > 0 { 4098 return invalidParams 4099 } 4100 return nil 4101} 4102 4103// SetLocationArn sets the LocationArn field's value. 4104func (s *DescribeLocationS3Input) SetLocationArn(v string) *DescribeLocationS3Input { 4105 s.LocationArn = &v 4106 return s 4107} 4108 4109// DescribeLocationS3Response 4110type DescribeLocationS3Output struct { 4111 _ struct{} `type:"structure"` 4112 4113 // The time that the Amazon S3 bucket location was created. 4114 CreationTime *time.Time `type:"timestamp"` 4115 4116 // The Amazon Resource Name (ARN) of the Amazon S3 bucket location. 4117 LocationArn *string `type:"string"` 4118 4119 // The URL of the Amazon S3 location that was described. 4120 LocationUri *string `type:"string"` 4121 4122 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 4123 // (IAM) role that is used to access an Amazon S3 bucket. 4124 // 4125 // For detailed information about using such a role, see Creating a Location 4126 // for Amazon S3 in the AWS DataSync User Guide. 4127 S3Config *S3Config `type:"structure"` 4128} 4129 4130// String returns the string representation 4131func (s DescribeLocationS3Output) String() string { 4132 return awsutil.Prettify(s) 4133} 4134 4135// GoString returns the string representation 4136func (s DescribeLocationS3Output) GoString() string { 4137 return s.String() 4138} 4139 4140// SetCreationTime sets the CreationTime field's value. 4141func (s *DescribeLocationS3Output) SetCreationTime(v time.Time) *DescribeLocationS3Output { 4142 s.CreationTime = &v 4143 return s 4144} 4145 4146// SetLocationArn sets the LocationArn field's value. 4147func (s *DescribeLocationS3Output) SetLocationArn(v string) *DescribeLocationS3Output { 4148 s.LocationArn = &v 4149 return s 4150} 4151 4152// SetLocationUri sets the LocationUri field's value. 4153func (s *DescribeLocationS3Output) SetLocationUri(v string) *DescribeLocationS3Output { 4154 s.LocationUri = &v 4155 return s 4156} 4157 4158// SetS3Config sets the S3Config field's value. 4159func (s *DescribeLocationS3Output) SetS3Config(v *S3Config) *DescribeLocationS3Output { 4160 s.S3Config = v 4161 return s 4162} 4163 4164// DescribeLocationSmbRequest 4165type DescribeLocationSmbInput struct { 4166 _ struct{} `type:"structure"` 4167 4168 // The Amazon resource Name (ARN) of the SMB location to describe. 4169 // 4170 // LocationArn is a required field 4171 LocationArn *string `type:"string" required:"true"` 4172} 4173 4174// String returns the string representation 4175func (s DescribeLocationSmbInput) String() string { 4176 return awsutil.Prettify(s) 4177} 4178 4179// GoString returns the string representation 4180func (s DescribeLocationSmbInput) GoString() string { 4181 return s.String() 4182} 4183 4184// Validate inspects the fields of the type to determine if they are valid. 4185func (s *DescribeLocationSmbInput) Validate() error { 4186 invalidParams := request.ErrInvalidParams{Context: "DescribeLocationSmbInput"} 4187 if s.LocationArn == nil { 4188 invalidParams.Add(request.NewErrParamRequired("LocationArn")) 4189 } 4190 4191 if invalidParams.Len() > 0 { 4192 return invalidParams 4193 } 4194 return nil 4195} 4196 4197// SetLocationArn sets the LocationArn field's value. 4198func (s *DescribeLocationSmbInput) SetLocationArn(v string) *DescribeLocationSmbInput { 4199 s.LocationArn = &v 4200 return s 4201} 4202 4203// DescribeLocationSmbResponse 4204type DescribeLocationSmbOutput struct { 4205 _ struct{} `type:"structure"` 4206 4207 // The Amazon Resource Name (ARN) of the source SMB file system location that 4208 // is created. 4209 AgentArns []*string `min:"1" type:"list"` 4210 4211 // The time that the SMB location was created. 4212 CreationTime *time.Time `type:"timestamp"` 4213 4214 // The name of the domain that the SMB server belongs to. 4215 Domain *string `type:"string"` 4216 4217 // The Amazon resource Name (ARN) of the SMB location that was described. 4218 LocationArn *string `type:"string"` 4219 4220 // The URL of the source SBM location that was described. 4221 LocationUri *string `type:"string"` 4222 4223 // The mount options that are available for DataSync to use to access an SMB 4224 // location. 4225 MountOptions *SmbMountOptions `type:"structure"` 4226 4227 // The user who is logged on the SMB server. 4228 User *string `type:"string"` 4229} 4230 4231// String returns the string representation 4232func (s DescribeLocationSmbOutput) String() string { 4233 return awsutil.Prettify(s) 4234} 4235 4236// GoString returns the string representation 4237func (s DescribeLocationSmbOutput) GoString() string { 4238 return s.String() 4239} 4240 4241// SetAgentArns sets the AgentArns field's value. 4242func (s *DescribeLocationSmbOutput) SetAgentArns(v []*string) *DescribeLocationSmbOutput { 4243 s.AgentArns = v 4244 return s 4245} 4246 4247// SetCreationTime sets the CreationTime field's value. 4248func (s *DescribeLocationSmbOutput) SetCreationTime(v time.Time) *DescribeLocationSmbOutput { 4249 s.CreationTime = &v 4250 return s 4251} 4252 4253// SetDomain sets the Domain field's value. 4254func (s *DescribeLocationSmbOutput) SetDomain(v string) *DescribeLocationSmbOutput { 4255 s.Domain = &v 4256 return s 4257} 4258 4259// SetLocationArn sets the LocationArn field's value. 4260func (s *DescribeLocationSmbOutput) SetLocationArn(v string) *DescribeLocationSmbOutput { 4261 s.LocationArn = &v 4262 return s 4263} 4264 4265// SetLocationUri sets the LocationUri field's value. 4266func (s *DescribeLocationSmbOutput) SetLocationUri(v string) *DescribeLocationSmbOutput { 4267 s.LocationUri = &v 4268 return s 4269} 4270 4271// SetMountOptions sets the MountOptions field's value. 4272func (s *DescribeLocationSmbOutput) SetMountOptions(v *SmbMountOptions) *DescribeLocationSmbOutput { 4273 s.MountOptions = v 4274 return s 4275} 4276 4277// SetUser sets the User field's value. 4278func (s *DescribeLocationSmbOutput) SetUser(v string) *DescribeLocationSmbOutput { 4279 s.User = &v 4280 return s 4281} 4282 4283// DescribeTaskExecutionRequest 4284type DescribeTaskExecutionInput struct { 4285 _ struct{} `type:"structure"` 4286 4287 // The Amazon Resource Name (ARN) of the task that is being executed. 4288 // 4289 // TaskExecutionArn is a required field 4290 TaskExecutionArn *string `type:"string" required:"true"` 4291} 4292 4293// String returns the string representation 4294func (s DescribeTaskExecutionInput) String() string { 4295 return awsutil.Prettify(s) 4296} 4297 4298// GoString returns the string representation 4299func (s DescribeTaskExecutionInput) GoString() string { 4300 return s.String() 4301} 4302 4303// Validate inspects the fields of the type to determine if they are valid. 4304func (s *DescribeTaskExecutionInput) Validate() error { 4305 invalidParams := request.ErrInvalidParams{Context: "DescribeTaskExecutionInput"} 4306 if s.TaskExecutionArn == nil { 4307 invalidParams.Add(request.NewErrParamRequired("TaskExecutionArn")) 4308 } 4309 4310 if invalidParams.Len() > 0 { 4311 return invalidParams 4312 } 4313 return nil 4314} 4315 4316// SetTaskExecutionArn sets the TaskExecutionArn field's value. 4317func (s *DescribeTaskExecutionInput) SetTaskExecutionArn(v string) *DescribeTaskExecutionInput { 4318 s.TaskExecutionArn = &v 4319 return s 4320} 4321 4322// DescribeTaskExecutionResponse 4323type DescribeTaskExecutionOutput struct { 4324 _ struct{} `type:"structure"` 4325 4326 // The physical number of bytes transferred over the network. 4327 BytesTransferred *int64 `type:"long"` 4328 4329 // The number of logical bytes written to the destination AWS storage resource. 4330 BytesWritten *int64 `type:"long"` 4331 4332 // The estimated physical number of bytes that is to be transferred over the 4333 // network. 4334 EstimatedBytesToTransfer *int64 `type:"long"` 4335 4336 // The expected number of files that is to be transferred over the network. 4337 // This value is calculated during the PREPARING phase, before the TRANSFERRING 4338 // phase. This value is the expected number of files to be transferred. It's 4339 // calculated based on comparing the content of the source and destination locations 4340 // and finding the delta that needs to be transferred. 4341 EstimatedFilesToTransfer *int64 `type:"long"` 4342 4343 // A list of filter rules that determines which files to exclude from a task. 4344 // The list should contain a single filter string that consists of the patterns 4345 // to exclude. The patterns are delimited by "|" (that is, a pipe), for example: 4346 // "/folder1|/folder2" 4347 Excludes []*FilterRule `type:"list"` 4348 4349 // The actual number of files that was transferred over the network. This value 4350 // is calculated and updated on an ongoing basis during the TRANSFERRING phase. 4351 // It's updated periodically when each file is read from the source and sent 4352 // over the network. 4353 // 4354 // If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer. 4355 // This value can also be greater than EstimatedFilesTransferred in some cases. 4356 // This element is implementation-specific for some location types, so don't 4357 // use it as an indicator for a correct file number or to monitor your task 4358 // execution. 4359 FilesTransferred *int64 `type:"long"` 4360 4361 // A list of filter rules that determines which files to include when running 4362 // a task. The list should contain a single filter string that consists of the 4363 // patterns to include. The patterns are delimited by "|" (that is, a pipe), 4364 // for example: "/folder1|/folder2" 4365 Includes []*FilterRule `type:"list"` 4366 4367 // Represents the options that are available to control the behavior of a StartTaskExecution 4368 // operation. Behavior includes preserving metadata such as user ID (UID), group 4369 // ID (GID), and file permissions, and also overwriting files in the destination, 4370 // data integrity verification, and so on. 4371 // 4372 // A task has a set of default options associated with it. If you don't specify 4373 // an option in StartTaskExecution, the default value is used. You can override 4374 // the defaults options on each task execution by specifying an overriding Options 4375 // value to StartTaskExecution. 4376 Options *Options `type:"structure"` 4377 4378 // The result of the task execution. 4379 Result *TaskExecutionResultDetail `type:"structure"` 4380 4381 // The time that the task execution was started. 4382 StartTime *time.Time `type:"timestamp"` 4383 4384 // The status of the task execution. 4385 // 4386 // For detailed information about task execution statuses, see Understanding 4387 // Task Statuses in the AWS DataSync User Guide. 4388 Status *string `type:"string" enum:"TaskExecutionStatus"` 4389 4390 // The Amazon Resource Name (ARN) of the task execution that was described. 4391 // TaskExecutionArn is hierarchical and includes TaskArn for the task that was 4392 // executed. 4393 // 4394 // For example, a TaskExecution value with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b 4395 // executed the task with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2. 4396 TaskExecutionArn *string `type:"string"` 4397} 4398 4399// String returns the string representation 4400func (s DescribeTaskExecutionOutput) String() string { 4401 return awsutil.Prettify(s) 4402} 4403 4404// GoString returns the string representation 4405func (s DescribeTaskExecutionOutput) GoString() string { 4406 return s.String() 4407} 4408 4409// SetBytesTransferred sets the BytesTransferred field's value. 4410func (s *DescribeTaskExecutionOutput) SetBytesTransferred(v int64) *DescribeTaskExecutionOutput { 4411 s.BytesTransferred = &v 4412 return s 4413} 4414 4415// SetBytesWritten sets the BytesWritten field's value. 4416func (s *DescribeTaskExecutionOutput) SetBytesWritten(v int64) *DescribeTaskExecutionOutput { 4417 s.BytesWritten = &v 4418 return s 4419} 4420 4421// SetEstimatedBytesToTransfer sets the EstimatedBytesToTransfer field's value. 4422func (s *DescribeTaskExecutionOutput) SetEstimatedBytesToTransfer(v int64) *DescribeTaskExecutionOutput { 4423 s.EstimatedBytesToTransfer = &v 4424 return s 4425} 4426 4427// SetEstimatedFilesToTransfer sets the EstimatedFilesToTransfer field's value. 4428func (s *DescribeTaskExecutionOutput) SetEstimatedFilesToTransfer(v int64) *DescribeTaskExecutionOutput { 4429 s.EstimatedFilesToTransfer = &v 4430 return s 4431} 4432 4433// SetExcludes sets the Excludes field's value. 4434func (s *DescribeTaskExecutionOutput) SetExcludes(v []*FilterRule) *DescribeTaskExecutionOutput { 4435 s.Excludes = v 4436 return s 4437} 4438 4439// SetFilesTransferred sets the FilesTransferred field's value. 4440func (s *DescribeTaskExecutionOutput) SetFilesTransferred(v int64) *DescribeTaskExecutionOutput { 4441 s.FilesTransferred = &v 4442 return s 4443} 4444 4445// SetIncludes sets the Includes field's value. 4446func (s *DescribeTaskExecutionOutput) SetIncludes(v []*FilterRule) *DescribeTaskExecutionOutput { 4447 s.Includes = v 4448 return s 4449} 4450 4451// SetOptions sets the Options field's value. 4452func (s *DescribeTaskExecutionOutput) SetOptions(v *Options) *DescribeTaskExecutionOutput { 4453 s.Options = v 4454 return s 4455} 4456 4457// SetResult sets the Result field's value. 4458func (s *DescribeTaskExecutionOutput) SetResult(v *TaskExecutionResultDetail) *DescribeTaskExecutionOutput { 4459 s.Result = v 4460 return s 4461} 4462 4463// SetStartTime sets the StartTime field's value. 4464func (s *DescribeTaskExecutionOutput) SetStartTime(v time.Time) *DescribeTaskExecutionOutput { 4465 s.StartTime = &v 4466 return s 4467} 4468 4469// SetStatus sets the Status field's value. 4470func (s *DescribeTaskExecutionOutput) SetStatus(v string) *DescribeTaskExecutionOutput { 4471 s.Status = &v 4472 return s 4473} 4474 4475// SetTaskExecutionArn sets the TaskExecutionArn field's value. 4476func (s *DescribeTaskExecutionOutput) SetTaskExecutionArn(v string) *DescribeTaskExecutionOutput { 4477 s.TaskExecutionArn = &v 4478 return s 4479} 4480 4481// DescribeTaskRequest 4482type DescribeTaskInput struct { 4483 _ struct{} `type:"structure"` 4484 4485 // The Amazon Resource Name (ARN) of the task to describe. 4486 // 4487 // TaskArn is a required field 4488 TaskArn *string `type:"string" required:"true"` 4489} 4490 4491// String returns the string representation 4492func (s DescribeTaskInput) String() string { 4493 return awsutil.Prettify(s) 4494} 4495 4496// GoString returns the string representation 4497func (s DescribeTaskInput) GoString() string { 4498 return s.String() 4499} 4500 4501// Validate inspects the fields of the type to determine if they are valid. 4502func (s *DescribeTaskInput) Validate() error { 4503 invalidParams := request.ErrInvalidParams{Context: "DescribeTaskInput"} 4504 if s.TaskArn == nil { 4505 invalidParams.Add(request.NewErrParamRequired("TaskArn")) 4506 } 4507 4508 if invalidParams.Len() > 0 { 4509 return invalidParams 4510 } 4511 return nil 4512} 4513 4514// SetTaskArn sets the TaskArn field's value. 4515func (s *DescribeTaskInput) SetTaskArn(v string) *DescribeTaskInput { 4516 s.TaskArn = &v 4517 return s 4518} 4519 4520// DescribeTaskResponse 4521type DescribeTaskOutput struct { 4522 _ struct{} `type:"structure"` 4523 4524 // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was 4525 // used to monitor and log events in the task. 4526 // 4527 // For more information on these groups, see Working with Log Groups and Log 4528 // Streams in the Amazon CloudWatch User Guide. 4529 CloudWatchLogGroupArn *string `type:"string"` 4530 4531 // The time that the task was created. 4532 CreationTime *time.Time `type:"timestamp"` 4533 4534 // The Amazon Resource Name (ARN) of the task execution that is syncing files. 4535 CurrentTaskExecutionArn *string `type:"string"` 4536 4537 // The Amazon Resource Name (ARN) of the AWS storage resource's location. 4538 DestinationLocationArn *string `type:"string"` 4539 4540 // The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network Interface) 4541 // that was created for your subnet. 4542 DestinationNetworkInterfaceArns []*string `type:"list"` 4543 4544 // Errors that AWS DataSync encountered during execution of the task. You can 4545 // use this error code to help troubleshoot issues. 4546 ErrorCode *string `type:"string"` 4547 4548 // Detailed description of an error that was encountered during the task execution. 4549 // You can use this information to help troubleshoot issues. 4550 ErrorDetail *string `type:"string"` 4551 4552 // A list of filter rules that determines which files to exclude from a task. 4553 // The list should contain a single filter string that consists of the patterns 4554 // to exclude. The patterns are delimited by "|" (that is, a pipe), for example: 4555 // "/folder1|/folder2" 4556 Excludes []*FilterRule `type:"list"` 4557 4558 // The name of the task that was described. 4559 Name *string `min:"1" type:"string"` 4560 4561 // The set of configuration options that control the behavior of a single execution 4562 // of the task that occurs when you call StartTaskExecution. You can configure 4563 // these options to preserve metadata such as user ID (UID) and group (GID), 4564 // file permissions, data integrity verification, and so on. 4565 // 4566 // For each individual task execution, you can override these options by specifying 4567 // the overriding OverrideOptions value to operation. 4568 Options *Options `type:"structure"` 4569 4570 // The Amazon Resource Name (ARN) of the source file system's location. 4571 SourceLocationArn *string `type:"string"` 4572 4573 // The Amazon Resource Name (ARN) of the source ENIs (Elastic Network Interface) 4574 // that was created for your subnet. 4575 SourceNetworkInterfaceArns []*string `type:"list"` 4576 4577 // The status of the task that was described. 4578 // 4579 // For detailed information about task execution statuses, see Understanding 4580 // Task Statuses in the AWS DataSync User Guide. 4581 Status *string `type:"string" enum:"TaskStatus"` 4582 4583 // The Amazon Resource Name (ARN) of the task that was described. 4584 TaskArn *string `type:"string"` 4585} 4586 4587// String returns the string representation 4588func (s DescribeTaskOutput) String() string { 4589 return awsutil.Prettify(s) 4590} 4591 4592// GoString returns the string representation 4593func (s DescribeTaskOutput) GoString() string { 4594 return s.String() 4595} 4596 4597// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. 4598func (s *DescribeTaskOutput) SetCloudWatchLogGroupArn(v string) *DescribeTaskOutput { 4599 s.CloudWatchLogGroupArn = &v 4600 return s 4601} 4602 4603// SetCreationTime sets the CreationTime field's value. 4604func (s *DescribeTaskOutput) SetCreationTime(v time.Time) *DescribeTaskOutput { 4605 s.CreationTime = &v 4606 return s 4607} 4608 4609// SetCurrentTaskExecutionArn sets the CurrentTaskExecutionArn field's value. 4610func (s *DescribeTaskOutput) SetCurrentTaskExecutionArn(v string) *DescribeTaskOutput { 4611 s.CurrentTaskExecutionArn = &v 4612 return s 4613} 4614 4615// SetDestinationLocationArn sets the DestinationLocationArn field's value. 4616func (s *DescribeTaskOutput) SetDestinationLocationArn(v string) *DescribeTaskOutput { 4617 s.DestinationLocationArn = &v 4618 return s 4619} 4620 4621// SetDestinationNetworkInterfaceArns sets the DestinationNetworkInterfaceArns field's value. 4622func (s *DescribeTaskOutput) SetDestinationNetworkInterfaceArns(v []*string) *DescribeTaskOutput { 4623 s.DestinationNetworkInterfaceArns = v 4624 return s 4625} 4626 4627// SetErrorCode sets the ErrorCode field's value. 4628func (s *DescribeTaskOutput) SetErrorCode(v string) *DescribeTaskOutput { 4629 s.ErrorCode = &v 4630 return s 4631} 4632 4633// SetErrorDetail sets the ErrorDetail field's value. 4634func (s *DescribeTaskOutput) SetErrorDetail(v string) *DescribeTaskOutput { 4635 s.ErrorDetail = &v 4636 return s 4637} 4638 4639// SetExcludes sets the Excludes field's value. 4640func (s *DescribeTaskOutput) SetExcludes(v []*FilterRule) *DescribeTaskOutput { 4641 s.Excludes = v 4642 return s 4643} 4644 4645// SetName sets the Name field's value. 4646func (s *DescribeTaskOutput) SetName(v string) *DescribeTaskOutput { 4647 s.Name = &v 4648 return s 4649} 4650 4651// SetOptions sets the Options field's value. 4652func (s *DescribeTaskOutput) SetOptions(v *Options) *DescribeTaskOutput { 4653 s.Options = v 4654 return s 4655} 4656 4657// SetSourceLocationArn sets the SourceLocationArn field's value. 4658func (s *DescribeTaskOutput) SetSourceLocationArn(v string) *DescribeTaskOutput { 4659 s.SourceLocationArn = &v 4660 return s 4661} 4662 4663// SetSourceNetworkInterfaceArns sets the SourceNetworkInterfaceArns field's value. 4664func (s *DescribeTaskOutput) SetSourceNetworkInterfaceArns(v []*string) *DescribeTaskOutput { 4665 s.SourceNetworkInterfaceArns = v 4666 return s 4667} 4668 4669// SetStatus sets the Status field's value. 4670func (s *DescribeTaskOutput) SetStatus(v string) *DescribeTaskOutput { 4671 s.Status = &v 4672 return s 4673} 4674 4675// SetTaskArn sets the TaskArn field's value. 4676func (s *DescribeTaskOutput) SetTaskArn(v string) *DescribeTaskOutput { 4677 s.TaskArn = &v 4678 return s 4679} 4680 4681// The subnet and the security group that DataSync uses to access target EFS 4682// file system. The subnet must have at least one mount target for that file 4683// system. The security group that you provide needs to be able to communicate 4684// with the security group on the mount target in the subnet specified. 4685type Ec2Config struct { 4686 _ struct{} `type:"structure"` 4687 4688 // The Amazon Resource Names (ARNs) of the security groups that are configured 4689 // for the Amazon EC2 resource. 4690 // 4691 // SecurityGroupArns is a required field 4692 SecurityGroupArns []*string `min:"1" type:"list" required:"true"` 4693 4694 // The ARN of the subnet and the security group that DataSync uses to access 4695 // the target EFS file system. 4696 // 4697 // SubnetArn is a required field 4698 SubnetArn *string `type:"string" required:"true"` 4699} 4700 4701// String returns the string representation 4702func (s Ec2Config) String() string { 4703 return awsutil.Prettify(s) 4704} 4705 4706// GoString returns the string representation 4707func (s Ec2Config) GoString() string { 4708 return s.String() 4709} 4710 4711// Validate inspects the fields of the type to determine if they are valid. 4712func (s *Ec2Config) Validate() error { 4713 invalidParams := request.ErrInvalidParams{Context: "Ec2Config"} 4714 if s.SecurityGroupArns == nil { 4715 invalidParams.Add(request.NewErrParamRequired("SecurityGroupArns")) 4716 } 4717 if s.SecurityGroupArns != nil && len(s.SecurityGroupArns) < 1 { 4718 invalidParams.Add(request.NewErrParamMinLen("SecurityGroupArns", 1)) 4719 } 4720 if s.SubnetArn == nil { 4721 invalidParams.Add(request.NewErrParamRequired("SubnetArn")) 4722 } 4723 4724 if invalidParams.Len() > 0 { 4725 return invalidParams 4726 } 4727 return nil 4728} 4729 4730// SetSecurityGroupArns sets the SecurityGroupArns field's value. 4731func (s *Ec2Config) SetSecurityGroupArns(v []*string) *Ec2Config { 4732 s.SecurityGroupArns = v 4733 return s 4734} 4735 4736// SetSubnetArn sets the SubnetArn field's value. 4737func (s *Ec2Config) SetSubnetArn(v string) *Ec2Config { 4738 s.SubnetArn = &v 4739 return s 4740} 4741 4742// Specifies which files, folders and objects to include or exclude when transferring 4743// files from source to destination. 4744type FilterRule struct { 4745 _ struct{} `type:"structure"` 4746 4747 // The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN 4748 // rule type. 4749 FilterType *string `type:"string" enum:"FilterType"` 4750 4751 // A single filter string that consists of the patterns to include or exclude. 4752 // The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2 4753 Value *string `type:"string"` 4754} 4755 4756// String returns the string representation 4757func (s FilterRule) String() string { 4758 return awsutil.Prettify(s) 4759} 4760 4761// GoString returns the string representation 4762func (s FilterRule) GoString() string { 4763 return s.String() 4764} 4765 4766// SetFilterType sets the FilterType field's value. 4767func (s *FilterRule) SetFilterType(v string) *FilterRule { 4768 s.FilterType = &v 4769 return s 4770} 4771 4772// SetValue sets the Value field's value. 4773func (s *FilterRule) SetValue(v string) *FilterRule { 4774 s.Value = &v 4775 return s 4776} 4777 4778// ListAgentsRequest 4779type ListAgentsInput struct { 4780 _ struct{} `type:"structure"` 4781 4782 // The maximum number of agents to list. 4783 MaxResults *int64 `type:"integer"` 4784 4785 // An opaque string that indicates the position at which to begin the next list 4786 // of agents. 4787 NextToken *string `type:"string"` 4788} 4789 4790// String returns the string representation 4791func (s ListAgentsInput) String() string { 4792 return awsutil.Prettify(s) 4793} 4794 4795// GoString returns the string representation 4796func (s ListAgentsInput) GoString() string { 4797 return s.String() 4798} 4799 4800// SetMaxResults sets the MaxResults field's value. 4801func (s *ListAgentsInput) SetMaxResults(v int64) *ListAgentsInput { 4802 s.MaxResults = &v 4803 return s 4804} 4805 4806// SetNextToken sets the NextToken field's value. 4807func (s *ListAgentsInput) SetNextToken(v string) *ListAgentsInput { 4808 s.NextToken = &v 4809 return s 4810} 4811 4812// ListAgentsResponse 4813type ListAgentsOutput struct { 4814 _ struct{} `type:"structure"` 4815 4816 // A list of agents in your account. 4817 Agents []*AgentListEntry `type:"list"` 4818 4819 // An opaque string that indicates the position at which to begin returning 4820 // the next list of agents. 4821 NextToken *string `type:"string"` 4822} 4823 4824// String returns the string representation 4825func (s ListAgentsOutput) String() string { 4826 return awsutil.Prettify(s) 4827} 4828 4829// GoString returns the string representation 4830func (s ListAgentsOutput) GoString() string { 4831 return s.String() 4832} 4833 4834// SetAgents sets the Agents field's value. 4835func (s *ListAgentsOutput) SetAgents(v []*AgentListEntry) *ListAgentsOutput { 4836 s.Agents = v 4837 return s 4838} 4839 4840// SetNextToken sets the NextToken field's value. 4841func (s *ListAgentsOutput) SetNextToken(v string) *ListAgentsOutput { 4842 s.NextToken = &v 4843 return s 4844} 4845 4846// ListLocationsRequest 4847type ListLocationsInput struct { 4848 _ struct{} `type:"structure"` 4849 4850 // The maximum number of locations to return. 4851 MaxResults *int64 `type:"integer"` 4852 4853 // An opaque string that indicates the position at which to begin the next list 4854 // of locations. 4855 NextToken *string `type:"string"` 4856} 4857 4858// String returns the string representation 4859func (s ListLocationsInput) String() string { 4860 return awsutil.Prettify(s) 4861} 4862 4863// GoString returns the string representation 4864func (s ListLocationsInput) GoString() string { 4865 return s.String() 4866} 4867 4868// SetMaxResults sets the MaxResults field's value. 4869func (s *ListLocationsInput) SetMaxResults(v int64) *ListLocationsInput { 4870 s.MaxResults = &v 4871 return s 4872} 4873 4874// SetNextToken sets the NextToken field's value. 4875func (s *ListLocationsInput) SetNextToken(v string) *ListLocationsInput { 4876 s.NextToken = &v 4877 return s 4878} 4879 4880// ListLocationsResponse 4881type ListLocationsOutput struct { 4882 _ struct{} `type:"structure"` 4883 4884 // An array that contains a list of locations. 4885 Locations []*LocationListEntry `type:"list"` 4886 4887 // An opaque string that indicates the position at which to begin returning 4888 // the next list of locations. 4889 NextToken *string `type:"string"` 4890} 4891 4892// String returns the string representation 4893func (s ListLocationsOutput) String() string { 4894 return awsutil.Prettify(s) 4895} 4896 4897// GoString returns the string representation 4898func (s ListLocationsOutput) GoString() string { 4899 return s.String() 4900} 4901 4902// SetLocations sets the Locations field's value. 4903func (s *ListLocationsOutput) SetLocations(v []*LocationListEntry) *ListLocationsOutput { 4904 s.Locations = v 4905 return s 4906} 4907 4908// SetNextToken sets the NextToken field's value. 4909func (s *ListLocationsOutput) SetNextToken(v string) *ListLocationsOutput { 4910 s.NextToken = &v 4911 return s 4912} 4913 4914// ListTagsForResourceRequest 4915type ListTagsForResourceInput struct { 4916 _ struct{} `type:"structure"` 4917 4918 // The maximum number of locations to return. 4919 MaxResults *int64 `type:"integer"` 4920 4921 // An opaque string that indicates the position at which to begin the next list 4922 // of locations. 4923 NextToken *string `type:"string"` 4924 4925 // The Amazon Resource Name (ARN) of the resource whose tags to list. 4926 // 4927 // ResourceArn is a required field 4928 ResourceArn *string `type:"string" required:"true"` 4929} 4930 4931// String returns the string representation 4932func (s ListTagsForResourceInput) String() string { 4933 return awsutil.Prettify(s) 4934} 4935 4936// GoString returns the string representation 4937func (s ListTagsForResourceInput) GoString() string { 4938 return s.String() 4939} 4940 4941// Validate inspects the fields of the type to determine if they are valid. 4942func (s *ListTagsForResourceInput) Validate() error { 4943 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 4944 if s.ResourceArn == nil { 4945 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4946 } 4947 4948 if invalidParams.Len() > 0 { 4949 return invalidParams 4950 } 4951 return nil 4952} 4953 4954// SetMaxResults sets the MaxResults field's value. 4955func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { 4956 s.MaxResults = &v 4957 return s 4958} 4959 4960// SetNextToken sets the NextToken field's value. 4961func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { 4962 s.NextToken = &v 4963 return s 4964} 4965 4966// SetResourceArn sets the ResourceArn field's value. 4967func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 4968 s.ResourceArn = &v 4969 return s 4970} 4971 4972// ListTagsForResourceResponse 4973type ListTagsForResourceOutput struct { 4974 _ struct{} `type:"structure"` 4975 4976 // An opaque string that indicates the position at which to begin returning 4977 // the next list of resource tags. 4978 NextToken *string `type:"string"` 4979 4980 // Array of resource tags. 4981 Tags []*TagListEntry `type:"list"` 4982} 4983 4984// String returns the string representation 4985func (s ListTagsForResourceOutput) String() string { 4986 return awsutil.Prettify(s) 4987} 4988 4989// GoString returns the string representation 4990func (s ListTagsForResourceOutput) GoString() string { 4991 return s.String() 4992} 4993 4994// SetNextToken sets the NextToken field's value. 4995func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { 4996 s.NextToken = &v 4997 return s 4998} 4999 5000// SetTags sets the Tags field's value. 5001func (s *ListTagsForResourceOutput) SetTags(v []*TagListEntry) *ListTagsForResourceOutput { 5002 s.Tags = v 5003 return s 5004} 5005 5006// ListTaskExecutions 5007type ListTaskExecutionsInput struct { 5008 _ struct{} `type:"structure"` 5009 5010 // The maximum number of executed tasks to list. 5011 MaxResults *int64 `type:"integer"` 5012 5013 // An opaque string that indicates the position at which to begin the next list 5014 // of the executed tasks. 5015 NextToken *string `type:"string"` 5016 5017 // The Amazon Resource Name (ARN) of the task whose tasks you want to list. 5018 TaskArn *string `type:"string"` 5019} 5020 5021// String returns the string representation 5022func (s ListTaskExecutionsInput) String() string { 5023 return awsutil.Prettify(s) 5024} 5025 5026// GoString returns the string representation 5027func (s ListTaskExecutionsInput) GoString() string { 5028 return s.String() 5029} 5030 5031// SetMaxResults sets the MaxResults field's value. 5032func (s *ListTaskExecutionsInput) SetMaxResults(v int64) *ListTaskExecutionsInput { 5033 s.MaxResults = &v 5034 return s 5035} 5036 5037// SetNextToken sets the NextToken field's value. 5038func (s *ListTaskExecutionsInput) SetNextToken(v string) *ListTaskExecutionsInput { 5039 s.NextToken = &v 5040 return s 5041} 5042 5043// SetTaskArn sets the TaskArn field's value. 5044func (s *ListTaskExecutionsInput) SetTaskArn(v string) *ListTaskExecutionsInput { 5045 s.TaskArn = &v 5046 return s 5047} 5048 5049// ListTaskExecutionsResponse 5050type ListTaskExecutionsOutput struct { 5051 _ struct{} `type:"structure"` 5052 5053 // An opaque string that indicates the position at which to begin returning 5054 // the next list of executed tasks. 5055 NextToken *string `type:"string"` 5056 5057 // A list of executed tasks. 5058 TaskExecutions []*TaskExecutionListEntry `type:"list"` 5059} 5060 5061// String returns the string representation 5062func (s ListTaskExecutionsOutput) String() string { 5063 return awsutil.Prettify(s) 5064} 5065 5066// GoString returns the string representation 5067func (s ListTaskExecutionsOutput) GoString() string { 5068 return s.String() 5069} 5070 5071// SetNextToken sets the NextToken field's value. 5072func (s *ListTaskExecutionsOutput) SetNextToken(v string) *ListTaskExecutionsOutput { 5073 s.NextToken = &v 5074 return s 5075} 5076 5077// SetTaskExecutions sets the TaskExecutions field's value. 5078func (s *ListTaskExecutionsOutput) SetTaskExecutions(v []*TaskExecutionListEntry) *ListTaskExecutionsOutput { 5079 s.TaskExecutions = v 5080 return s 5081} 5082 5083// ListTasksRequest 5084type ListTasksInput struct { 5085 _ struct{} `type:"structure"` 5086 5087 // The maximum number of tasks to return. 5088 MaxResults *int64 `type:"integer"` 5089 5090 // An opaque string that indicates the position at which to begin the next list 5091 // of tasks. 5092 NextToken *string `type:"string"` 5093} 5094 5095// String returns the string representation 5096func (s ListTasksInput) String() string { 5097 return awsutil.Prettify(s) 5098} 5099 5100// GoString returns the string representation 5101func (s ListTasksInput) GoString() string { 5102 return s.String() 5103} 5104 5105// SetMaxResults sets the MaxResults field's value. 5106func (s *ListTasksInput) SetMaxResults(v int64) *ListTasksInput { 5107 s.MaxResults = &v 5108 return s 5109} 5110 5111// SetNextToken sets the NextToken field's value. 5112func (s *ListTasksInput) SetNextToken(v string) *ListTasksInput { 5113 s.NextToken = &v 5114 return s 5115} 5116 5117// ListTasksResponse 5118type ListTasksOutput struct { 5119 _ struct{} `type:"structure"` 5120 5121 // An opaque string that indicates the position at which to begin returning 5122 // the next list of tasks. 5123 NextToken *string `type:"string"` 5124 5125 // A list of all the tasks that are returned. 5126 Tasks []*TaskListEntry `type:"list"` 5127} 5128 5129// String returns the string representation 5130func (s ListTasksOutput) String() string { 5131 return awsutil.Prettify(s) 5132} 5133 5134// GoString returns the string representation 5135func (s ListTasksOutput) GoString() string { 5136 return s.String() 5137} 5138 5139// SetNextToken sets the NextToken field's value. 5140func (s *ListTasksOutput) SetNextToken(v string) *ListTasksOutput { 5141 s.NextToken = &v 5142 return s 5143} 5144 5145// SetTasks sets the Tasks field's value. 5146func (s *ListTasksOutput) SetTasks(v []*TaskListEntry) *ListTasksOutput { 5147 s.Tasks = v 5148 return s 5149} 5150 5151// Represents a single entry in a list of locations. LocationListEntry returns 5152// an array that contains a list of locations when the ListLocations operation 5153// is called. 5154type LocationListEntry struct { 5155 _ struct{} `type:"structure"` 5156 5157 // The Amazon Resource Name (ARN) of the location. For Network File System (NFS) 5158 // or Amazon EFS, the location is the export path. For Amazon S3, the location 5159 // is the prefix path that you want to mount and use as the root of the location. 5160 LocationArn *string `type:"string"` 5161 5162 // Represents a list of URLs of a location. LocationUri returns an array that 5163 // contains a list of locations when the ListLocations operation is called. 5164 // 5165 // Format: TYPE://GLOBAL_ID/SUBDIR. 5166 // 5167 // TYPE designates the type of location. Valid values: NFS | EFS | S3. 5168 // 5169 // GLOBAL_ID is the globally unique identifier of the resource that backs the 5170 // location. An example for EFS is us-east-2.fs-abcd1234. An example for Amazon 5171 // S3 is the bucket name, such as myBucket. An example for NFS is a valid IPv4 5172 // address or a host name compliant with Domain Name Service (DNS). 5173 // 5174 // SUBDIR is a valid file system path, delimited by forward slashes as is the 5175 // *nix convention. For NFS and Amazon EFS, it's the export path to mount the 5176 // location. For Amazon S3, it's the prefix path that you mount to and treat 5177 // as the root of the location. 5178 LocationUri *string `type:"string"` 5179} 5180 5181// String returns the string representation 5182func (s LocationListEntry) String() string { 5183 return awsutil.Prettify(s) 5184} 5185 5186// GoString returns the string representation 5187func (s LocationListEntry) GoString() string { 5188 return s.String() 5189} 5190 5191// SetLocationArn sets the LocationArn field's value. 5192func (s *LocationListEntry) SetLocationArn(v string) *LocationListEntry { 5193 s.LocationArn = &v 5194 return s 5195} 5196 5197// SetLocationUri sets the LocationUri field's value. 5198func (s *LocationListEntry) SetLocationUri(v string) *LocationListEntry { 5199 s.LocationUri = &v 5200 return s 5201} 5202 5203// Represents the mount options that are available for DataSync to access an 5204// NFS location. 5205type NfsMountOptions struct { 5206 _ struct{} `type:"structure"` 5207 5208 // The specific NFS version that you want DataSync to use to mount your NFS 5209 // share. If you don't specify a version, DataSync defaults to AUTOMATIC. That 5210 // is, DataSync automatically selects a version based on negotiation with the 5211 // NFS server. 5212 Version *string `type:"string" enum:"NfsVersion"` 5213} 5214 5215// String returns the string representation 5216func (s NfsMountOptions) String() string { 5217 return awsutil.Prettify(s) 5218} 5219 5220// GoString returns the string representation 5221func (s NfsMountOptions) GoString() string { 5222 return s.String() 5223} 5224 5225// SetVersion sets the Version field's value. 5226func (s *NfsMountOptions) SetVersion(v string) *NfsMountOptions { 5227 s.Version = &v 5228 return s 5229} 5230 5231// A list of Amazon Resource Names (ARNs) of agents to use for a Network File 5232// System (NFS) location. 5233type OnPremConfig struct { 5234 _ struct{} `type:"structure"` 5235 5236 // ARNs)of the agents to use for an NFS location. 5237 // 5238 // AgentArns is a required field 5239 AgentArns []*string `min:"1" type:"list" required:"true"` 5240} 5241 5242// String returns the string representation 5243func (s OnPremConfig) String() string { 5244 return awsutil.Prettify(s) 5245} 5246 5247// GoString returns the string representation 5248func (s OnPremConfig) GoString() string { 5249 return s.String() 5250} 5251 5252// Validate inspects the fields of the type to determine if they are valid. 5253func (s *OnPremConfig) Validate() error { 5254 invalidParams := request.ErrInvalidParams{Context: "OnPremConfig"} 5255 if s.AgentArns == nil { 5256 invalidParams.Add(request.NewErrParamRequired("AgentArns")) 5257 } 5258 if s.AgentArns != nil && len(s.AgentArns) < 1 { 5259 invalidParams.Add(request.NewErrParamMinLen("AgentArns", 1)) 5260 } 5261 5262 if invalidParams.Len() > 0 { 5263 return invalidParams 5264 } 5265 return nil 5266} 5267 5268// SetAgentArns sets the AgentArns field's value. 5269func (s *OnPremConfig) SetAgentArns(v []*string) *OnPremConfig { 5270 s.AgentArns = v 5271 return s 5272} 5273 5274// Represents the options that are available to control the behavior of a StartTaskExecution 5275// operation. Behavior includes preserving metadata such as user ID (UID), group 5276// ID (GID), and file permissions, and also overwriting files in the destination, 5277// data integrity verification, and so on. 5278// 5279// A task has a set of default options associated with it. If you don't specify 5280// an option in StartTaskExecution, the default value is used. You can override 5281// the defaults options on each task execution by specifying an overriding Options 5282// value to StartTaskExecution. 5283type Options struct { 5284 _ struct{} `type:"structure"` 5285 5286 // A file metadata value that shows the last time a file was accessed (that 5287 // is, when the file was read or written to). If you set Atime to BEST_EFFORT, 5288 // DataSync attempts to preserve the original Atime attribute on all source 5289 // files (that is, the version before the PREPARING phase). However, Atime's 5290 // behavior is not fully standard across platforms, so AWS DataSync can only 5291 // do this on a best-effort basis. 5292 // 5293 // Default value: BEST_EFFORT. 5294 // 5295 // BEST_EFFORT: Attempt to preserve the per-file Atime value (recommended). 5296 // 5297 // NONE: Ignore Atime. 5298 // 5299 // If Atime is set to BEST_EFFORT, Mtime must be set to PRESERVE. 5300 // 5301 // If Atime is set to NONE, Mtime must also be NONE. 5302 Atime *string `type:"string" enum:"Atime"` 5303 5304 // A value that limits the bandwidth used by AWS DataSync. For example, if you 5305 // want AWS DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024). 5306 BytesPerSecond *int64 `type:"long"` 5307 5308 // The group ID (GID) of the file's owners. 5309 // 5310 // Default value: INT_VALUE. This preserves the integer value of the ID. 5311 // 5312 // INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended). 5313 // 5314 // NONE: Ignore UID and GID. 5315 Gid *string `type:"string" enum:"Gid"` 5316 5317 // A value that indicates the last time that a file was modified (that is, a 5318 // file was written to) before the PREPARING phase. 5319 // 5320 // Default value: PRESERVE. 5321 // 5322 // PRESERVE: Preserve original Mtime (recommended) 5323 // 5324 // NONE: Ignore Mtime. 5325 // 5326 // If Mtime is set to PRESERVE, Atime must be set to BEST_EFFORT. 5327 // 5328 // If Mtime is set to NONE, Atime must also be set to NONE. 5329 Mtime *string `type:"string" enum:"Mtime"` 5330 5331 // A value that determines which users or groups can access a file for a specific 5332 // purpose such as reading, writing, or execution of the file. 5333 // 5334 // Default value: PRESERVE. 5335 // 5336 // PRESERVE: Preserve POSIX-style permissions (recommended). 5337 // 5338 // NONE: Ignore permissions. 5339 // 5340 // AWS DataSync can preserve extant permissions of a source location. 5341 PosixPermissions *string `type:"string" enum:"PosixPermissions"` 5342 5343 // A value that specifies whether files in the destination that don't exist 5344 // in the source file system should be preserved. 5345 // 5346 // Default value: PRESERVE. 5347 // 5348 // PRESERVE: Ignore such destination files (recommended). 5349 // 5350 // REMOVE: Delete destination files that aren’t present in the source. 5351 PreserveDeletedFiles *string `type:"string" enum:"PreserveDeletedFiles"` 5352 5353 // A value that determines whether AWS DataSync should preserve the metadata 5354 // of block and character devices in the source file system, and recreate the 5355 // files with that device name and metadata on the destination. 5356 // 5357 // AWS DataSync can't sync the actual contents of such devices, because they 5358 // are nonterminal and don't return an end-of-file (EOF) marker. 5359 // 5360 // Default value: NONE. 5361 // 5362 // NONE: Ignore special devices (recommended). 5363 // 5364 // PRESERVE: Preserve character and block device metadata. This option isn't 5365 // currently supported for Amazon EFS. 5366 PreserveDevices *string `type:"string" enum:"PreserveDevices"` 5367 5368 // The user ID (UID) of the file's owner. 5369 // 5370 // Default value: INT_VALUE. This preserves the integer value of the ID. 5371 // 5372 // INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended). 5373 // 5374 // NONE: Ignore UID and GID. 5375 Uid *string `type:"string" enum:"Uid"` 5376 5377 // A value that determines whether a data integrity verification should be performed 5378 // at the end of a task execution after all data and metadata have been transferred. 5379 // 5380 // Default value: POINT_IN_TIME_CONSISTENT. 5381 // 5382 // POINT_IN_TIME_CONSISTENT: Perform verification (recommended). 5383 // 5384 // NONE: Skip verification. 5385 VerifyMode *string `type:"string" enum:"VerifyMode"` 5386} 5387 5388// String returns the string representation 5389func (s Options) String() string { 5390 return awsutil.Prettify(s) 5391} 5392 5393// GoString returns the string representation 5394func (s Options) GoString() string { 5395 return s.String() 5396} 5397 5398// Validate inspects the fields of the type to determine if they are valid. 5399func (s *Options) Validate() error { 5400 invalidParams := request.ErrInvalidParams{Context: "Options"} 5401 if s.BytesPerSecond != nil && *s.BytesPerSecond < -1 { 5402 invalidParams.Add(request.NewErrParamMinValue("BytesPerSecond", -1)) 5403 } 5404 5405 if invalidParams.Len() > 0 { 5406 return invalidParams 5407 } 5408 return nil 5409} 5410 5411// SetAtime sets the Atime field's value. 5412func (s *Options) SetAtime(v string) *Options { 5413 s.Atime = &v 5414 return s 5415} 5416 5417// SetBytesPerSecond sets the BytesPerSecond field's value. 5418func (s *Options) SetBytesPerSecond(v int64) *Options { 5419 s.BytesPerSecond = &v 5420 return s 5421} 5422 5423// SetGid sets the Gid field's value. 5424func (s *Options) SetGid(v string) *Options { 5425 s.Gid = &v 5426 return s 5427} 5428 5429// SetMtime sets the Mtime field's value. 5430func (s *Options) SetMtime(v string) *Options { 5431 s.Mtime = &v 5432 return s 5433} 5434 5435// SetPosixPermissions sets the PosixPermissions field's value. 5436func (s *Options) SetPosixPermissions(v string) *Options { 5437 s.PosixPermissions = &v 5438 return s 5439} 5440 5441// SetPreserveDeletedFiles sets the PreserveDeletedFiles field's value. 5442func (s *Options) SetPreserveDeletedFiles(v string) *Options { 5443 s.PreserveDeletedFiles = &v 5444 return s 5445} 5446 5447// SetPreserveDevices sets the PreserveDevices field's value. 5448func (s *Options) SetPreserveDevices(v string) *Options { 5449 s.PreserveDevices = &v 5450 return s 5451} 5452 5453// SetUid sets the Uid field's value. 5454func (s *Options) SetUid(v string) *Options { 5455 s.Uid = &v 5456 return s 5457} 5458 5459// SetVerifyMode sets the VerifyMode field's value. 5460func (s *Options) SetVerifyMode(v string) *Options { 5461 s.VerifyMode = &v 5462 return s 5463} 5464 5465// The VPC endpoint, subnet and security group that an agent uses to access 5466// IP addresses in a VPC (Virtual Private Cloud). 5467type PrivateLinkConfig struct { 5468 _ struct{} `type:"structure"` 5469 5470 // The private endpoint that is configured for an agent that has access to IP 5471 // addresses in a PrivateLink (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html). 5472 // An agent that is configured with this endpoint will not be accessible over 5473 // the public Internet. 5474 PrivateLinkEndpoint *string `min:"7" type:"string"` 5475 5476 // The Amazon Resource Names (ARNs) of the security groups that are configured 5477 // for the EC2 resource that hosts an agent activated in a VPC or an agent that 5478 // has access to a VPC endpoint. 5479 SecurityGroupArns []*string `min:"1" type:"list"` 5480 5481 // The Amazon Resource Names (ARNs) of the subnets that are configured for an 5482 // agent activated in a VPC or an agent that has access to a VPC endpoint. 5483 SubnetArns []*string `min:"1" type:"list"` 5484 5485 // The ID of the VPC endpoint that is configured for an agent. An agent that 5486 // is configured with a VPC endpoint will not be accessible over the public 5487 // Internet. 5488 VpcEndpointId *string `type:"string"` 5489} 5490 5491// String returns the string representation 5492func (s PrivateLinkConfig) String() string { 5493 return awsutil.Prettify(s) 5494} 5495 5496// GoString returns the string representation 5497func (s PrivateLinkConfig) GoString() string { 5498 return s.String() 5499} 5500 5501// SetPrivateLinkEndpoint sets the PrivateLinkEndpoint field's value. 5502func (s *PrivateLinkConfig) SetPrivateLinkEndpoint(v string) *PrivateLinkConfig { 5503 s.PrivateLinkEndpoint = &v 5504 return s 5505} 5506 5507// SetSecurityGroupArns sets the SecurityGroupArns field's value. 5508func (s *PrivateLinkConfig) SetSecurityGroupArns(v []*string) *PrivateLinkConfig { 5509 s.SecurityGroupArns = v 5510 return s 5511} 5512 5513// SetSubnetArns sets the SubnetArns field's value. 5514func (s *PrivateLinkConfig) SetSubnetArns(v []*string) *PrivateLinkConfig { 5515 s.SubnetArns = v 5516 return s 5517} 5518 5519// SetVpcEndpointId sets the VpcEndpointId field's value. 5520func (s *PrivateLinkConfig) SetVpcEndpointId(v string) *PrivateLinkConfig { 5521 s.VpcEndpointId = &v 5522 return s 5523} 5524 5525// The Amazon Resource Name (ARN) of the AWS Identity and Access Management 5526// (IAM) role that is used to access an Amazon S3 bucket. 5527// 5528// For detailed information about using such a role, see Creating a Location 5529// for Amazon S3 in the AWS DataSync User Guide. 5530type S3Config struct { 5531 _ struct{} `type:"structure"` 5532 5533 // The Amazon S3 bucket to access. This bucket is used as a parameter in the 5534 // CreateLocationS3 operation. 5535 // 5536 // BucketAccessRoleArn is a required field 5537 BucketAccessRoleArn *string `type:"string" required:"true"` 5538} 5539 5540// String returns the string representation 5541func (s S3Config) String() string { 5542 return awsutil.Prettify(s) 5543} 5544 5545// GoString returns the string representation 5546func (s S3Config) GoString() string { 5547 return s.String() 5548} 5549 5550// Validate inspects the fields of the type to determine if they are valid. 5551func (s *S3Config) Validate() error { 5552 invalidParams := request.ErrInvalidParams{Context: "S3Config"} 5553 if s.BucketAccessRoleArn == nil { 5554 invalidParams.Add(request.NewErrParamRequired("BucketAccessRoleArn")) 5555 } 5556 5557 if invalidParams.Len() > 0 { 5558 return invalidParams 5559 } 5560 return nil 5561} 5562 5563// SetBucketAccessRoleArn sets the BucketAccessRoleArn field's value. 5564func (s *S3Config) SetBucketAccessRoleArn(v string) *S3Config { 5565 s.BucketAccessRoleArn = &v 5566 return s 5567} 5568 5569// Represents the mount options that are available for DataSync to access an 5570// SMB location. 5571type SmbMountOptions struct { 5572 _ struct{} `type:"structure"` 5573 5574 // The specific SMB version that you want DataSync to use to mount your SMB 5575 // share. If you don't specify a version, DataSync defaults to AUTOMATIC. That 5576 // is, DataSync automatically selects a version based on negotiation with the 5577 // SMB Server server. 5578 Version *string `type:"string" enum:"SmbVersion"` 5579} 5580 5581// String returns the string representation 5582func (s SmbMountOptions) String() string { 5583 return awsutil.Prettify(s) 5584} 5585 5586// GoString returns the string representation 5587func (s SmbMountOptions) GoString() string { 5588 return s.String() 5589} 5590 5591// SetVersion sets the Version field's value. 5592func (s *SmbMountOptions) SetVersion(v string) *SmbMountOptions { 5593 s.Version = &v 5594 return s 5595} 5596 5597// StartTaskExecutionRequest 5598type StartTaskExecutionInput struct { 5599 _ struct{} `type:"structure"` 5600 5601 // A list of filter rules that determines which files to include when running 5602 // a task. The pattern should contain a single filter string that consists of 5603 // the patterns to include. The patterns are delimited by "|" (that is, a pipe). 5604 // For example: "/folder1|/folder2" 5605 Includes []*FilterRule `type:"list"` 5606 5607 // Represents the options that are available to control the behavior of a StartTaskExecution 5608 // operation. Behavior includes preserving metadata such as user ID (UID), group 5609 // ID (GID), and file permissions, and also overwriting files in the destination, 5610 // data integrity verification, and so on. 5611 // 5612 // A task has a set of default options associated with it. If you don't specify 5613 // an option in StartTaskExecution, the default value is used. You can override 5614 // the defaults options on each task execution by specifying an overriding Options 5615 // value to StartTaskExecution. 5616 OverrideOptions *Options `type:"structure"` 5617 5618 // The Amazon Resource Name (ARN) of the task to start. 5619 // 5620 // TaskArn is a required field 5621 TaskArn *string `type:"string" required:"true"` 5622} 5623 5624// String returns the string representation 5625func (s StartTaskExecutionInput) String() string { 5626 return awsutil.Prettify(s) 5627} 5628 5629// GoString returns the string representation 5630func (s StartTaskExecutionInput) GoString() string { 5631 return s.String() 5632} 5633 5634// Validate inspects the fields of the type to determine if they are valid. 5635func (s *StartTaskExecutionInput) Validate() error { 5636 invalidParams := request.ErrInvalidParams{Context: "StartTaskExecutionInput"} 5637 if s.TaskArn == nil { 5638 invalidParams.Add(request.NewErrParamRequired("TaskArn")) 5639 } 5640 if s.OverrideOptions != nil { 5641 if err := s.OverrideOptions.Validate(); err != nil { 5642 invalidParams.AddNested("OverrideOptions", err.(request.ErrInvalidParams)) 5643 } 5644 } 5645 5646 if invalidParams.Len() > 0 { 5647 return invalidParams 5648 } 5649 return nil 5650} 5651 5652// SetIncludes sets the Includes field's value. 5653func (s *StartTaskExecutionInput) SetIncludes(v []*FilterRule) *StartTaskExecutionInput { 5654 s.Includes = v 5655 return s 5656} 5657 5658// SetOverrideOptions sets the OverrideOptions field's value. 5659func (s *StartTaskExecutionInput) SetOverrideOptions(v *Options) *StartTaskExecutionInput { 5660 s.OverrideOptions = v 5661 return s 5662} 5663 5664// SetTaskArn sets the TaskArn field's value. 5665func (s *StartTaskExecutionInput) SetTaskArn(v string) *StartTaskExecutionInput { 5666 s.TaskArn = &v 5667 return s 5668} 5669 5670// StartTaskExecutionResponse 5671type StartTaskExecutionOutput struct { 5672 _ struct{} `type:"structure"` 5673 5674 // The Amazon Resource Name (ARN) of the specific task execution that was started. 5675 TaskExecutionArn *string `type:"string"` 5676} 5677 5678// String returns the string representation 5679func (s StartTaskExecutionOutput) String() string { 5680 return awsutil.Prettify(s) 5681} 5682 5683// GoString returns the string representation 5684func (s StartTaskExecutionOutput) GoString() string { 5685 return s.String() 5686} 5687 5688// SetTaskExecutionArn sets the TaskExecutionArn field's value. 5689func (s *StartTaskExecutionOutput) SetTaskExecutionArn(v string) *StartTaskExecutionOutput { 5690 s.TaskExecutionArn = &v 5691 return s 5692} 5693 5694// Represents a single entry in a list of AWS resource tags. TagListEntry returns 5695// an array that contains a list of tasks when the ListTagsForResource operation 5696// is called. 5697type TagListEntry struct { 5698 _ struct{} `type:"structure"` 5699 5700 // The key for an AWS resource tag. 5701 // 5702 // Key is a required field 5703 Key *string `min:"1" type:"string" required:"true"` 5704 5705 // The value for an AWS resource tag. 5706 Value *string `min:"1" type:"string"` 5707} 5708 5709// String returns the string representation 5710func (s TagListEntry) String() string { 5711 return awsutil.Prettify(s) 5712} 5713 5714// GoString returns the string representation 5715func (s TagListEntry) GoString() string { 5716 return s.String() 5717} 5718 5719// Validate inspects the fields of the type to determine if they are valid. 5720func (s *TagListEntry) Validate() error { 5721 invalidParams := request.ErrInvalidParams{Context: "TagListEntry"} 5722 if s.Key == nil { 5723 invalidParams.Add(request.NewErrParamRequired("Key")) 5724 } 5725 if s.Key != nil && len(*s.Key) < 1 { 5726 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 5727 } 5728 if s.Value != nil && len(*s.Value) < 1 { 5729 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 5730 } 5731 5732 if invalidParams.Len() > 0 { 5733 return invalidParams 5734 } 5735 return nil 5736} 5737 5738// SetKey sets the Key field's value. 5739func (s *TagListEntry) SetKey(v string) *TagListEntry { 5740 s.Key = &v 5741 return s 5742} 5743 5744// SetValue sets the Value field's value. 5745func (s *TagListEntry) SetValue(v string) *TagListEntry { 5746 s.Value = &v 5747 return s 5748} 5749 5750// TagResourceRequest 5751type TagResourceInput struct { 5752 _ struct{} `type:"structure"` 5753 5754 // The Amazon Resource Name (ARN) of the resource to apply the tag to. 5755 // 5756 // ResourceArn is a required field 5757 ResourceArn *string `type:"string" required:"true"` 5758 5759 // The tags to apply. 5760 // 5761 // Tags is a required field 5762 Tags []*TagListEntry `type:"list" required:"true"` 5763} 5764 5765// String returns the string representation 5766func (s TagResourceInput) String() string { 5767 return awsutil.Prettify(s) 5768} 5769 5770// GoString returns the string representation 5771func (s TagResourceInput) GoString() string { 5772 return s.String() 5773} 5774 5775// Validate inspects the fields of the type to determine if they are valid. 5776func (s *TagResourceInput) Validate() error { 5777 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 5778 if s.ResourceArn == nil { 5779 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 5780 } 5781 if s.Tags == nil { 5782 invalidParams.Add(request.NewErrParamRequired("Tags")) 5783 } 5784 if s.Tags != nil { 5785 for i, v := range s.Tags { 5786 if v == nil { 5787 continue 5788 } 5789 if err := v.Validate(); err != nil { 5790 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 5791 } 5792 } 5793 } 5794 5795 if invalidParams.Len() > 0 { 5796 return invalidParams 5797 } 5798 return nil 5799} 5800 5801// SetResourceArn sets the ResourceArn field's value. 5802func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 5803 s.ResourceArn = &v 5804 return s 5805} 5806 5807// SetTags sets the Tags field's value. 5808func (s *TagResourceInput) SetTags(v []*TagListEntry) *TagResourceInput { 5809 s.Tags = v 5810 return s 5811} 5812 5813type TagResourceOutput struct { 5814 _ struct{} `type:"structure"` 5815} 5816 5817// String returns the string representation 5818func (s TagResourceOutput) String() string { 5819 return awsutil.Prettify(s) 5820} 5821 5822// GoString returns the string representation 5823func (s TagResourceOutput) GoString() string { 5824 return s.String() 5825} 5826 5827// Represents a single entry in a list of task executions. TaskExecutionListEntry 5828// returns an array that contains a list of specific invocations of a task when 5829// ListTaskExecutions operation is called. 5830type TaskExecutionListEntry struct { 5831 _ struct{} `type:"structure"` 5832 5833 // The status of a task execution. 5834 Status *string `type:"string" enum:"TaskExecutionStatus"` 5835 5836 // The Amazon Resource Name (ARN) of the task that was executed. 5837 TaskExecutionArn *string `type:"string"` 5838} 5839 5840// String returns the string representation 5841func (s TaskExecutionListEntry) String() string { 5842 return awsutil.Prettify(s) 5843} 5844 5845// GoString returns the string representation 5846func (s TaskExecutionListEntry) GoString() string { 5847 return s.String() 5848} 5849 5850// SetStatus sets the Status field's value. 5851func (s *TaskExecutionListEntry) SetStatus(v string) *TaskExecutionListEntry { 5852 s.Status = &v 5853 return s 5854} 5855 5856// SetTaskExecutionArn sets the TaskExecutionArn field's value. 5857func (s *TaskExecutionListEntry) SetTaskExecutionArn(v string) *TaskExecutionListEntry { 5858 s.TaskExecutionArn = &v 5859 return s 5860} 5861 5862// Describes the detailed result of a TaskExecution operation. This result includes 5863// the time in milliseconds spent in each phase, the status of the task execution, 5864// and the errors encountered. 5865type TaskExecutionResultDetail struct { 5866 _ struct{} `type:"structure"` 5867 5868 // Errors that AWS DataSync encountered during execution of the task. You can 5869 // use this error code to help troubleshoot issues. 5870 ErrorCode *string `type:"string"` 5871 5872 // Detailed description of an error that was encountered during the task execution. 5873 // You can use this information to help troubleshoot issues. 5874 ErrorDetail *string `type:"string"` 5875 5876 // The total time in milliseconds that AWS DataSync spent in the PREPARING phase. 5877 PrepareDuration *int64 `type:"long"` 5878 5879 // The status of the PREPARING phase. 5880 PrepareStatus *string `type:"string" enum:"PhaseStatus"` 5881 5882 // The total time in milliseconds that AWS DataSync spent in the TRANSFERRING 5883 // phase. 5884 TransferDuration *int64 `type:"long"` 5885 5886 // The status of the TRANSFERRING Phase. 5887 TransferStatus *string `type:"string" enum:"PhaseStatus"` 5888 5889 // The total time in milliseconds that AWS DataSync spent in the VERIFYING phase. 5890 VerifyDuration *int64 `type:"long"` 5891 5892 // The status of the VERIFYING Phase. 5893 VerifyStatus *string `type:"string" enum:"PhaseStatus"` 5894} 5895 5896// String returns the string representation 5897func (s TaskExecutionResultDetail) String() string { 5898 return awsutil.Prettify(s) 5899} 5900 5901// GoString returns the string representation 5902func (s TaskExecutionResultDetail) GoString() string { 5903 return s.String() 5904} 5905 5906// SetErrorCode sets the ErrorCode field's value. 5907func (s *TaskExecutionResultDetail) SetErrorCode(v string) *TaskExecutionResultDetail { 5908 s.ErrorCode = &v 5909 return s 5910} 5911 5912// SetErrorDetail sets the ErrorDetail field's value. 5913func (s *TaskExecutionResultDetail) SetErrorDetail(v string) *TaskExecutionResultDetail { 5914 s.ErrorDetail = &v 5915 return s 5916} 5917 5918// SetPrepareDuration sets the PrepareDuration field's value. 5919func (s *TaskExecutionResultDetail) SetPrepareDuration(v int64) *TaskExecutionResultDetail { 5920 s.PrepareDuration = &v 5921 return s 5922} 5923 5924// SetPrepareStatus sets the PrepareStatus field's value. 5925func (s *TaskExecutionResultDetail) SetPrepareStatus(v string) *TaskExecutionResultDetail { 5926 s.PrepareStatus = &v 5927 return s 5928} 5929 5930// SetTransferDuration sets the TransferDuration field's value. 5931func (s *TaskExecutionResultDetail) SetTransferDuration(v int64) *TaskExecutionResultDetail { 5932 s.TransferDuration = &v 5933 return s 5934} 5935 5936// SetTransferStatus sets the TransferStatus field's value. 5937func (s *TaskExecutionResultDetail) SetTransferStatus(v string) *TaskExecutionResultDetail { 5938 s.TransferStatus = &v 5939 return s 5940} 5941 5942// SetVerifyDuration sets the VerifyDuration field's value. 5943func (s *TaskExecutionResultDetail) SetVerifyDuration(v int64) *TaskExecutionResultDetail { 5944 s.VerifyDuration = &v 5945 return s 5946} 5947 5948// SetVerifyStatus sets the VerifyStatus field's value. 5949func (s *TaskExecutionResultDetail) SetVerifyStatus(v string) *TaskExecutionResultDetail { 5950 s.VerifyStatus = &v 5951 return s 5952} 5953 5954// Represents a single entry in a list of tasks. TaskListEntry returns an array 5955// that contains a list of tasks when the ListTasks operation is called. A task 5956// includes the source and destination file systems to sync and the options 5957// to use for the tasks. 5958type TaskListEntry struct { 5959 _ struct{} `type:"structure"` 5960 5961 // The name of the task. 5962 Name *string `min:"1" type:"string"` 5963 5964 // The status of the task. 5965 Status *string `type:"string" enum:"TaskStatus"` 5966 5967 // The Amazon Resource Name (ARN) of the task. 5968 TaskArn *string `type:"string"` 5969} 5970 5971// String returns the string representation 5972func (s TaskListEntry) String() string { 5973 return awsutil.Prettify(s) 5974} 5975 5976// GoString returns the string representation 5977func (s TaskListEntry) GoString() string { 5978 return s.String() 5979} 5980 5981// SetName sets the Name field's value. 5982func (s *TaskListEntry) SetName(v string) *TaskListEntry { 5983 s.Name = &v 5984 return s 5985} 5986 5987// SetStatus sets the Status field's value. 5988func (s *TaskListEntry) SetStatus(v string) *TaskListEntry { 5989 s.Status = &v 5990 return s 5991} 5992 5993// SetTaskArn sets the TaskArn field's value. 5994func (s *TaskListEntry) SetTaskArn(v string) *TaskListEntry { 5995 s.TaskArn = &v 5996 return s 5997} 5998 5999// UntagResourceRequest 6000type UntagResourceInput struct { 6001 _ struct{} `type:"structure"` 6002 6003 // The keys in the key-value pair in the tag to remove. 6004 // 6005 // Keys is a required field 6006 Keys []*string `min:"1" type:"list" required:"true"` 6007 6008 // The Amazon Resource Name (ARN) of the resource to remove the tag from. 6009 // 6010 // ResourceArn is a required field 6011 ResourceArn *string `type:"string" required:"true"` 6012} 6013 6014// String returns the string representation 6015func (s UntagResourceInput) String() string { 6016 return awsutil.Prettify(s) 6017} 6018 6019// GoString returns the string representation 6020func (s UntagResourceInput) GoString() string { 6021 return s.String() 6022} 6023 6024// Validate inspects the fields of the type to determine if they are valid. 6025func (s *UntagResourceInput) Validate() error { 6026 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 6027 if s.Keys == nil { 6028 invalidParams.Add(request.NewErrParamRequired("Keys")) 6029 } 6030 if s.Keys != nil && len(s.Keys) < 1 { 6031 invalidParams.Add(request.NewErrParamMinLen("Keys", 1)) 6032 } 6033 if s.ResourceArn == nil { 6034 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 6035 } 6036 6037 if invalidParams.Len() > 0 { 6038 return invalidParams 6039 } 6040 return nil 6041} 6042 6043// SetKeys sets the Keys field's value. 6044func (s *UntagResourceInput) SetKeys(v []*string) *UntagResourceInput { 6045 s.Keys = v 6046 return s 6047} 6048 6049// SetResourceArn sets the ResourceArn field's value. 6050func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 6051 s.ResourceArn = &v 6052 return s 6053} 6054 6055type UntagResourceOutput struct { 6056 _ struct{} `type:"structure"` 6057} 6058 6059// String returns the string representation 6060func (s UntagResourceOutput) String() string { 6061 return awsutil.Prettify(s) 6062} 6063 6064// GoString returns the string representation 6065func (s UntagResourceOutput) GoString() string { 6066 return s.String() 6067} 6068 6069// UpdateAgentRequest 6070type UpdateAgentInput struct { 6071 _ struct{} `type:"structure"` 6072 6073 // The Amazon Resource Name (ARN) of the agent to update. 6074 // 6075 // AgentArn is a required field 6076 AgentArn *string `type:"string" required:"true"` 6077 6078 // The name that you want to use to configure the agent. 6079 Name *string `min:"1" type:"string"` 6080} 6081 6082// String returns the string representation 6083func (s UpdateAgentInput) String() string { 6084 return awsutil.Prettify(s) 6085} 6086 6087// GoString returns the string representation 6088func (s UpdateAgentInput) GoString() string { 6089 return s.String() 6090} 6091 6092// Validate inspects the fields of the type to determine if they are valid. 6093func (s *UpdateAgentInput) Validate() error { 6094 invalidParams := request.ErrInvalidParams{Context: "UpdateAgentInput"} 6095 if s.AgentArn == nil { 6096 invalidParams.Add(request.NewErrParamRequired("AgentArn")) 6097 } 6098 if s.Name != nil && len(*s.Name) < 1 { 6099 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6100 } 6101 6102 if invalidParams.Len() > 0 { 6103 return invalidParams 6104 } 6105 return nil 6106} 6107 6108// SetAgentArn sets the AgentArn field's value. 6109func (s *UpdateAgentInput) SetAgentArn(v string) *UpdateAgentInput { 6110 s.AgentArn = &v 6111 return s 6112} 6113 6114// SetName sets the Name field's value. 6115func (s *UpdateAgentInput) SetName(v string) *UpdateAgentInput { 6116 s.Name = &v 6117 return s 6118} 6119 6120type UpdateAgentOutput struct { 6121 _ struct{} `type:"structure"` 6122} 6123 6124// String returns the string representation 6125func (s UpdateAgentOutput) String() string { 6126 return awsutil.Prettify(s) 6127} 6128 6129// GoString returns the string representation 6130func (s UpdateAgentOutput) GoString() string { 6131 return s.String() 6132} 6133 6134// UpdateTaskResponse 6135type UpdateTaskInput struct { 6136 _ struct{} `type:"structure"` 6137 6138 // The Amazon Resource Name (ARN) of the resource name of the CloudWatch LogGroup. 6139 CloudWatchLogGroupArn *string `type:"string"` 6140 6141 // A list of filter rules that determines which files to exclude from a task. 6142 // The list should contain a single filter string that consists of the patterns 6143 // to exclude. The patterns are delimited by "|" (that is, a pipe), for example: 6144 // "/folder1|/folder2" 6145 Excludes []*FilterRule `type:"list"` 6146 6147 // The name of the task to update. 6148 Name *string `min:"1" type:"string"` 6149 6150 // Represents the options that are available to control the behavior of a StartTaskExecution 6151 // operation. Behavior includes preserving metadata such as user ID (UID), group 6152 // ID (GID), and file permissions, and also overwriting files in the destination, 6153 // data integrity verification, and so on. 6154 // 6155 // A task has a set of default options associated with it. If you don't specify 6156 // an option in StartTaskExecution, the default value is used. You can override 6157 // the defaults options on each task execution by specifying an overriding Options 6158 // value to StartTaskExecution. 6159 Options *Options `type:"structure"` 6160 6161 // The Amazon Resource Name (ARN) of the resource name of the task to update. 6162 // 6163 // TaskArn is a required field 6164 TaskArn *string `type:"string" required:"true"` 6165} 6166 6167// String returns the string representation 6168func (s UpdateTaskInput) String() string { 6169 return awsutil.Prettify(s) 6170} 6171 6172// GoString returns the string representation 6173func (s UpdateTaskInput) GoString() string { 6174 return s.String() 6175} 6176 6177// Validate inspects the fields of the type to determine if they are valid. 6178func (s *UpdateTaskInput) Validate() error { 6179 invalidParams := request.ErrInvalidParams{Context: "UpdateTaskInput"} 6180 if s.Name != nil && len(*s.Name) < 1 { 6181 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6182 } 6183 if s.TaskArn == nil { 6184 invalidParams.Add(request.NewErrParamRequired("TaskArn")) 6185 } 6186 if s.Options != nil { 6187 if err := s.Options.Validate(); err != nil { 6188 invalidParams.AddNested("Options", err.(request.ErrInvalidParams)) 6189 } 6190 } 6191 6192 if invalidParams.Len() > 0 { 6193 return invalidParams 6194 } 6195 return nil 6196} 6197 6198// SetCloudWatchLogGroupArn sets the CloudWatchLogGroupArn field's value. 6199func (s *UpdateTaskInput) SetCloudWatchLogGroupArn(v string) *UpdateTaskInput { 6200 s.CloudWatchLogGroupArn = &v 6201 return s 6202} 6203 6204// SetExcludes sets the Excludes field's value. 6205func (s *UpdateTaskInput) SetExcludes(v []*FilterRule) *UpdateTaskInput { 6206 s.Excludes = v 6207 return s 6208} 6209 6210// SetName sets the Name field's value. 6211func (s *UpdateTaskInput) SetName(v string) *UpdateTaskInput { 6212 s.Name = &v 6213 return s 6214} 6215 6216// SetOptions sets the Options field's value. 6217func (s *UpdateTaskInput) SetOptions(v *Options) *UpdateTaskInput { 6218 s.Options = v 6219 return s 6220} 6221 6222// SetTaskArn sets the TaskArn field's value. 6223func (s *UpdateTaskInput) SetTaskArn(v string) *UpdateTaskInput { 6224 s.TaskArn = &v 6225 return s 6226} 6227 6228type UpdateTaskOutput struct { 6229 _ struct{} `type:"structure"` 6230} 6231 6232// String returns the string representation 6233func (s UpdateTaskOutput) String() string { 6234 return awsutil.Prettify(s) 6235} 6236 6237// GoString returns the string representation 6238func (s UpdateTaskOutput) GoString() string { 6239 return s.String() 6240} 6241 6242const ( 6243 // AgentStatusOnline is a AgentStatus enum value 6244 AgentStatusOnline = "ONLINE" 6245 6246 // AgentStatusOffline is a AgentStatus enum value 6247 AgentStatusOffline = "OFFLINE" 6248) 6249 6250const ( 6251 // AtimeNone is a Atime enum value 6252 AtimeNone = "NONE" 6253 6254 // AtimeBestEffort is a Atime enum value 6255 AtimeBestEffort = "BEST_EFFORT" 6256) 6257 6258const ( 6259 // EndpointTypePublic is a EndpointType enum value 6260 EndpointTypePublic = "PUBLIC" 6261 6262 // EndpointTypePrivateLink is a EndpointType enum value 6263 EndpointTypePrivateLink = "PRIVATE_LINK" 6264) 6265 6266const ( 6267 // FilterTypeSimplePattern is a FilterType enum value 6268 FilterTypeSimplePattern = "SIMPLE_PATTERN" 6269) 6270 6271const ( 6272 // GidNone is a Gid enum value 6273 GidNone = "NONE" 6274 6275 // GidIntValue is a Gid enum value 6276 GidIntValue = "INT_VALUE" 6277 6278 // GidName is a Gid enum value 6279 GidName = "NAME" 6280 6281 // GidBoth is a Gid enum value 6282 GidBoth = "BOTH" 6283) 6284 6285const ( 6286 // MtimeNone is a Mtime enum value 6287 MtimeNone = "NONE" 6288 6289 // MtimePreserve is a Mtime enum value 6290 MtimePreserve = "PRESERVE" 6291) 6292 6293const ( 6294 // NfsVersionAutomatic is a NfsVersion enum value 6295 NfsVersionAutomatic = "AUTOMATIC" 6296 6297 // NfsVersionNfs3 is a NfsVersion enum value 6298 NfsVersionNfs3 = "NFS3" 6299 6300 // NfsVersionNfs40 is a NfsVersion enum value 6301 NfsVersionNfs40 = "NFS4_0" 6302 6303 // NfsVersionNfs41 is a NfsVersion enum value 6304 NfsVersionNfs41 = "NFS4_1" 6305) 6306 6307const ( 6308 // PhaseStatusPending is a PhaseStatus enum value 6309 PhaseStatusPending = "PENDING" 6310 6311 // PhaseStatusSuccess is a PhaseStatus enum value 6312 PhaseStatusSuccess = "SUCCESS" 6313 6314 // PhaseStatusError is a PhaseStatus enum value 6315 PhaseStatusError = "ERROR" 6316) 6317 6318const ( 6319 // PosixPermissionsNone is a PosixPermissions enum value 6320 PosixPermissionsNone = "NONE" 6321 6322 // PosixPermissionsBestEffort is a PosixPermissions enum value 6323 PosixPermissionsBestEffort = "BEST_EFFORT" 6324 6325 // PosixPermissionsPreserve is a PosixPermissions enum value 6326 PosixPermissionsPreserve = "PRESERVE" 6327) 6328 6329const ( 6330 // PreserveDeletedFilesPreserve is a PreserveDeletedFiles enum value 6331 PreserveDeletedFilesPreserve = "PRESERVE" 6332 6333 // PreserveDeletedFilesRemove is a PreserveDeletedFiles enum value 6334 PreserveDeletedFilesRemove = "REMOVE" 6335) 6336 6337const ( 6338 // PreserveDevicesNone is a PreserveDevices enum value 6339 PreserveDevicesNone = "NONE" 6340 6341 // PreserveDevicesPreserve is a PreserveDevices enum value 6342 PreserveDevicesPreserve = "PRESERVE" 6343) 6344 6345const ( 6346 // SmbVersionAutomatic is a SmbVersion enum value 6347 SmbVersionAutomatic = "AUTOMATIC" 6348 6349 // SmbVersionSmb2 is a SmbVersion enum value 6350 SmbVersionSmb2 = "SMB2" 6351 6352 // SmbVersionSmb3 is a SmbVersion enum value 6353 SmbVersionSmb3 = "SMB3" 6354) 6355 6356const ( 6357 // TaskExecutionStatusLaunching is a TaskExecutionStatus enum value 6358 TaskExecutionStatusLaunching = "LAUNCHING" 6359 6360 // TaskExecutionStatusPreparing is a TaskExecutionStatus enum value 6361 TaskExecutionStatusPreparing = "PREPARING" 6362 6363 // TaskExecutionStatusTransferring is a TaskExecutionStatus enum value 6364 TaskExecutionStatusTransferring = "TRANSFERRING" 6365 6366 // TaskExecutionStatusVerifying is a TaskExecutionStatus enum value 6367 TaskExecutionStatusVerifying = "VERIFYING" 6368 6369 // TaskExecutionStatusSuccess is a TaskExecutionStatus enum value 6370 TaskExecutionStatusSuccess = "SUCCESS" 6371 6372 // TaskExecutionStatusError is a TaskExecutionStatus enum value 6373 TaskExecutionStatusError = "ERROR" 6374) 6375 6376const ( 6377 // TaskStatusAvailable is a TaskStatus enum value 6378 TaskStatusAvailable = "AVAILABLE" 6379 6380 // TaskStatusCreating is a TaskStatus enum value 6381 TaskStatusCreating = "CREATING" 6382 6383 // TaskStatusRunning is a TaskStatus enum value 6384 TaskStatusRunning = "RUNNING" 6385 6386 // TaskStatusUnavailable is a TaskStatus enum value 6387 TaskStatusUnavailable = "UNAVAILABLE" 6388) 6389 6390const ( 6391 // UidNone is a Uid enum value 6392 UidNone = "NONE" 6393 6394 // UidIntValue is a Uid enum value 6395 UidIntValue = "INT_VALUE" 6396 6397 // UidName is a Uid enum value 6398 UidName = "NAME" 6399 6400 // UidBoth is a Uid enum value 6401 UidBoth = "BOTH" 6402) 6403 6404const ( 6405 // VerifyModePointInTimeConsistent is a VerifyMode enum value 6406 VerifyModePointInTimeConsistent = "POINT_IN_TIME_CONSISTENT" 6407 6408 // VerifyModeNone is a VerifyMode enum value 6409 VerifyModeNone = "NONE" 6410) 6411