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