github.com/aavshr/aws-sdk-go@v1.41.3/service/s3outposts/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package s3outposts 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 14 ) 15 16 const opCreateEndpoint = "CreateEndpoint" 17 18 // CreateEndpointRequest generates a "aws/request.Request" representing the 19 // client's request for the CreateEndpoint 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 CreateEndpoint for more information on using the CreateEndpoint 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 CreateEndpointRequest method. 34 // req, resp := client.CreateEndpointRequest(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/s3outposts-2017-07-25/CreateEndpoint 42 func (c *S3Outposts) CreateEndpointRequest(input *CreateEndpointInput) (req *request.Request, output *CreateEndpointOutput) { 43 op := &request.Operation{ 44 Name: opCreateEndpoint, 45 HTTPMethod: "POST", 46 HTTPPath: "/S3Outposts/CreateEndpoint", 47 } 48 49 if input == nil { 50 input = &CreateEndpointInput{} 51 } 52 53 output = &CreateEndpointOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // CreateEndpoint API operation for Amazon S3 on Outposts. 59 // 60 // Amazon S3 on Outposts Access Points simplify managing data access at scale 61 // for shared datasets in S3 on Outposts. S3 on Outposts uses endpoints to connect 62 // to Outposts buckets so that you can perform actions within your virtual private 63 // cloud (VPC). For more information, see Accessing S3 on Outposts using VPC 64 // only access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/AccessingS3Outposts.html). 65 // 66 // This action creates an endpoint and associates it with the specified Outposts. 67 // 68 // It can take up to 5 minutes for this action to complete. 69 // 70 // Related actions include: 71 // 72 // * DeleteEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html) 73 // 74 // * ListEndpoints (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html) 75 // 76 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 77 // with awserr.Error's Code and Message methods to get detailed information about 78 // the error. 79 // 80 // See the AWS API reference guide for Amazon S3 on Outposts's 81 // API operation CreateEndpoint for usage and error information. 82 // 83 // Returned Error Types: 84 // * InternalServerException 85 // There was an exception with the internal server. 86 // 87 // * ValidationException 88 // There was an exception validating this data. 89 // 90 // * AccessDeniedException 91 // Access was denied for this action. 92 // 93 // * ResourceNotFoundException 94 // The requested resource was not found. 95 // 96 // * ConflictException 97 // There was a conflict with this action, and it could not be completed. 98 // 99 // See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/CreateEndpoint 100 func (c *S3Outposts) CreateEndpoint(input *CreateEndpointInput) (*CreateEndpointOutput, error) { 101 req, out := c.CreateEndpointRequest(input) 102 return out, req.Send() 103 } 104 105 // CreateEndpointWithContext is the same as CreateEndpoint with the addition of 106 // the ability to pass a context and additional request options. 107 // 108 // See CreateEndpoint for details on how to use this API operation. 109 // 110 // The context must be non-nil and will be used for request cancellation. If 111 // the context is nil a panic will occur. In the future the SDK may create 112 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 113 // for more information on using Contexts. 114 func (c *S3Outposts) CreateEndpointWithContext(ctx aws.Context, input *CreateEndpointInput, opts ...request.Option) (*CreateEndpointOutput, error) { 115 req, out := c.CreateEndpointRequest(input) 116 req.SetContext(ctx) 117 req.ApplyOptions(opts...) 118 return out, req.Send() 119 } 120 121 const opDeleteEndpoint = "DeleteEndpoint" 122 123 // DeleteEndpointRequest generates a "aws/request.Request" representing the 124 // client's request for the DeleteEndpoint operation. The "output" return 125 // value will be populated with the request's response once the request completes 126 // successfully. 127 // 128 // Use "Send" method on the returned Request to send the API call to the service. 129 // the "output" return value is not valid until after Send returns without error. 130 // 131 // See DeleteEndpoint for more information on using the DeleteEndpoint 132 // API call, and error handling. 133 // 134 // This method is useful when you want to inject custom logic or configuration 135 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 136 // 137 // 138 // // Example sending a request using the DeleteEndpointRequest method. 139 // req, resp := client.DeleteEndpointRequest(params) 140 // 141 // err := req.Send() 142 // if err == nil { // resp is now filled 143 // fmt.Println(resp) 144 // } 145 // 146 // See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/DeleteEndpoint 147 func (c *S3Outposts) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { 148 op := &request.Operation{ 149 Name: opDeleteEndpoint, 150 HTTPMethod: "DELETE", 151 HTTPPath: "/S3Outposts/DeleteEndpoint", 152 } 153 154 if input == nil { 155 input = &DeleteEndpointInput{} 156 } 157 158 output = &DeleteEndpointOutput{} 159 req = c.newRequest(op, input, output) 160 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 161 return 162 } 163 164 // DeleteEndpoint API operation for Amazon S3 on Outposts. 165 // 166 // Amazon S3 on Outposts Access Points simplify managing data access at scale 167 // for shared datasets in S3 on Outposts. S3 on Outposts uses endpoints to connect 168 // to Outposts buckets so that you can perform actions within your virtual private 169 // cloud (VPC). For more information, see Accessing S3 on Outposts using VPC 170 // only access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/AccessingS3Outposts.html). 171 // 172 // This action deletes an endpoint. 173 // 174 // It can take up to 5 minutes for this action to complete. 175 // 176 // Related actions include: 177 // 178 // * CreateEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html) 179 // 180 // * ListEndpoints (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_ListEndpoints.html) 181 // 182 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 183 // with awserr.Error's Code and Message methods to get detailed information about 184 // the error. 185 // 186 // See the AWS API reference guide for Amazon S3 on Outposts's 187 // API operation DeleteEndpoint for usage and error information. 188 // 189 // Returned Error Types: 190 // * InternalServerException 191 // There was an exception with the internal server. 192 // 193 // * AccessDeniedException 194 // Access was denied for this action. 195 // 196 // * ResourceNotFoundException 197 // The requested resource was not found. 198 // 199 // * ValidationException 200 // There was an exception validating this data. 201 // 202 // See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/DeleteEndpoint 203 func (c *S3Outposts) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { 204 req, out := c.DeleteEndpointRequest(input) 205 return out, req.Send() 206 } 207 208 // DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of 209 // the ability to pass a context and additional request options. 210 // 211 // See DeleteEndpoint for details on how to use this API operation. 212 // 213 // The context must be non-nil and will be used for request cancellation. If 214 // the context is nil a panic will occur. In the future the SDK may create 215 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 216 // for more information on using Contexts. 217 func (c *S3Outposts) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { 218 req, out := c.DeleteEndpointRequest(input) 219 req.SetContext(ctx) 220 req.ApplyOptions(opts...) 221 return out, req.Send() 222 } 223 224 const opListEndpoints = "ListEndpoints" 225 226 // ListEndpointsRequest generates a "aws/request.Request" representing the 227 // client's request for the ListEndpoints operation. The "output" return 228 // value will be populated with the request's response once the request completes 229 // successfully. 230 // 231 // Use "Send" method on the returned Request to send the API call to the service. 232 // the "output" return value is not valid until after Send returns without error. 233 // 234 // See ListEndpoints for more information on using the ListEndpoints 235 // API call, and error handling. 236 // 237 // This method is useful when you want to inject custom logic or configuration 238 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 239 // 240 // 241 // // Example sending a request using the ListEndpointsRequest method. 242 // req, resp := client.ListEndpointsRequest(params) 243 // 244 // err := req.Send() 245 // if err == nil { // resp is now filled 246 // fmt.Println(resp) 247 // } 248 // 249 // See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/ListEndpoints 250 func (c *S3Outposts) ListEndpointsRequest(input *ListEndpointsInput) (req *request.Request, output *ListEndpointsOutput) { 251 op := &request.Operation{ 252 Name: opListEndpoints, 253 HTTPMethod: "GET", 254 HTTPPath: "/S3Outposts/ListEndpoints", 255 Paginator: &request.Paginator{ 256 InputTokens: []string{"NextToken"}, 257 OutputTokens: []string{"NextToken"}, 258 LimitToken: "MaxResults", 259 TruncationToken: "", 260 }, 261 } 262 263 if input == nil { 264 input = &ListEndpointsInput{} 265 } 266 267 output = &ListEndpointsOutput{} 268 req = c.newRequest(op, input, output) 269 return 270 } 271 272 // ListEndpoints API operation for Amazon S3 on Outposts. 273 // 274 // Amazon S3 on Outposts Access Points simplify managing data access at scale 275 // for shared datasets in S3 on Outposts. S3 on Outposts uses endpoints to connect 276 // to Outposts buckets so that you can perform actions within your virtual private 277 // cloud (VPC). For more information, see Accessing S3 on Outposts using VPC 278 // only access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/AccessingS3Outposts.html). 279 // 280 // This action lists endpoints associated with the Outposts. 281 // 282 // Related actions include: 283 // 284 // * CreateEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_CreateEndpoint.html) 285 // 286 // * DeleteEndpoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3outposts_DeleteEndpoint.html) 287 // 288 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 289 // with awserr.Error's Code and Message methods to get detailed information about 290 // the error. 291 // 292 // See the AWS API reference guide for Amazon S3 on Outposts's 293 // API operation ListEndpoints for usage and error information. 294 // 295 // Returned Error Types: 296 // * InternalServerException 297 // There was an exception with the internal server. 298 // 299 // * ResourceNotFoundException 300 // The requested resource was not found. 301 // 302 // * AccessDeniedException 303 // Access was denied for this action. 304 // 305 // * ValidationException 306 // There was an exception validating this data. 307 // 308 // See also, https://docs.aws.amazon.com/goto/WebAPI/s3outposts-2017-07-25/ListEndpoints 309 func (c *S3Outposts) ListEndpoints(input *ListEndpointsInput) (*ListEndpointsOutput, error) { 310 req, out := c.ListEndpointsRequest(input) 311 return out, req.Send() 312 } 313 314 // ListEndpointsWithContext is the same as ListEndpoints with the addition of 315 // the ability to pass a context and additional request options. 316 // 317 // See ListEndpoints for details on how to use this API operation. 318 // 319 // The context must be non-nil and will be used for request cancellation. If 320 // the context is nil a panic will occur. In the future the SDK may create 321 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 322 // for more information on using Contexts. 323 func (c *S3Outposts) ListEndpointsWithContext(ctx aws.Context, input *ListEndpointsInput, opts ...request.Option) (*ListEndpointsOutput, error) { 324 req, out := c.ListEndpointsRequest(input) 325 req.SetContext(ctx) 326 req.ApplyOptions(opts...) 327 return out, req.Send() 328 } 329 330 // ListEndpointsPages iterates over the pages of a ListEndpoints operation, 331 // calling the "fn" function with the response data for each page. To stop 332 // iterating, return false from the fn function. 333 // 334 // See ListEndpoints method for more information on how to use this operation. 335 // 336 // Note: This operation can generate multiple requests to a service. 337 // 338 // // Example iterating over at most 3 pages of a ListEndpoints operation. 339 // pageNum := 0 340 // err := client.ListEndpointsPages(params, 341 // func(page *s3outposts.ListEndpointsOutput, lastPage bool) bool { 342 // pageNum++ 343 // fmt.Println(page) 344 // return pageNum <= 3 345 // }) 346 // 347 func (c *S3Outposts) ListEndpointsPages(input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool) error { 348 return c.ListEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) 349 } 350 351 // ListEndpointsPagesWithContext same as ListEndpointsPages except 352 // it takes a Context and allows setting request options on the pages. 353 // 354 // The context must be non-nil and will be used for request cancellation. If 355 // the context is nil a panic will occur. In the future the SDK may create 356 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 357 // for more information on using Contexts. 358 func (c *S3Outposts) ListEndpointsPagesWithContext(ctx aws.Context, input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool, opts ...request.Option) error { 359 p := request.Pagination{ 360 NewRequest: func() (*request.Request, error) { 361 var inCpy *ListEndpointsInput 362 if input != nil { 363 tmp := *input 364 inCpy = &tmp 365 } 366 req, _ := c.ListEndpointsRequest(inCpy) 367 req.SetContext(ctx) 368 req.ApplyOptions(opts...) 369 return req, nil 370 }, 371 } 372 373 for p.Next() { 374 if !fn(p.Page().(*ListEndpointsOutput), !p.HasNextPage()) { 375 break 376 } 377 } 378 379 return p.Err() 380 } 381 382 // Access was denied for this action. 383 type AccessDeniedException struct { 384 _ struct{} `type:"structure"` 385 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 386 387 Message_ *string `locationName:"Message" type:"string"` 388 } 389 390 // String returns the string representation. 391 // 392 // API parameter values that are decorated as "sensitive" in the API will not 393 // be included in the string output. The member name will be present, but the 394 // value will be replaced with "sensitive". 395 func (s AccessDeniedException) String() string { 396 return awsutil.Prettify(s) 397 } 398 399 // GoString returns the string representation. 400 // 401 // API parameter values that are decorated as "sensitive" in the API will not 402 // be included in the string output. The member name will be present, but the 403 // value will be replaced with "sensitive". 404 func (s AccessDeniedException) GoString() string { 405 return s.String() 406 } 407 408 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 409 return &AccessDeniedException{ 410 RespMetadata: v, 411 } 412 } 413 414 // Code returns the exception type name. 415 func (s *AccessDeniedException) Code() string { 416 return "AccessDeniedException" 417 } 418 419 // Message returns the exception's message. 420 func (s *AccessDeniedException) Message() string { 421 if s.Message_ != nil { 422 return *s.Message_ 423 } 424 return "" 425 } 426 427 // OrigErr always returns nil, satisfies awserr.Error interface. 428 func (s *AccessDeniedException) OrigErr() error { 429 return nil 430 } 431 432 func (s *AccessDeniedException) Error() string { 433 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 434 } 435 436 // Status code returns the HTTP status code for the request's response error. 437 func (s *AccessDeniedException) StatusCode() int { 438 return s.RespMetadata.StatusCode 439 } 440 441 // RequestID returns the service's response RequestID for request. 442 func (s *AccessDeniedException) RequestID() string { 443 return s.RespMetadata.RequestID 444 } 445 446 // There was a conflict with this action, and it could not be completed. 447 type ConflictException struct { 448 _ struct{} `type:"structure"` 449 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 450 451 Message_ *string `locationName:"Message" type:"string"` 452 } 453 454 // String returns the string representation. 455 // 456 // API parameter values that are decorated as "sensitive" in the API will not 457 // be included in the string output. The member name will be present, but the 458 // value will be replaced with "sensitive". 459 func (s ConflictException) String() string { 460 return awsutil.Prettify(s) 461 } 462 463 // GoString returns the string representation. 464 // 465 // API parameter values that are decorated as "sensitive" in the API will not 466 // be included in the string output. The member name will be present, but the 467 // value will be replaced with "sensitive". 468 func (s ConflictException) GoString() string { 469 return s.String() 470 } 471 472 func newErrorConflictException(v protocol.ResponseMetadata) error { 473 return &ConflictException{ 474 RespMetadata: v, 475 } 476 } 477 478 // Code returns the exception type name. 479 func (s *ConflictException) Code() string { 480 return "ConflictException" 481 } 482 483 // Message returns the exception's message. 484 func (s *ConflictException) Message() string { 485 if s.Message_ != nil { 486 return *s.Message_ 487 } 488 return "" 489 } 490 491 // OrigErr always returns nil, satisfies awserr.Error interface. 492 func (s *ConflictException) OrigErr() error { 493 return nil 494 } 495 496 func (s *ConflictException) Error() string { 497 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 498 } 499 500 // Status code returns the HTTP status code for the request's response error. 501 func (s *ConflictException) StatusCode() int { 502 return s.RespMetadata.StatusCode 503 } 504 505 // RequestID returns the service's response RequestID for request. 506 func (s *ConflictException) RequestID() string { 507 return s.RespMetadata.RequestID 508 } 509 510 type CreateEndpointInput struct { 511 _ struct{} `type:"structure"` 512 513 // The type of access for the on-premise network connectivity for the Outpost 514 // endpoint. To access the endpoint from an on-premises network, you must specify 515 // the access type and provide the customer owned IPv4 pool. 516 AccessType *string `type:"string" enum:"EndpointAccessType"` 517 518 // The ID of the customer-owned IPv4 pool for the endpoint. IP addresses will 519 // be allocated from this pool for the endpoint. 520 CustomerOwnedIpv4Pool *string `type:"string"` 521 522 // The ID of the AWS Outposts. 523 // 524 // OutpostId is a required field 525 OutpostId *string `type:"string" required:"true"` 526 527 // The ID of the security group to use with the endpoint. 528 // 529 // SecurityGroupId is a required field 530 SecurityGroupId *string `type:"string" required:"true"` 531 532 // The ID of the subnet in the selected VPC. The endpoint subnet must belong 533 // to the Outpost that has the Amazon S3 on Outposts provisioned. 534 // 535 // SubnetId is a required field 536 SubnetId *string `type:"string" required:"true"` 537 } 538 539 // String returns the string representation. 540 // 541 // API parameter values that are decorated as "sensitive" in the API will not 542 // be included in the string output. The member name will be present, but the 543 // value will be replaced with "sensitive". 544 func (s CreateEndpointInput) String() string { 545 return awsutil.Prettify(s) 546 } 547 548 // GoString returns the string representation. 549 // 550 // API parameter values that are decorated as "sensitive" in the API will not 551 // be included in the string output. The member name will be present, but the 552 // value will be replaced with "sensitive". 553 func (s CreateEndpointInput) GoString() string { 554 return s.String() 555 } 556 557 // Validate inspects the fields of the type to determine if they are valid. 558 func (s *CreateEndpointInput) Validate() error { 559 invalidParams := request.ErrInvalidParams{Context: "CreateEndpointInput"} 560 if s.OutpostId == nil { 561 invalidParams.Add(request.NewErrParamRequired("OutpostId")) 562 } 563 if s.SecurityGroupId == nil { 564 invalidParams.Add(request.NewErrParamRequired("SecurityGroupId")) 565 } 566 if s.SubnetId == nil { 567 invalidParams.Add(request.NewErrParamRequired("SubnetId")) 568 } 569 570 if invalidParams.Len() > 0 { 571 return invalidParams 572 } 573 return nil 574 } 575 576 // SetAccessType sets the AccessType field's value. 577 func (s *CreateEndpointInput) SetAccessType(v string) *CreateEndpointInput { 578 s.AccessType = &v 579 return s 580 } 581 582 // SetCustomerOwnedIpv4Pool sets the CustomerOwnedIpv4Pool field's value. 583 func (s *CreateEndpointInput) SetCustomerOwnedIpv4Pool(v string) *CreateEndpointInput { 584 s.CustomerOwnedIpv4Pool = &v 585 return s 586 } 587 588 // SetOutpostId sets the OutpostId field's value. 589 func (s *CreateEndpointInput) SetOutpostId(v string) *CreateEndpointInput { 590 s.OutpostId = &v 591 return s 592 } 593 594 // SetSecurityGroupId sets the SecurityGroupId field's value. 595 func (s *CreateEndpointInput) SetSecurityGroupId(v string) *CreateEndpointInput { 596 s.SecurityGroupId = &v 597 return s 598 } 599 600 // SetSubnetId sets the SubnetId field's value. 601 func (s *CreateEndpointInput) SetSubnetId(v string) *CreateEndpointInput { 602 s.SubnetId = &v 603 return s 604 } 605 606 type CreateEndpointOutput struct { 607 _ struct{} `type:"structure"` 608 609 // The Amazon Resource Name (ARN) of the endpoint. 610 EndpointArn *string `type:"string"` 611 } 612 613 // String returns the string representation. 614 // 615 // API parameter values that are decorated as "sensitive" in the API will not 616 // be included in the string output. The member name will be present, but the 617 // value will be replaced with "sensitive". 618 func (s CreateEndpointOutput) String() string { 619 return awsutil.Prettify(s) 620 } 621 622 // GoString returns the string representation. 623 // 624 // API parameter values that are decorated as "sensitive" in the API will not 625 // be included in the string output. The member name will be present, but the 626 // value will be replaced with "sensitive". 627 func (s CreateEndpointOutput) GoString() string { 628 return s.String() 629 } 630 631 // SetEndpointArn sets the EndpointArn field's value. 632 func (s *CreateEndpointOutput) SetEndpointArn(v string) *CreateEndpointOutput { 633 s.EndpointArn = &v 634 return s 635 } 636 637 type DeleteEndpointInput struct { 638 _ struct{} `type:"structure" nopayload:"true"` 639 640 // The ID of the endpoint. 641 // 642 // EndpointId is a required field 643 EndpointId *string `location:"querystring" locationName:"endpointId" type:"string" required:"true"` 644 645 // The ID of the AWS Outposts. 646 // 647 // OutpostId is a required field 648 OutpostId *string `location:"querystring" locationName:"outpostId" type:"string" required:"true"` 649 } 650 651 // String returns the string representation. 652 // 653 // API parameter values that are decorated as "sensitive" in the API will not 654 // be included in the string output. The member name will be present, but the 655 // value will be replaced with "sensitive". 656 func (s DeleteEndpointInput) String() string { 657 return awsutil.Prettify(s) 658 } 659 660 // GoString returns the string representation. 661 // 662 // API parameter values that are decorated as "sensitive" in the API will not 663 // be included in the string output. The member name will be present, but the 664 // value will be replaced with "sensitive". 665 func (s DeleteEndpointInput) GoString() string { 666 return s.String() 667 } 668 669 // Validate inspects the fields of the type to determine if they are valid. 670 func (s *DeleteEndpointInput) Validate() error { 671 invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} 672 if s.EndpointId == nil { 673 invalidParams.Add(request.NewErrParamRequired("EndpointId")) 674 } 675 if s.OutpostId == nil { 676 invalidParams.Add(request.NewErrParamRequired("OutpostId")) 677 } 678 679 if invalidParams.Len() > 0 { 680 return invalidParams 681 } 682 return nil 683 } 684 685 // SetEndpointId sets the EndpointId field's value. 686 func (s *DeleteEndpointInput) SetEndpointId(v string) *DeleteEndpointInput { 687 s.EndpointId = &v 688 return s 689 } 690 691 // SetOutpostId sets the OutpostId field's value. 692 func (s *DeleteEndpointInput) SetOutpostId(v string) *DeleteEndpointInput { 693 s.OutpostId = &v 694 return s 695 } 696 697 type DeleteEndpointOutput struct { 698 _ struct{} `type:"structure" nopayload:"true"` 699 } 700 701 // String returns the string representation. 702 // 703 // API parameter values that are decorated as "sensitive" in the API will not 704 // be included in the string output. The member name will be present, but the 705 // value will be replaced with "sensitive". 706 func (s DeleteEndpointOutput) String() string { 707 return awsutil.Prettify(s) 708 } 709 710 // GoString returns the string representation. 711 // 712 // API parameter values that are decorated as "sensitive" in the API will not 713 // be included in the string output. The member name will be present, but the 714 // value will be replaced with "sensitive". 715 func (s DeleteEndpointOutput) GoString() string { 716 return s.String() 717 } 718 719 // Amazon S3 on Outposts Access Points simplify managing data access at scale 720 // for shared datasets in S3 on Outposts. S3 on Outposts uses endpoints to connect 721 // to Outposts buckets so that you can perform actions within your virtual private 722 // cloud (VPC). For more information, see Accessing S3 on Outposts using VPC 723 // only access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/AccessingS3Outposts.html). 724 type Endpoint struct { 725 _ struct{} `type:"structure"` 726 727 AccessType *string `type:"string" enum:"EndpointAccessType"` 728 729 // The VPC CIDR committed by this endpoint. 730 CidrBlock *string `type:"string"` 731 732 // The time the endpoint was created. 733 CreationTime *time.Time `type:"timestamp"` 734 735 // The ID of the customer-owned IPv4 pool used for the endpoint. 736 CustomerOwnedIpv4Pool *string `type:"string"` 737 738 // The Amazon Resource Name (ARN) of the endpoint. 739 EndpointArn *string `type:"string"` 740 741 // The network interface of the endpoint. 742 NetworkInterfaces []*NetworkInterface `type:"list"` 743 744 // The ID of the AWS Outposts. 745 OutpostsId *string `type:"string"` 746 747 // The ID of the security group used for the endpoint. 748 SecurityGroupId *string `type:"string"` 749 750 // The status of the endpoint. 751 Status *string `type:"string" enum:"EndpointStatus"` 752 753 // The ID of the subnet used for the endpoint. 754 SubnetId *string `type:"string"` 755 756 // The ID of the VPC used for the endpoint. 757 VpcId *string `type:"string"` 758 } 759 760 // String returns the string representation. 761 // 762 // API parameter values that are decorated as "sensitive" in the API will not 763 // be included in the string output. The member name will be present, but the 764 // value will be replaced with "sensitive". 765 func (s Endpoint) String() string { 766 return awsutil.Prettify(s) 767 } 768 769 // GoString returns the string representation. 770 // 771 // API parameter values that are decorated as "sensitive" in the API will not 772 // be included in the string output. The member name will be present, but the 773 // value will be replaced with "sensitive". 774 func (s Endpoint) GoString() string { 775 return s.String() 776 } 777 778 // SetAccessType sets the AccessType field's value. 779 func (s *Endpoint) SetAccessType(v string) *Endpoint { 780 s.AccessType = &v 781 return s 782 } 783 784 // SetCidrBlock sets the CidrBlock field's value. 785 func (s *Endpoint) SetCidrBlock(v string) *Endpoint { 786 s.CidrBlock = &v 787 return s 788 } 789 790 // SetCreationTime sets the CreationTime field's value. 791 func (s *Endpoint) SetCreationTime(v time.Time) *Endpoint { 792 s.CreationTime = &v 793 return s 794 } 795 796 // SetCustomerOwnedIpv4Pool sets the CustomerOwnedIpv4Pool field's value. 797 func (s *Endpoint) SetCustomerOwnedIpv4Pool(v string) *Endpoint { 798 s.CustomerOwnedIpv4Pool = &v 799 return s 800 } 801 802 // SetEndpointArn sets the EndpointArn field's value. 803 func (s *Endpoint) SetEndpointArn(v string) *Endpoint { 804 s.EndpointArn = &v 805 return s 806 } 807 808 // SetNetworkInterfaces sets the NetworkInterfaces field's value. 809 func (s *Endpoint) SetNetworkInterfaces(v []*NetworkInterface) *Endpoint { 810 s.NetworkInterfaces = v 811 return s 812 } 813 814 // SetOutpostsId sets the OutpostsId field's value. 815 func (s *Endpoint) SetOutpostsId(v string) *Endpoint { 816 s.OutpostsId = &v 817 return s 818 } 819 820 // SetSecurityGroupId sets the SecurityGroupId field's value. 821 func (s *Endpoint) SetSecurityGroupId(v string) *Endpoint { 822 s.SecurityGroupId = &v 823 return s 824 } 825 826 // SetStatus sets the Status field's value. 827 func (s *Endpoint) SetStatus(v string) *Endpoint { 828 s.Status = &v 829 return s 830 } 831 832 // SetSubnetId sets the SubnetId field's value. 833 func (s *Endpoint) SetSubnetId(v string) *Endpoint { 834 s.SubnetId = &v 835 return s 836 } 837 838 // SetVpcId sets the VpcId field's value. 839 func (s *Endpoint) SetVpcId(v string) *Endpoint { 840 s.VpcId = &v 841 return s 842 } 843 844 // There was an exception with the internal server. 845 type InternalServerException struct { 846 _ struct{} `type:"structure"` 847 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 848 849 Message_ *string `locationName:"Message" type:"string"` 850 } 851 852 // String returns the string representation. 853 // 854 // API parameter values that are decorated as "sensitive" in the API will not 855 // be included in the string output. The member name will be present, but the 856 // value will be replaced with "sensitive". 857 func (s InternalServerException) String() string { 858 return awsutil.Prettify(s) 859 } 860 861 // GoString returns the string representation. 862 // 863 // API parameter values that are decorated as "sensitive" in the API will not 864 // be included in the string output. The member name will be present, but the 865 // value will be replaced with "sensitive". 866 func (s InternalServerException) GoString() string { 867 return s.String() 868 } 869 870 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 871 return &InternalServerException{ 872 RespMetadata: v, 873 } 874 } 875 876 // Code returns the exception type name. 877 func (s *InternalServerException) Code() string { 878 return "InternalServerException" 879 } 880 881 // Message returns the exception's message. 882 func (s *InternalServerException) Message() string { 883 if s.Message_ != nil { 884 return *s.Message_ 885 } 886 return "" 887 } 888 889 // OrigErr always returns nil, satisfies awserr.Error interface. 890 func (s *InternalServerException) OrigErr() error { 891 return nil 892 } 893 894 func (s *InternalServerException) Error() string { 895 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 896 } 897 898 // Status code returns the HTTP status code for the request's response error. 899 func (s *InternalServerException) StatusCode() int { 900 return s.RespMetadata.StatusCode 901 } 902 903 // RequestID returns the service's response RequestID for request. 904 func (s *InternalServerException) RequestID() string { 905 return s.RespMetadata.RequestID 906 } 907 908 type ListEndpointsInput struct { 909 _ struct{} `type:"structure" nopayload:"true"` 910 911 // The max number of endpoints that can be returned on the request. 912 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 913 914 // The next endpoint requested in the list. 915 NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"` 916 } 917 918 // String returns the string representation. 919 // 920 // API parameter values that are decorated as "sensitive" in the API will not 921 // be included in the string output. The member name will be present, but the 922 // value will be replaced with "sensitive". 923 func (s ListEndpointsInput) String() string { 924 return awsutil.Prettify(s) 925 } 926 927 // GoString returns the string representation. 928 // 929 // API parameter values that are decorated as "sensitive" in the API will not 930 // be included in the string output. The member name will be present, but the 931 // value will be replaced with "sensitive". 932 func (s ListEndpointsInput) GoString() string { 933 return s.String() 934 } 935 936 // Validate inspects the fields of the type to determine if they are valid. 937 func (s *ListEndpointsInput) Validate() error { 938 invalidParams := request.ErrInvalidParams{Context: "ListEndpointsInput"} 939 if s.NextToken != nil && len(*s.NextToken) < 1 { 940 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 941 } 942 943 if invalidParams.Len() > 0 { 944 return invalidParams 945 } 946 return nil 947 } 948 949 // SetMaxResults sets the MaxResults field's value. 950 func (s *ListEndpointsInput) SetMaxResults(v int64) *ListEndpointsInput { 951 s.MaxResults = &v 952 return s 953 } 954 955 // SetNextToken sets the NextToken field's value. 956 func (s *ListEndpointsInput) SetNextToken(v string) *ListEndpointsInput { 957 s.NextToken = &v 958 return s 959 } 960 961 type ListEndpointsOutput struct { 962 _ struct{} `type:"structure"` 963 964 // Returns an array of endpoints associated with AWS Outposts. 965 Endpoints []*Endpoint `type:"list"` 966 967 // The next endpoint returned in the list. 968 NextToken *string `min:"1" type:"string"` 969 } 970 971 // String returns the string representation. 972 // 973 // API parameter values that are decorated as "sensitive" in the API will not 974 // be included in the string output. The member name will be present, but the 975 // value will be replaced with "sensitive". 976 func (s ListEndpointsOutput) String() string { 977 return awsutil.Prettify(s) 978 } 979 980 // GoString returns the string representation. 981 // 982 // API parameter values that are decorated as "sensitive" in the API will not 983 // be included in the string output. The member name will be present, but the 984 // value will be replaced with "sensitive". 985 func (s ListEndpointsOutput) GoString() string { 986 return s.String() 987 } 988 989 // SetEndpoints sets the Endpoints field's value. 990 func (s *ListEndpointsOutput) SetEndpoints(v []*Endpoint) *ListEndpointsOutput { 991 s.Endpoints = v 992 return s 993 } 994 995 // SetNextToken sets the NextToken field's value. 996 func (s *ListEndpointsOutput) SetNextToken(v string) *ListEndpointsOutput { 997 s.NextToken = &v 998 return s 999 } 1000 1001 // The container for the network interface. 1002 type NetworkInterface struct { 1003 _ struct{} `type:"structure"` 1004 1005 // The ID for the network interface. 1006 NetworkInterfaceId *string `type:"string"` 1007 } 1008 1009 // String returns the string representation. 1010 // 1011 // API parameter values that are decorated as "sensitive" in the API will not 1012 // be included in the string output. The member name will be present, but the 1013 // value will be replaced with "sensitive". 1014 func (s NetworkInterface) String() string { 1015 return awsutil.Prettify(s) 1016 } 1017 1018 // GoString returns the string representation. 1019 // 1020 // API parameter values that are decorated as "sensitive" in the API will not 1021 // be included in the string output. The member name will be present, but the 1022 // value will be replaced with "sensitive". 1023 func (s NetworkInterface) GoString() string { 1024 return s.String() 1025 } 1026 1027 // SetNetworkInterfaceId sets the NetworkInterfaceId field's value. 1028 func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { 1029 s.NetworkInterfaceId = &v 1030 return s 1031 } 1032 1033 // The requested resource was not found. 1034 type ResourceNotFoundException struct { 1035 _ struct{} `type:"structure"` 1036 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1037 1038 Message_ *string `locationName:"Message" type:"string"` 1039 } 1040 1041 // String returns the string representation. 1042 // 1043 // API parameter values that are decorated as "sensitive" in the API will not 1044 // be included in the string output. The member name will be present, but the 1045 // value will be replaced with "sensitive". 1046 func (s ResourceNotFoundException) String() string { 1047 return awsutil.Prettify(s) 1048 } 1049 1050 // GoString returns the string representation. 1051 // 1052 // API parameter values that are decorated as "sensitive" in the API will not 1053 // be included in the string output. The member name will be present, but the 1054 // value will be replaced with "sensitive". 1055 func (s ResourceNotFoundException) GoString() string { 1056 return s.String() 1057 } 1058 1059 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 1060 return &ResourceNotFoundException{ 1061 RespMetadata: v, 1062 } 1063 } 1064 1065 // Code returns the exception type name. 1066 func (s *ResourceNotFoundException) Code() string { 1067 return "ResourceNotFoundException" 1068 } 1069 1070 // Message returns the exception's message. 1071 func (s *ResourceNotFoundException) Message() string { 1072 if s.Message_ != nil { 1073 return *s.Message_ 1074 } 1075 return "" 1076 } 1077 1078 // OrigErr always returns nil, satisfies awserr.Error interface. 1079 func (s *ResourceNotFoundException) OrigErr() error { 1080 return nil 1081 } 1082 1083 func (s *ResourceNotFoundException) Error() string { 1084 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1085 } 1086 1087 // Status code returns the HTTP status code for the request's response error. 1088 func (s *ResourceNotFoundException) StatusCode() int { 1089 return s.RespMetadata.StatusCode 1090 } 1091 1092 // RequestID returns the service's response RequestID for request. 1093 func (s *ResourceNotFoundException) RequestID() string { 1094 return s.RespMetadata.RequestID 1095 } 1096 1097 // There was an exception validating this data. 1098 type ValidationException struct { 1099 _ struct{} `type:"structure"` 1100 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1101 1102 Message_ *string `locationName:"Message" type:"string"` 1103 } 1104 1105 // String returns the string representation. 1106 // 1107 // API parameter values that are decorated as "sensitive" in the API will not 1108 // be included in the string output. The member name will be present, but the 1109 // value will be replaced with "sensitive". 1110 func (s ValidationException) String() string { 1111 return awsutil.Prettify(s) 1112 } 1113 1114 // GoString returns the string representation. 1115 // 1116 // API parameter values that are decorated as "sensitive" in the API will not 1117 // be included in the string output. The member name will be present, but the 1118 // value will be replaced with "sensitive". 1119 func (s ValidationException) GoString() string { 1120 return s.String() 1121 } 1122 1123 func newErrorValidationException(v protocol.ResponseMetadata) error { 1124 return &ValidationException{ 1125 RespMetadata: v, 1126 } 1127 } 1128 1129 // Code returns the exception type name. 1130 func (s *ValidationException) Code() string { 1131 return "ValidationException" 1132 } 1133 1134 // Message returns the exception's message. 1135 func (s *ValidationException) Message() string { 1136 if s.Message_ != nil { 1137 return *s.Message_ 1138 } 1139 return "" 1140 } 1141 1142 // OrigErr always returns nil, satisfies awserr.Error interface. 1143 func (s *ValidationException) OrigErr() error { 1144 return nil 1145 } 1146 1147 func (s *ValidationException) Error() string { 1148 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1149 } 1150 1151 // Status code returns the HTTP status code for the request's response error. 1152 func (s *ValidationException) StatusCode() int { 1153 return s.RespMetadata.StatusCode 1154 } 1155 1156 // RequestID returns the service's response RequestID for request. 1157 func (s *ValidationException) RequestID() string { 1158 return s.RespMetadata.RequestID 1159 } 1160 1161 const ( 1162 // EndpointAccessTypePrivate is a EndpointAccessType enum value 1163 EndpointAccessTypePrivate = "Private" 1164 1165 // EndpointAccessTypeCustomerOwnedIp is a EndpointAccessType enum value 1166 EndpointAccessTypeCustomerOwnedIp = "CustomerOwnedIp" 1167 ) 1168 1169 // EndpointAccessType_Values returns all elements of the EndpointAccessType enum 1170 func EndpointAccessType_Values() []string { 1171 return []string{ 1172 EndpointAccessTypePrivate, 1173 EndpointAccessTypeCustomerOwnedIp, 1174 } 1175 } 1176 1177 const ( 1178 // EndpointStatusPending is a EndpointStatus enum value 1179 EndpointStatusPending = "Pending" 1180 1181 // EndpointStatusAvailable is a EndpointStatus enum value 1182 EndpointStatusAvailable = "Available" 1183 1184 // EndpointStatusDeleting is a EndpointStatus enum value 1185 EndpointStatusDeleting = "Deleting" 1186 ) 1187 1188 // EndpointStatus_Values returns all elements of the EndpointStatus enum 1189 func EndpointStatus_Values() []string { 1190 return []string{ 1191 EndpointStatusPending, 1192 EndpointStatusAvailable, 1193 EndpointStatusDeleting, 1194 } 1195 }