Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26088 lines (22880 sloc) 905 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cognitoidentityprovider
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opAddCustomAttributes = "AddCustomAttributes"
// AddCustomAttributesRequest generates a "aws/request.Request" representing the
// client's request for the AddCustomAttributes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddCustomAttributes for more information on using the AddCustomAttributes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AddCustomAttributesRequest method.
// req, resp := client.AddCustomAttributesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AddCustomAttributes
func (c *CognitoIdentityProvider) AddCustomAttributesRequest(input *AddCustomAttributesInput) (req *request.Request, output *AddCustomAttributesOutput) {
op := &request.Operation{
Name: opAddCustomAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddCustomAttributesInput{}
}
output = &AddCustomAttributesOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AddCustomAttributes API operation for Amazon Cognito Identity Provider.
//
// Adds additional user attributes to the user pool schema.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AddCustomAttributes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserImportInProgressException "UserImportInProgressException"
// This exception is thrown when you are trying to modify a user pool while
// a user import job is in progress for that pool.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AddCustomAttributes
func (c *CognitoIdentityProvider) AddCustomAttributes(input *AddCustomAttributesInput) (*AddCustomAttributesOutput, error) {
req, out := c.AddCustomAttributesRequest(input)
return out, req.Send()
}
// AddCustomAttributesWithContext is the same as AddCustomAttributes with the addition of
// the ability to pass a context and additional request options.
//
// See AddCustomAttributes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AddCustomAttributesWithContext(ctx aws.Context, input *AddCustomAttributesInput, opts ...request.Option) (*AddCustomAttributesOutput, error) {
req, out := c.AddCustomAttributesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminAddUserToGroup = "AdminAddUserToGroup"
// AdminAddUserToGroupRequest generates a "aws/request.Request" representing the
// client's request for the AdminAddUserToGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminAddUserToGroup for more information on using the AdminAddUserToGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminAddUserToGroupRequest method.
// req, resp := client.AdminAddUserToGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminAddUserToGroup
func (c *CognitoIdentityProvider) AdminAddUserToGroupRequest(input *AdminAddUserToGroupInput) (req *request.Request, output *AdminAddUserToGroupOutput) {
op := &request.Operation{
Name: opAdminAddUserToGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminAddUserToGroupInput{}
}
output = &AdminAddUserToGroupOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminAddUserToGroup API operation for Amazon Cognito Identity Provider.
//
// Adds the specified user to the specified group.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminAddUserToGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminAddUserToGroup
func (c *CognitoIdentityProvider) AdminAddUserToGroup(input *AdminAddUserToGroupInput) (*AdminAddUserToGroupOutput, error) {
req, out := c.AdminAddUserToGroupRequest(input)
return out, req.Send()
}
// AdminAddUserToGroupWithContext is the same as AdminAddUserToGroup with the addition of
// the ability to pass a context and additional request options.
//
// See AdminAddUserToGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminAddUserToGroupWithContext(ctx aws.Context, input *AdminAddUserToGroupInput, opts ...request.Option) (*AdminAddUserToGroupOutput, error) {
req, out := c.AdminAddUserToGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminConfirmSignUp = "AdminConfirmSignUp"
// AdminConfirmSignUpRequest generates a "aws/request.Request" representing the
// client's request for the AdminConfirmSignUp operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminConfirmSignUp for more information on using the AdminConfirmSignUp
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminConfirmSignUpRequest method.
// req, resp := client.AdminConfirmSignUpRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminConfirmSignUp
func (c *CognitoIdentityProvider) AdminConfirmSignUpRequest(input *AdminConfirmSignUpInput) (req *request.Request, output *AdminConfirmSignUpOutput) {
op := &request.Operation{
Name: opAdminConfirmSignUp,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminConfirmSignUpInput{}
}
output = &AdminConfirmSignUpOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminConfirmSignUp API operation for Amazon Cognito Identity Provider.
//
// Confirms user registration as an admin without using a confirmation code.
// Works on any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminConfirmSignUp for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"
// This exception is thrown when the Amazon Cognito service encounters a user
// validation exception with the AWS Lambda service.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeTooManyFailedAttemptsException "TooManyFailedAttemptsException"
// This exception is thrown when the user has made too many failed attempts
// for a given action (e.g., sign in).
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// This exception is thrown when a user exceeds the limit for a requested AWS
// resource.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminConfirmSignUp
func (c *CognitoIdentityProvider) AdminConfirmSignUp(input *AdminConfirmSignUpInput) (*AdminConfirmSignUpOutput, error) {
req, out := c.AdminConfirmSignUpRequest(input)
return out, req.Send()
}
// AdminConfirmSignUpWithContext is the same as AdminConfirmSignUp with the addition of
// the ability to pass a context and additional request options.
//
// See AdminConfirmSignUp for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminConfirmSignUpWithContext(ctx aws.Context, input *AdminConfirmSignUpInput, opts ...request.Option) (*AdminConfirmSignUpOutput, error) {
req, out := c.AdminConfirmSignUpRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminCreateUser = "AdminCreateUser"
// AdminCreateUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminCreateUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminCreateUser for more information on using the AdminCreateUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminCreateUserRequest method.
// req, resp := client.AdminCreateUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminCreateUser
func (c *CognitoIdentityProvider) AdminCreateUserRequest(input *AdminCreateUserInput) (req *request.Request, output *AdminCreateUserOutput) {
op := &request.Operation{
Name: opAdminCreateUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminCreateUserInput{}
}
output = &AdminCreateUserOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminCreateUser API operation for Amazon Cognito Identity Provider.
//
// Creates a new user in the specified user pool.
//
// If MessageAction is not set, the default is to send a welcome message via
// email or phone (SMS).
//
// This message is based on a template that you configured in your call to or
// . This template includes your custom sign-up instructions and placeholders
// for user name and temporary password.
//
// Alternatively, you can call AdminCreateUser with “SUPPRESS” for the MessageAction
// parameter, and Amazon Cognito will not send any email.
//
// In either case, the user will be in the FORCE_CHANGE_PASSWORD state until
// they sign in and change their password.
//
// AdminCreateUser requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminCreateUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUsernameExistsException "UsernameExistsException"
// This exception is thrown when Amazon Cognito encounters a user name that
// already exists in the user pool.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// password.
//
// * ErrCodeCodeDeliveryFailureException "CodeDeliveryFailureException"
// This exception is thrown when a verification code fails to deliver successfully.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"
// This exception is thrown when the Amazon Cognito service encounters a user
// validation exception with the AWS Lambda service.
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodePreconditionNotMetException "PreconditionNotMetException"
// This exception is thrown when a precondition is not met.
//
// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException"
// This exception is returned when the role provided for SMS configuration does
// not have permission to publish using Amazon SNS.
//
// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException"
// This exception is thrown when the trust relationship is invalid for the role
// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com
// or the external ID provided in the role does not match what is provided in
// the SMS configuration for the user pool.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUnsupportedUserStateException "UnsupportedUserStateException"
// The request failed because the user is in an unsupported state.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminCreateUser
func (c *CognitoIdentityProvider) AdminCreateUser(input *AdminCreateUserInput) (*AdminCreateUserOutput, error) {
req, out := c.AdminCreateUserRequest(input)
return out, req.Send()
}
// AdminCreateUserWithContext is the same as AdminCreateUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminCreateUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminCreateUserWithContext(ctx aws.Context, input *AdminCreateUserInput, opts ...request.Option) (*AdminCreateUserOutput, error) {
req, out := c.AdminCreateUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminDeleteUser = "AdminDeleteUser"
// AdminDeleteUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminDeleteUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminDeleteUser for more information on using the AdminDeleteUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminDeleteUserRequest method.
// req, resp := client.AdminDeleteUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUser
func (c *CognitoIdentityProvider) AdminDeleteUserRequest(input *AdminDeleteUserInput) (req *request.Request, output *AdminDeleteUserOutput) {
op := &request.Operation{
Name: opAdminDeleteUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminDeleteUserInput{}
}
output = &AdminDeleteUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminDeleteUser API operation for Amazon Cognito Identity Provider.
//
// Deletes a user as an administrator. Works on any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminDeleteUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUser
func (c *CognitoIdentityProvider) AdminDeleteUser(input *AdminDeleteUserInput) (*AdminDeleteUserOutput, error) {
req, out := c.AdminDeleteUserRequest(input)
return out, req.Send()
}
// AdminDeleteUserWithContext is the same as AdminDeleteUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminDeleteUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminDeleteUserWithContext(ctx aws.Context, input *AdminDeleteUserInput, opts ...request.Option) (*AdminDeleteUserOutput, error) {
req, out := c.AdminDeleteUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminDeleteUserAttributes = "AdminDeleteUserAttributes"
// AdminDeleteUserAttributesRequest generates a "aws/request.Request" representing the
// client's request for the AdminDeleteUserAttributes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminDeleteUserAttributes for more information on using the AdminDeleteUserAttributes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminDeleteUserAttributesRequest method.
// req, resp := client.AdminDeleteUserAttributesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUserAttributes
func (c *CognitoIdentityProvider) AdminDeleteUserAttributesRequest(input *AdminDeleteUserAttributesInput) (req *request.Request, output *AdminDeleteUserAttributesOutput) {
op := &request.Operation{
Name: opAdminDeleteUserAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminDeleteUserAttributesInput{}
}
output = &AdminDeleteUserAttributesOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminDeleteUserAttributes API operation for Amazon Cognito Identity Provider.
//
// Deletes the user attributes in a user pool as an administrator. Works on
// any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminDeleteUserAttributes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDeleteUserAttributes
func (c *CognitoIdentityProvider) AdminDeleteUserAttributes(input *AdminDeleteUserAttributesInput) (*AdminDeleteUserAttributesOutput, error) {
req, out := c.AdminDeleteUserAttributesRequest(input)
return out, req.Send()
}
// AdminDeleteUserAttributesWithContext is the same as AdminDeleteUserAttributes with the addition of
// the ability to pass a context and additional request options.
//
// See AdminDeleteUserAttributes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminDeleteUserAttributesWithContext(ctx aws.Context, input *AdminDeleteUserAttributesInput, opts ...request.Option) (*AdminDeleteUserAttributesOutput, error) {
req, out := c.AdminDeleteUserAttributesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminDisableProviderForUser = "AdminDisableProviderForUser"
// AdminDisableProviderForUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminDisableProviderForUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminDisableProviderForUser for more information on using the AdminDisableProviderForUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminDisableProviderForUserRequest method.
// req, resp := client.AdminDisableProviderForUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableProviderForUser
func (c *CognitoIdentityProvider) AdminDisableProviderForUserRequest(input *AdminDisableProviderForUserInput) (req *request.Request, output *AdminDisableProviderForUserOutput) {
op := &request.Operation{
Name: opAdminDisableProviderForUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminDisableProviderForUserInput{}
}
output = &AdminDisableProviderForUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminDisableProviderForUser API operation for Amazon Cognito Identity Provider.
//
// Disables the user from signing in with the specified external (SAML or social)
// identity provider. If the user to disable is a Cognito User Pools native
// username + password user, they are not permitted to use their password to
// sign-in. If the user to disable is a linked external IdP user, any link between
// that user and an existing user is removed. The next time the external user
// (no longer attached to the previously linked DestinationUser) signs in, they
// must create a new user account. See .
//
// This action is enabled only for admin access and requires developer credentials.
//
// The ProviderName must match the value specified when creating an IdP for
// the pool.
//
// To disable a native username + password user, the ProviderName value must
// be Cognito and the ProviderAttributeName must be Cognito_Subject, with the
// ProviderAttributeValue being the name that is used in the user pool for the
// user.
//
// The ProviderAttributeName must always be Cognito_Subject for social identity
// providers. The ProviderAttributeValue must always be the exact subject that
// was used when the user was originally linked as a source user.
//
// For de-linking a SAML identity, there are two scenarios. If the linked identity
// has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue
// must be the same values that were used for the SourceUser when the identities
// were originally linked in the call. (If the linking was done with ProviderAttributeName
// set to Cognito_Subject, the same applies here). However, if the user has
// already signed in, the ProviderAttributeName must be Cognito_Subject and
// ProviderAttributeValue must be the subject of the SAML assertion.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminDisableProviderForUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeAliasExistsException "AliasExistsException"
// This exception is thrown when a user tries to confirm the account with an
// email or phone number that has already been supplied as an alias from a different
// account. This exception tells user that an account with this email or phone
// already exists.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableProviderForUser
func (c *CognitoIdentityProvider) AdminDisableProviderForUser(input *AdminDisableProviderForUserInput) (*AdminDisableProviderForUserOutput, error) {
req, out := c.AdminDisableProviderForUserRequest(input)
return out, req.Send()
}
// AdminDisableProviderForUserWithContext is the same as AdminDisableProviderForUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminDisableProviderForUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminDisableProviderForUserWithContext(ctx aws.Context, input *AdminDisableProviderForUserInput, opts ...request.Option) (*AdminDisableProviderForUserOutput, error) {
req, out := c.AdminDisableProviderForUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminDisableUser = "AdminDisableUser"
// AdminDisableUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminDisableUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminDisableUser for more information on using the AdminDisableUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminDisableUserRequest method.
// req, resp := client.AdminDisableUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableUser
func (c *CognitoIdentityProvider) AdminDisableUserRequest(input *AdminDisableUserInput) (req *request.Request, output *AdminDisableUserOutput) {
op := &request.Operation{
Name: opAdminDisableUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminDisableUserInput{}
}
output = &AdminDisableUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminDisableUser API operation for Amazon Cognito Identity Provider.
//
// Disables the specified user as an administrator. Works on any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminDisableUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminDisableUser
func (c *CognitoIdentityProvider) AdminDisableUser(input *AdminDisableUserInput) (*AdminDisableUserOutput, error) {
req, out := c.AdminDisableUserRequest(input)
return out, req.Send()
}
// AdminDisableUserWithContext is the same as AdminDisableUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminDisableUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminDisableUserWithContext(ctx aws.Context, input *AdminDisableUserInput, opts ...request.Option) (*AdminDisableUserOutput, error) {
req, out := c.AdminDisableUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminEnableUser = "AdminEnableUser"
// AdminEnableUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminEnableUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminEnableUser for more information on using the AdminEnableUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminEnableUserRequest method.
// req, resp := client.AdminEnableUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminEnableUser
func (c *CognitoIdentityProvider) AdminEnableUserRequest(input *AdminEnableUserInput) (req *request.Request, output *AdminEnableUserOutput) {
op := &request.Operation{
Name: opAdminEnableUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminEnableUserInput{}
}
output = &AdminEnableUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminEnableUser API operation for Amazon Cognito Identity Provider.
//
// Enables the specified user as an administrator. Works on any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminEnableUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminEnableUser
func (c *CognitoIdentityProvider) AdminEnableUser(input *AdminEnableUserInput) (*AdminEnableUserOutput, error) {
req, out := c.AdminEnableUserRequest(input)
return out, req.Send()
}
// AdminEnableUserWithContext is the same as AdminEnableUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminEnableUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminEnableUserWithContext(ctx aws.Context, input *AdminEnableUserInput, opts ...request.Option) (*AdminEnableUserOutput, error) {
req, out := c.AdminEnableUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminForgetDevice = "AdminForgetDevice"
// AdminForgetDeviceRequest generates a "aws/request.Request" representing the
// client's request for the AdminForgetDevice operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminForgetDevice for more information on using the AdminForgetDevice
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminForgetDeviceRequest method.
// req, resp := client.AdminForgetDeviceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminForgetDevice
func (c *CognitoIdentityProvider) AdminForgetDeviceRequest(input *AdminForgetDeviceInput) (req *request.Request, output *AdminForgetDeviceOutput) {
op := &request.Operation{
Name: opAdminForgetDevice,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminForgetDeviceInput{}
}
output = &AdminForgetDeviceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminForgetDevice API operation for Amazon Cognito Identity Provider.
//
// Forgets the device, as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminForgetDevice for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminForgetDevice
func (c *CognitoIdentityProvider) AdminForgetDevice(input *AdminForgetDeviceInput) (*AdminForgetDeviceOutput, error) {
req, out := c.AdminForgetDeviceRequest(input)
return out, req.Send()
}
// AdminForgetDeviceWithContext is the same as AdminForgetDevice with the addition of
// the ability to pass a context and additional request options.
//
// See AdminForgetDevice for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminForgetDeviceWithContext(ctx aws.Context, input *AdminForgetDeviceInput, opts ...request.Option) (*AdminForgetDeviceOutput, error) {
req, out := c.AdminForgetDeviceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminGetDevice = "AdminGetDevice"
// AdminGetDeviceRequest generates a "aws/request.Request" representing the
// client's request for the AdminGetDevice operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminGetDevice for more information on using the AdminGetDevice
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminGetDeviceRequest method.
// req, resp := client.AdminGetDeviceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetDevice
func (c *CognitoIdentityProvider) AdminGetDeviceRequest(input *AdminGetDeviceInput) (req *request.Request, output *AdminGetDeviceOutput) {
op := &request.Operation{
Name: opAdminGetDevice,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminGetDeviceInput{}
}
output = &AdminGetDeviceOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminGetDevice API operation for Amazon Cognito Identity Provider.
//
// Gets the device, as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminGetDevice for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetDevice
func (c *CognitoIdentityProvider) AdminGetDevice(input *AdminGetDeviceInput) (*AdminGetDeviceOutput, error) {
req, out := c.AdminGetDeviceRequest(input)
return out, req.Send()
}
// AdminGetDeviceWithContext is the same as AdminGetDevice with the addition of
// the ability to pass a context and additional request options.
//
// See AdminGetDevice for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminGetDeviceWithContext(ctx aws.Context, input *AdminGetDeviceInput, opts ...request.Option) (*AdminGetDeviceOutput, error) {
req, out := c.AdminGetDeviceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminGetUser = "AdminGetUser"
// AdminGetUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminGetUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminGetUser for more information on using the AdminGetUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminGetUserRequest method.
// req, resp := client.AdminGetUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUserRequest(input *AdminGetUserInput) (req *request.Request, output *AdminGetUserOutput) {
op := &request.Operation{
Name: opAdminGetUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminGetUserInput{}
}
output = &AdminGetUserOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminGetUser API operation for Amazon Cognito Identity Provider.
//
// Gets the specified user by user name in a user pool as an administrator.
// Works on any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminGetUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminGetUser
func (c *CognitoIdentityProvider) AdminGetUser(input *AdminGetUserInput) (*AdminGetUserOutput, error) {
req, out := c.AdminGetUserRequest(input)
return out, req.Send()
}
// AdminGetUserWithContext is the same as AdminGetUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminGetUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminGetUserWithContext(ctx aws.Context, input *AdminGetUserInput, opts ...request.Option) (*AdminGetUserOutput, error) {
req, out := c.AdminGetUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminInitiateAuth = "AdminInitiateAuth"
// AdminInitiateAuthRequest generates a "aws/request.Request" representing the
// client's request for the AdminInitiateAuth operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminInitiateAuth for more information on using the AdminInitiateAuth
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminInitiateAuthRequest method.
// req, resp := client.AdminInitiateAuthRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminInitiateAuth
func (c *CognitoIdentityProvider) AdminInitiateAuthRequest(input *AdminInitiateAuthInput) (req *request.Request, output *AdminInitiateAuthOutput) {
op := &request.Operation{
Name: opAdminInitiateAuth,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminInitiateAuthInput{}
}
output = &AdminInitiateAuthOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminInitiateAuth API operation for Amazon Cognito Identity Provider.
//
// Initiates the authentication flow, as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminInitiateAuth for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"
// This exception is thrown when the Amazon Cognito service encounters a user
// validation exception with the AWS Lambda service.
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodeMFAMethodNotFoundException "MFAMethodNotFoundException"
// This exception is thrown when Amazon Cognito cannot find a multi-factor authentication
// (MFA) method.
//
// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException"
// This exception is returned when the role provided for SMS configuration does
// not have permission to publish using Amazon SNS.
//
// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException"
// This exception is thrown when the trust relationship is invalid for the role
// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com
// or the external ID provided in the role does not match what is provided in
// the SMS configuration for the user pool.
//
// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException"
// This exception is thrown when a password reset is required.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserNotConfirmedException "UserNotConfirmedException"
// This exception is thrown when a user is not confirmed successfully.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminInitiateAuth
func (c *CognitoIdentityProvider) AdminInitiateAuth(input *AdminInitiateAuthInput) (*AdminInitiateAuthOutput, error) {
req, out := c.AdminInitiateAuthRequest(input)
return out, req.Send()
}
// AdminInitiateAuthWithContext is the same as AdminInitiateAuth with the addition of
// the ability to pass a context and additional request options.
//
// See AdminInitiateAuth for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminInitiateAuthWithContext(ctx aws.Context, input *AdminInitiateAuthInput, opts ...request.Option) (*AdminInitiateAuthOutput, error) {
req, out := c.AdminInitiateAuthRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminLinkProviderForUser = "AdminLinkProviderForUser"
// AdminLinkProviderForUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminLinkProviderForUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminLinkProviderForUser for more information on using the AdminLinkProviderForUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminLinkProviderForUserRequest method.
// req, resp := client.AdminLinkProviderForUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminLinkProviderForUser
func (c *CognitoIdentityProvider) AdminLinkProviderForUserRequest(input *AdminLinkProviderForUserInput) (req *request.Request, output *AdminLinkProviderForUserOutput) {
op := &request.Operation{
Name: opAdminLinkProviderForUser,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminLinkProviderForUserInput{}
}
output = &AdminLinkProviderForUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminLinkProviderForUser API operation for Amazon Cognito Identity Provider.
//
// Links an existing user account in a user pool (DestinationUser) to an identity
// from an external identity provider (SourceUser) based on a specified attribute
// name and value from the external identity provider. This allows you to create
// a link from the existing user account to an external federated user identity
// that has not yet been used to sign in, so that the federated user identity
// can be used to sign in as the existing user account.
//
// For example, if there is an existing user with a username and password, this
// API links that user to a federated user identity, so that when the federated
// user identity is used, the user signs in as the existing user account.
//
// Because this API allows a user with an external federated identity to sign
// in as an existing user in the user pool, it is critical that it only be used
// with external identity providers and provider attributes that have been trusted
// by the application owner.
//
// See also .
//
// This action is enabled only for admin access and requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminLinkProviderForUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeAliasExistsException "AliasExistsException"
// This exception is thrown when a user tries to confirm the account with an
// email or phone number that has already been supplied as an alias from a different
// account. This exception tells user that an account with this email or phone
// already exists.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminLinkProviderForUser
func (c *CognitoIdentityProvider) AdminLinkProviderForUser(input *AdminLinkProviderForUserInput) (*AdminLinkProviderForUserOutput, error) {
req, out := c.AdminLinkProviderForUserRequest(input)
return out, req.Send()
}
// AdminLinkProviderForUserWithContext is the same as AdminLinkProviderForUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminLinkProviderForUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminLinkProviderForUserWithContext(ctx aws.Context, input *AdminLinkProviderForUserInput, opts ...request.Option) (*AdminLinkProviderForUserOutput, error) {
req, out := c.AdminLinkProviderForUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminListDevices = "AdminListDevices"
// AdminListDevicesRequest generates a "aws/request.Request" representing the
// client's request for the AdminListDevices operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminListDevices for more information on using the AdminListDevices
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminListDevicesRequest method.
// req, resp := client.AdminListDevicesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListDevices
func (c *CognitoIdentityProvider) AdminListDevicesRequest(input *AdminListDevicesInput) (req *request.Request, output *AdminListDevicesOutput) {
op := &request.Operation{
Name: opAdminListDevices,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminListDevicesInput{}
}
output = &AdminListDevicesOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminListDevices API operation for Amazon Cognito Identity Provider.
//
// Lists devices, as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminListDevices for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListDevices
func (c *CognitoIdentityProvider) AdminListDevices(input *AdminListDevicesInput) (*AdminListDevicesOutput, error) {
req, out := c.AdminListDevicesRequest(input)
return out, req.Send()
}
// AdminListDevicesWithContext is the same as AdminListDevices with the addition of
// the ability to pass a context and additional request options.
//
// See AdminListDevices for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminListDevicesWithContext(ctx aws.Context, input *AdminListDevicesInput, opts ...request.Option) (*AdminListDevicesOutput, error) {
req, out := c.AdminListDevicesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminListGroupsForUser = "AdminListGroupsForUser"
// AdminListGroupsForUserRequest generates a "aws/request.Request" representing the
// client's request for the AdminListGroupsForUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminListGroupsForUser for more information on using the AdminListGroupsForUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminListGroupsForUserRequest method.
// req, resp := client.AdminListGroupsForUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListGroupsForUser
func (c *CognitoIdentityProvider) AdminListGroupsForUserRequest(input *AdminListGroupsForUserInput) (req *request.Request, output *AdminListGroupsForUserOutput) {
op := &request.Operation{
Name: opAdminListGroupsForUser,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &AdminListGroupsForUserInput{}
}
output = &AdminListGroupsForUserOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminListGroupsForUser API operation for Amazon Cognito Identity Provider.
//
// Lists the groups that the user belongs to.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminListGroupsForUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListGroupsForUser
func (c *CognitoIdentityProvider) AdminListGroupsForUser(input *AdminListGroupsForUserInput) (*AdminListGroupsForUserOutput, error) {
req, out := c.AdminListGroupsForUserRequest(input)
return out, req.Send()
}
// AdminListGroupsForUserWithContext is the same as AdminListGroupsForUser with the addition of
// the ability to pass a context and additional request options.
//
// See AdminListGroupsForUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminListGroupsForUserWithContext(ctx aws.Context, input *AdminListGroupsForUserInput, opts ...request.Option) (*AdminListGroupsForUserOutput, error) {
req, out := c.AdminListGroupsForUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// AdminListGroupsForUserPages iterates over the pages of a AdminListGroupsForUser operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See AdminListGroupsForUser method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a AdminListGroupsForUser operation.
// pageNum := 0
// err := client.AdminListGroupsForUserPages(params,
// func(page *cognitoidentityprovider.AdminListGroupsForUserOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *CognitoIdentityProvider) AdminListGroupsForUserPages(input *AdminListGroupsForUserInput, fn func(*AdminListGroupsForUserOutput, bool) bool) error {
return c.AdminListGroupsForUserPagesWithContext(aws.BackgroundContext(), input, fn)
}
// AdminListGroupsForUserPagesWithContext same as AdminListGroupsForUserPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminListGroupsForUserPagesWithContext(ctx aws.Context, input *AdminListGroupsForUserInput, fn func(*AdminListGroupsForUserOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *AdminListGroupsForUserInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.AdminListGroupsForUserRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*AdminListGroupsForUserOutput), !p.HasNextPage())
}
return p.Err()
}
const opAdminListUserAuthEvents = "AdminListUserAuthEvents"
// AdminListUserAuthEventsRequest generates a "aws/request.Request" representing the
// client's request for the AdminListUserAuthEvents operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminListUserAuthEvents for more information on using the AdminListUserAuthEvents
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminListUserAuthEventsRequest method.
// req, resp := client.AdminListUserAuthEventsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListUserAuthEvents
func (c *CognitoIdentityProvider) AdminListUserAuthEventsRequest(input *AdminListUserAuthEventsInput) (req *request.Request, output *AdminListUserAuthEventsOutput) {
op := &request.Operation{
Name: opAdminListUserAuthEvents,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &AdminListUserAuthEventsInput{}
}
output = &AdminListUserAuthEventsOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminListUserAuthEvents API operation for Amazon Cognito Identity Provider.
//
// Lists a history of user activity and any risks detected as part of Amazon
// Cognito advanced security.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminListUserAuthEvents for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException"
// This exception is thrown when user pool add-ons are not enabled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminListUserAuthEvents
func (c *CognitoIdentityProvider) AdminListUserAuthEvents(input *AdminListUserAuthEventsInput) (*AdminListUserAuthEventsOutput, error) {
req, out := c.AdminListUserAuthEventsRequest(input)
return out, req.Send()
}
// AdminListUserAuthEventsWithContext is the same as AdminListUserAuthEvents with the addition of
// the ability to pass a context and additional request options.
//
// See AdminListUserAuthEvents for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminListUserAuthEventsWithContext(ctx aws.Context, input *AdminListUserAuthEventsInput, opts ...request.Option) (*AdminListUserAuthEventsOutput, error) {
req, out := c.AdminListUserAuthEventsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// AdminListUserAuthEventsPages iterates over the pages of a AdminListUserAuthEvents operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See AdminListUserAuthEvents method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a AdminListUserAuthEvents operation.
// pageNum := 0
// err := client.AdminListUserAuthEventsPages(params,
// func(page *cognitoidentityprovider.AdminListUserAuthEventsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *CognitoIdentityProvider) AdminListUserAuthEventsPages(input *AdminListUserAuthEventsInput, fn func(*AdminListUserAuthEventsOutput, bool) bool) error {
return c.AdminListUserAuthEventsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// AdminListUserAuthEventsPagesWithContext same as AdminListUserAuthEventsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminListUserAuthEventsPagesWithContext(ctx aws.Context, input *AdminListUserAuthEventsInput, fn func(*AdminListUserAuthEventsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *AdminListUserAuthEventsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.AdminListUserAuthEventsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*AdminListUserAuthEventsOutput), !p.HasNextPage())
}
return p.Err()
}
const opAdminRemoveUserFromGroup = "AdminRemoveUserFromGroup"
// AdminRemoveUserFromGroupRequest generates a "aws/request.Request" representing the
// client's request for the AdminRemoveUserFromGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminRemoveUserFromGroup for more information on using the AdminRemoveUserFromGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminRemoveUserFromGroupRequest method.
// req, resp := client.AdminRemoveUserFromGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRemoveUserFromGroup
func (c *CognitoIdentityProvider) AdminRemoveUserFromGroupRequest(input *AdminRemoveUserFromGroupInput) (req *request.Request, output *AdminRemoveUserFromGroupOutput) {
op := &request.Operation{
Name: opAdminRemoveUserFromGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminRemoveUserFromGroupInput{}
}
output = &AdminRemoveUserFromGroupOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminRemoveUserFromGroup API operation for Amazon Cognito Identity Provider.
//
// Removes the specified user from the specified group.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminRemoveUserFromGroup for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRemoveUserFromGroup
func (c *CognitoIdentityProvider) AdminRemoveUserFromGroup(input *AdminRemoveUserFromGroupInput) (*AdminRemoveUserFromGroupOutput, error) {
req, out := c.AdminRemoveUserFromGroupRequest(input)
return out, req.Send()
}
// AdminRemoveUserFromGroupWithContext is the same as AdminRemoveUserFromGroup with the addition of
// the ability to pass a context and additional request options.
//
// See AdminRemoveUserFromGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminRemoveUserFromGroupWithContext(ctx aws.Context, input *AdminRemoveUserFromGroupInput, opts ...request.Option) (*AdminRemoveUserFromGroupOutput, error) {
req, out := c.AdminRemoveUserFromGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminResetUserPassword = "AdminResetUserPassword"
// AdminResetUserPasswordRequest generates a "aws/request.Request" representing the
// client's request for the AdminResetUserPassword operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminResetUserPassword for more information on using the AdminResetUserPassword
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminResetUserPasswordRequest method.
// req, resp := client.AdminResetUserPasswordRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminResetUserPassword
func (c *CognitoIdentityProvider) AdminResetUserPasswordRequest(input *AdminResetUserPasswordInput) (req *request.Request, output *AdminResetUserPasswordOutput) {
op := &request.Operation{
Name: opAdminResetUserPassword,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminResetUserPasswordInput{}
}
output = &AdminResetUserPasswordOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminResetUserPassword API operation for Amazon Cognito Identity Provider.
//
// Resets the specified user's password in a user pool as an administrator.
// Works on any user.
//
// When a developer calls this API, the current password is invalidated, so
// it must be changed. If a user tries to sign in after the API is called, the
// app will get a PasswordResetRequiredException exception back and should direct
// the user down the flow to reset the password, which is the same as the forgot
// password flow. In addition, if the user pool has phone verification selected
// and a verified phone number exists for the user, or if email verification
// is selected and a verified email exists for the user, calling this API will
// also result in sending a message to the end user with the code to change
// their password.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminResetUserPassword for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"
// This exception is thrown when the Amazon Cognito service encounters a user
// validation exception with the AWS Lambda service.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// This exception is thrown when a user exceeds the limit for a requested AWS
// resource.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException"
// This exception is returned when the role provided for SMS configuration does
// not have permission to publish using Amazon SNS.
//
// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException"
// This exception is thrown when Amazon Cognito is not allowed to use your email
// identity. HTTP status code: 400.
//
// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException"
// This exception is thrown when the trust relationship is invalid for the role
// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com
// or the external ID provided in the role does not match what is provided in
// the SMS configuration for the user pool.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminResetUserPassword
func (c *CognitoIdentityProvider) AdminResetUserPassword(input *AdminResetUserPasswordInput) (*AdminResetUserPasswordOutput, error) {
req, out := c.AdminResetUserPasswordRequest(input)
return out, req.Send()
}
// AdminResetUserPasswordWithContext is the same as AdminResetUserPassword with the addition of
// the ability to pass a context and additional request options.
//
// See AdminResetUserPassword for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminResetUserPasswordWithContext(ctx aws.Context, input *AdminResetUserPasswordInput, opts ...request.Option) (*AdminResetUserPasswordOutput, error) {
req, out := c.AdminResetUserPasswordRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminRespondToAuthChallenge = "AdminRespondToAuthChallenge"
// AdminRespondToAuthChallengeRequest generates a "aws/request.Request" representing the
// client's request for the AdminRespondToAuthChallenge operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminRespondToAuthChallenge for more information on using the AdminRespondToAuthChallenge
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminRespondToAuthChallengeRequest method.
// req, resp := client.AdminRespondToAuthChallengeRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRespondToAuthChallenge
func (c *CognitoIdentityProvider) AdminRespondToAuthChallengeRequest(input *AdminRespondToAuthChallengeInput) (req *request.Request, output *AdminRespondToAuthChallengeOutput) {
op := &request.Operation{
Name: opAdminRespondToAuthChallenge,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminRespondToAuthChallengeInput{}
}
output = &AdminRespondToAuthChallengeOutput{}
req = c.newRequest(op, input, output)
return
}
// AdminRespondToAuthChallenge API operation for Amazon Cognito Identity Provider.
//
// Responds to an authentication challenge, as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminRespondToAuthChallenge for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeCodeMismatchException "CodeMismatchException"
// This exception is thrown if the provided code does not match what the server
// was expecting.
//
// * ErrCodeExpiredCodeException "ExpiredCodeException"
// This exception is thrown if a code has expired.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// password.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"
// This exception is thrown when the Amazon Cognito service encounters a user
// validation exception with the AWS Lambda service.
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeMFAMethodNotFoundException "MFAMethodNotFoundException"
// This exception is thrown when Amazon Cognito cannot find a multi-factor authentication
// (MFA) method.
//
// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException"
// This exception is returned when the role provided for SMS configuration does
// not have permission to publish using Amazon SNS.
//
// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException"
// This exception is thrown when the trust relationship is invalid for the role
// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com
// or the external ID provided in the role does not match what is provided in
// the SMS configuration for the user pool.
//
// * ErrCodeAliasExistsException "AliasExistsException"
// This exception is thrown when a user tries to confirm the account with an
// email or phone number that has already been supplied as an alias from a different
// account. This exception tells user that an account with this email or phone
// already exists.
//
// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException"
// This exception is thrown when a password reset is required.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserNotConfirmedException "UserNotConfirmedException"
// This exception is thrown when a user is not confirmed successfully.
//
// * ErrCodeSoftwareTokenMFANotFoundException "SoftwareTokenMFANotFoundException"
// This exception is thrown when the software token TOTP multi-factor authentication
// (MFA) is not enabled for the user pool.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminRespondToAuthChallenge
func (c *CognitoIdentityProvider) AdminRespondToAuthChallenge(input *AdminRespondToAuthChallengeInput) (*AdminRespondToAuthChallengeOutput, error) {
req, out := c.AdminRespondToAuthChallengeRequest(input)
return out, req.Send()
}
// AdminRespondToAuthChallengeWithContext is the same as AdminRespondToAuthChallenge with the addition of
// the ability to pass a context and additional request options.
//
// See AdminRespondToAuthChallenge for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminRespondToAuthChallengeWithContext(ctx aws.Context, input *AdminRespondToAuthChallengeInput, opts ...request.Option) (*AdminRespondToAuthChallengeOutput, error) {
req, out := c.AdminRespondToAuthChallengeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminSetUserMFAPreference = "AdminSetUserMFAPreference"
// AdminSetUserMFAPreferenceRequest generates a "aws/request.Request" representing the
// client's request for the AdminSetUserMFAPreference operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminSetUserMFAPreference for more information on using the AdminSetUserMFAPreference
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminSetUserMFAPreferenceRequest method.
// req, resp := client.AdminSetUserMFAPreferenceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserMFAPreference
func (c *CognitoIdentityProvider) AdminSetUserMFAPreferenceRequest(input *AdminSetUserMFAPreferenceInput) (req *request.Request, output *AdminSetUserMFAPreferenceOutput) {
op := &request.Operation{
Name: opAdminSetUserMFAPreference,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminSetUserMFAPreferenceInput{}
}
output = &AdminSetUserMFAPreferenceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminSetUserMFAPreference API operation for Amazon Cognito Identity Provider.
//
// Sets the user's multi-factor authentication (MFA) preference.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminSetUserMFAPreference for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException"
// This exception is thrown when a password reset is required.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserNotConfirmedException "UserNotConfirmedException"
// This exception is thrown when a user is not confirmed successfully.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserMFAPreference
func (c *CognitoIdentityProvider) AdminSetUserMFAPreference(input *AdminSetUserMFAPreferenceInput) (*AdminSetUserMFAPreferenceOutput, error) {
req, out := c.AdminSetUserMFAPreferenceRequest(input)
return out, req.Send()
}
// AdminSetUserMFAPreferenceWithContext is the same as AdminSetUserMFAPreference with the addition of
// the ability to pass a context and additional request options.
//
// See AdminSetUserMFAPreference for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminSetUserMFAPreferenceWithContext(ctx aws.Context, input *AdminSetUserMFAPreferenceInput, opts ...request.Option) (*AdminSetUserMFAPreferenceOutput, error) {
req, out := c.AdminSetUserMFAPreferenceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminSetUserPassword = "AdminSetUserPassword"
// AdminSetUserPasswordRequest generates a "aws/request.Request" representing the
// client's request for the AdminSetUserPassword operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminSetUserPassword for more information on using the AdminSetUserPassword
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminSetUserPasswordRequest method.
// req, resp := client.AdminSetUserPasswordRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserPassword
func (c *CognitoIdentityProvider) AdminSetUserPasswordRequest(input *AdminSetUserPasswordInput) (req *request.Request, output *AdminSetUserPasswordOutput) {
op := &request.Operation{
Name: opAdminSetUserPassword,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminSetUserPasswordInput{}
}
output = &AdminSetUserPasswordOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminSetUserPassword API operation for Amazon Cognito Identity Provider.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminSetUserPassword for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// password.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserPassword
func (c *CognitoIdentityProvider) AdminSetUserPassword(input *AdminSetUserPasswordInput) (*AdminSetUserPasswordOutput, error) {
req, out := c.AdminSetUserPasswordRequest(input)
return out, req.Send()
}
// AdminSetUserPasswordWithContext is the same as AdminSetUserPassword with the addition of
// the ability to pass a context and additional request options.
//
// See AdminSetUserPassword for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminSetUserPasswordWithContext(ctx aws.Context, input *AdminSetUserPasswordInput, opts ...request.Option) (*AdminSetUserPasswordOutput, error) {
req, out := c.AdminSetUserPasswordRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminSetUserSettings = "AdminSetUserSettings"
// AdminSetUserSettingsRequest generates a "aws/request.Request" representing the
// client's request for the AdminSetUserSettings operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminSetUserSettings for more information on using the AdminSetUserSettings
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminSetUserSettingsRequest method.
// req, resp := client.AdminSetUserSettingsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserSettings
func (c *CognitoIdentityProvider) AdminSetUserSettingsRequest(input *AdminSetUserSettingsInput) (req *request.Request, output *AdminSetUserSettingsOutput) {
op := &request.Operation{
Name: opAdminSetUserSettings,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminSetUserSettingsInput{}
}
output = &AdminSetUserSettingsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminSetUserSettings API operation for Amazon Cognito Identity Provider.
//
// Sets all the user settings for a specified user name. Works on any user.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminSetUserSettings for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminSetUserSettings
func (c *CognitoIdentityProvider) AdminSetUserSettings(input *AdminSetUserSettingsInput) (*AdminSetUserSettingsOutput, error) {
req, out := c.AdminSetUserSettingsRequest(input)
return out, req.Send()
}
// AdminSetUserSettingsWithContext is the same as AdminSetUserSettings with the addition of
// the ability to pass a context and additional request options.
//
// See AdminSetUserSettings for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminSetUserSettingsWithContext(ctx aws.Context, input *AdminSetUserSettingsInput, opts ...request.Option) (*AdminSetUserSettingsOutput, error) {
req, out := c.AdminSetUserSettingsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminUpdateAuthEventFeedback = "AdminUpdateAuthEventFeedback"
// AdminUpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the
// client's request for the AdminUpdateAuthEventFeedback operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminUpdateAuthEventFeedback for more information on using the AdminUpdateAuthEventFeedback
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminUpdateAuthEventFeedbackRequest method.
// req, resp := client.AdminUpdateAuthEventFeedbackRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateAuthEventFeedback
func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedbackRequest(input *AdminUpdateAuthEventFeedbackInput) (req *request.Request, output *AdminUpdateAuthEventFeedbackOutput) {
op := &request.Operation{
Name: opAdminUpdateAuthEventFeedback,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminUpdateAuthEventFeedbackInput{}
}
output = &AdminUpdateAuthEventFeedbackOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminUpdateAuthEventFeedback API operation for Amazon Cognito Identity Provider.
//
// Provides feedback for an authentication event as to whether it was from a
// valid user. This feedback is used for improving the risk evaluation decision
// for the user pool as part of Amazon Cognito advanced security.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminUpdateAuthEventFeedback for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserPoolAddOnNotEnabledException "UserPoolAddOnNotEnabledException"
// This exception is thrown when user pool add-ons are not enabled.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateAuthEventFeedback
func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedback(input *AdminUpdateAuthEventFeedbackInput) (*AdminUpdateAuthEventFeedbackOutput, error) {
req, out := c.AdminUpdateAuthEventFeedbackRequest(input)
return out, req.Send()
}
// AdminUpdateAuthEventFeedbackWithContext is the same as AdminUpdateAuthEventFeedback with the addition of
// the ability to pass a context and additional request options.
//
// See AdminUpdateAuthEventFeedback for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedbackWithContext(ctx aws.Context, input *AdminUpdateAuthEventFeedbackInput, opts ...request.Option) (*AdminUpdateAuthEventFeedbackOutput, error) {
req, out := c.AdminUpdateAuthEventFeedbackRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminUpdateDeviceStatus = "AdminUpdateDeviceStatus"
// AdminUpdateDeviceStatusRequest generates a "aws/request.Request" representing the
// client's request for the AdminUpdateDeviceStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminUpdateDeviceStatus for more information on using the AdminUpdateDeviceStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminUpdateDeviceStatusRequest method.
// req, resp := client.AdminUpdateDeviceStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateDeviceStatus
func (c *CognitoIdentityProvider) AdminUpdateDeviceStatusRequest(input *AdminUpdateDeviceStatusInput) (req *request.Request, output *AdminUpdateDeviceStatusOutput) {
op := &request.Operation{
Name: opAdminUpdateDeviceStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminUpdateDeviceStatusInput{}
}
output = &AdminUpdateDeviceStatusOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminUpdateDeviceStatus API operation for Amazon Cognito Identity Provider.
//
// Updates the device status as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminUpdateDeviceStatus for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateDeviceStatus
func (c *CognitoIdentityProvider) AdminUpdateDeviceStatus(input *AdminUpdateDeviceStatusInput) (*AdminUpdateDeviceStatusOutput, error) {
req, out := c.AdminUpdateDeviceStatusRequest(input)
return out, req.Send()
}
// AdminUpdateDeviceStatusWithContext is the same as AdminUpdateDeviceStatus with the addition of
// the ability to pass a context and additional request options.
//
// See AdminUpdateDeviceStatus for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminUpdateDeviceStatusWithContext(ctx aws.Context, input *AdminUpdateDeviceStatusInput, opts ...request.Option) (*AdminUpdateDeviceStatusOutput, error) {
req, out := c.AdminUpdateDeviceStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminUpdateUserAttributes = "AdminUpdateUserAttributes"
// AdminUpdateUserAttributesRequest generates a "aws/request.Request" representing the
// client's request for the AdminUpdateUserAttributes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminUpdateUserAttributes for more information on using the AdminUpdateUserAttributes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminUpdateUserAttributesRequest method.
// req, resp := client.AdminUpdateUserAttributesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateUserAttributes
func (c *CognitoIdentityProvider) AdminUpdateUserAttributesRequest(input *AdminUpdateUserAttributesInput) (req *request.Request, output *AdminUpdateUserAttributesOutput) {
op := &request.Operation{
Name: opAdminUpdateUserAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminUpdateUserAttributesInput{}
}
output = &AdminUpdateUserAttributesOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminUpdateUserAttributes API operation for Amazon Cognito Identity Provider.
//
// Updates the specified user's attributes, including developer attributes,
// as an administrator. Works on any user.
//
// For custom attributes, you must prepend the custom: prefix to the attribute
// name.
//
// In addition to updating user attributes, this API can also be used to mark
// phone and email as verified.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminUpdateUserAttributes for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"
// This exception is thrown when the Amazon Cognito service encounters a user
// validation exception with the AWS Lambda service.
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodeAliasExistsException "AliasExistsException"
// This exception is thrown when a user tries to confirm the account with an
// email or phone number that has already been supplied as an alias from a different
// account. This exception tells user that an account with this email or phone
// already exists.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeInvalidSmsRoleAccessPolicyException "InvalidSmsRoleAccessPolicyException"
// This exception is returned when the role provided for SMS configuration does
// not have permission to publish using Amazon SNS.
//
// * ErrCodeInvalidEmailRoleAccessPolicyException "InvalidEmailRoleAccessPolicyException"
// This exception is thrown when Amazon Cognito is not allowed to use your email
// identity. HTTP status code: 400.
//
// * ErrCodeInvalidSmsRoleTrustRelationshipException "InvalidSmsRoleTrustRelationshipException"
// This exception is thrown when the trust relationship is invalid for the role
// provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com
// or the external ID provided in the role does not match what is provided in
// the SMS configuration for the user pool.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUpdateUserAttributes
func (c *CognitoIdentityProvider) AdminUpdateUserAttributes(input *AdminUpdateUserAttributesInput) (*AdminUpdateUserAttributesOutput, error) {
req, out := c.AdminUpdateUserAttributesRequest(input)
return out, req.Send()
}
// AdminUpdateUserAttributesWithContext is the same as AdminUpdateUserAttributes with the addition of
// the ability to pass a context and additional request options.
//
// See AdminUpdateUserAttributes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminUpdateUserAttributesWithContext(ctx aws.Context, input *AdminUpdateUserAttributesInput, opts ...request.Option) (*AdminUpdateUserAttributesOutput, error) {
req, out := c.AdminUpdateUserAttributesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAdminUserGlobalSignOut = "AdminUserGlobalSignOut"
// AdminUserGlobalSignOutRequest generates a "aws/request.Request" representing the
// client's request for the AdminUserGlobalSignOut operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AdminUserGlobalSignOut for more information on using the AdminUserGlobalSignOut
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AdminUserGlobalSignOutRequest method.
// req, resp := client.AdminUserGlobalSignOutRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUserGlobalSignOut
func (c *CognitoIdentityProvider) AdminUserGlobalSignOutRequest(input *AdminUserGlobalSignOutInput) (req *request.Request, output *AdminUserGlobalSignOutOutput) {
op := &request.Operation{
Name: opAdminUserGlobalSignOut,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AdminUserGlobalSignOutInput{}
}
output = &AdminUserGlobalSignOutOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AdminUserGlobalSignOut API operation for Amazon Cognito Identity Provider.
//
// Signs out users from all devices, as an administrator.
//
// Requires developer credentials.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AdminUserGlobalSignOut for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AdminUserGlobalSignOut
func (c *CognitoIdentityProvider) AdminUserGlobalSignOut(input *AdminUserGlobalSignOutInput) (*AdminUserGlobalSignOutOutput, error) {
req, out := c.AdminUserGlobalSignOutRequest(input)
return out, req.Send()
}
// AdminUserGlobalSignOutWithContext is the same as AdminUserGlobalSignOut with the addition of
// the ability to pass a context and additional request options.
//
// See AdminUserGlobalSignOut for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AdminUserGlobalSignOutWithContext(ctx aws.Context, input *AdminUserGlobalSignOutInput, opts ...request.Option) (*AdminUserGlobalSignOutOutput, error) {
req, out := c.AdminUserGlobalSignOutRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAssociateSoftwareToken = "AssociateSoftwareToken"
// AssociateSoftwareTokenRequest generates a "aws/request.Request" representing the
// client's request for the AssociateSoftwareToken operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AssociateSoftwareToken for more information on using the AssociateSoftwareToken
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AssociateSoftwareTokenRequest method.
// req, resp := client.AssociateSoftwareTokenRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AssociateSoftwareToken
func (c *CognitoIdentityProvider) AssociateSoftwareTokenRequest(input *AssociateSoftwareTokenInput) (req *request.Request, output *AssociateSoftwareTokenOutput) {
op := &request.Operation{
Name: opAssociateSoftwareToken,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateSoftwareTokenInput{}
}
output = &AssociateSoftwareTokenOutput{}
req = c.newRequest(op, input, output)
return
}
// AssociateSoftwareToken API operation for Amazon Cognito Identity Provider.
//
// Returns a unique generated shared secret key code for the user account. The
// request takes an access token or a session string, but not both.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation AssociateSoftwareToken for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// * ErrCodeSoftwareTokenMFANotFoundException "SoftwareTokenMFANotFoundException"
// This exception is thrown when the software token TOTP multi-factor authentication
// (MFA) is not enabled for the user pool.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/AssociateSoftwareToken
func (c *CognitoIdentityProvider) AssociateSoftwareToken(input *AssociateSoftwareTokenInput) (*AssociateSoftwareTokenOutput, error) {
req, out := c.AssociateSoftwareTokenRequest(input)
return out, req.Send()
}
// AssociateSoftwareTokenWithContext is the same as AssociateSoftwareToken with the addition of
// the ability to pass a context and additional request options.
//
// See AssociateSoftwareToken for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) AssociateSoftwareTokenWithContext(ctx aws.Context, input *AssociateSoftwareTokenInput, opts ...request.Option) (*AssociateSoftwareTokenOutput, error) {
req, out := c.AssociateSoftwareTokenRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opChangePassword = "ChangePassword"
// ChangePasswordRequest generates a "aws/request.Request" representing the
// client's request for the ChangePassword operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ChangePassword for more information on using the ChangePassword
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ChangePasswordRequest method.
// req, resp := client.ChangePasswordRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ChangePassword
func (c *CognitoIdentityProvider) ChangePasswordRequest(input *ChangePasswordInput) (req *request.Request, output *ChangePasswordOutput) {
op := &request.Operation{
Name: opChangePassword,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ChangePasswordInput{}
}
output = &ChangePasswordOutput{}
req = c.newRequest(op, input, output)
req.Config.Credentials = credentials.AnonymousCredentials
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// ChangePassword API operation for Amazon Cognito Identity Provider.
//
// Changes the password for a specified user in a user pool.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation ChangePassword for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// password.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// This exception is thrown when a user exceeds the limit for a requested AWS
// resource.
//
// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException"
// This exception is thrown when a password reset is required.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserNotConfirmedException "UserNotConfirmedException"
// This exception is thrown when a user is not confirmed successfully.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ChangePassword
func (c *CognitoIdentityProvider) ChangePassword(input *ChangePasswordInput) (*ChangePasswordOutput, error) {
req, out := c.ChangePasswordRequest(input)
return out, req.Send()
}
// ChangePasswordWithContext is the same as ChangePassword with the addition of
// the ability to pass a context and additional request options.
//
// See ChangePassword for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) ChangePasswordWithContext(ctx aws.Context, input *ChangePasswordInput, opts ...request.Option) (*ChangePasswordOutput, error) {
req, out := c.ChangePasswordRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opConfirmDevice = "ConfirmDevice"
// ConfirmDeviceRequest generates a "aws/request.Request" representing the
// client's request for the ConfirmDevice operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ConfirmDevice for more information on using the ConfirmDevice
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ConfirmDeviceRequest method.
// req, resp := client.ConfirmDeviceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmDevice
func (c *CognitoIdentityProvider) ConfirmDeviceRequest(input *ConfirmDeviceInput) (req *request.Request, output *ConfirmDeviceOutput) {
op := &request.Operation{
Name: opConfirmDevice,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ConfirmDeviceInput{}
}
output = &ConfirmDeviceOutput{}
req = c.newRequest(op, input, output)
return
}
// ConfirmDevice API operation for Amazon Cognito Identity Provider.
//
// Confirms tracking of the device. This API call is the call that begins device
// tracking.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation ConfirmDevice for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// parameter.
//
// * ErrCodeNotAuthorizedException "NotAuthorizedException"
// This exception is thrown when a user is not authorized.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// password.
//
// * ErrCodeInvalidLambdaResponseException "InvalidLambdaResponseException"
// This exception is thrown when the Amazon Cognito service encounters an invalid
// AWS Lambda response.
//
// * ErrCodeUsernameExistsException "UsernameExistsException"
// This exception is thrown when Amazon Cognito encounters a user name that
// already exists in the user pool.
//
// * ErrCodeInvalidUserPoolConfigurationException "InvalidUserPoolConfigurationException"
// This exception is thrown when the user pool configuration is invalid.
//
// * ErrCodeTooManyRequestsException "TooManyRequestsException"
// This exception is thrown when the user has made too many requests for a given
// operation.
//
// * ErrCodePasswordResetRequiredException "PasswordResetRequiredException"
// This exception is thrown when a password reset is required.
//
// * ErrCodeUserNotFoundException "UserNotFoundException"
// This exception is thrown when a user is not found.
//
// * ErrCodeUserNotConfirmedException "UserNotConfirmedException"
// This exception is thrown when a user is not confirmed successfully.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// This exception is thrown when Amazon Cognito encounters an internal error.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmDevice
func (c *CognitoIdentityProvider) ConfirmDevice(input *ConfirmDeviceInput) (*ConfirmDeviceOutput, error) {
req, out := c.ConfirmDeviceRequest(input)
return out, req.Send()
}
// ConfirmDeviceWithContext is the same as ConfirmDevice with the addition of
// the ability to pass a context and additional request options.
//
// See ConfirmDevice for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CognitoIdentityProvider) ConfirmDeviceWithContext(ctx aws.Context, input *ConfirmDeviceInput, opts ...request.Option) (*ConfirmDeviceOutput, error) {
req, out := c.ConfirmDeviceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opConfirmForgotPassword = "ConfirmForgotPassword"
// ConfirmForgotPasswordRequest generates a "aws/request.Request" representing the
// client's request for the ConfirmForgotPassword operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ConfirmForgotPassword for more information on using the ConfirmForgotPassword
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ConfirmForgotPasswordRequest method.
// req, resp := client.ConfirmForgotPasswordRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/ConfirmForgotPassword
func (c *CognitoIdentityProvider) ConfirmForgotPasswordRequest(input *ConfirmForgotPasswordInput) (req *request.Request, output *ConfirmForgotPasswordOutput) {
op := &request.Operation{
Name: opConfirmForgotPassword,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ConfirmForgotPasswordInput{}
}
output = &ConfirmForgotPasswordOutput{}
req = c.newRequest(op, input, output)
req.Config.Credentials = credentials.AnonymousCredentials
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// ConfirmForgotPassword API operation for Amazon Cognito Identity Provider.
//
// Allows a user to enter a confirmation code to reset a forgotten password.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Cognito Identity Provider's
// API operation ConfirmForgotPassword for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// This exception is thrown when the Amazon Cognito service cannot find the
// requested resource.
//
// * ErrCodeUnexpectedLambdaException "UnexpectedLambdaException"
// This exception is thrown when the Amazon Cognito service encounters an unexpected
// exception with the AWS Lambda service.
//
// * ErrCodeUserLambdaValidationException "UserLambdaValidationException"