glide update

This commit is contained in:
James
2017-07-26 12:48:53 -07:00
parent 6ee7619b40
commit 38a2b86184
4048 changed files with 1104059 additions and 554 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,150 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package cognitoidentityprovideriface provides an interface for the Amazon Cognito Identity Provider.
package cognitoidentityprovideriface
import (
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cognitoidentityprovider"
)
// CognitoIdentityProviderAPI is the interface type for cognitoidentityprovider.CognitoIdentityProvider.
type CognitoIdentityProviderAPI interface {
AddCustomAttributesRequest(*cognitoidentityprovider.AddCustomAttributesInput) (*request.Request, *cognitoidentityprovider.AddCustomAttributesOutput)
AddCustomAttributes(*cognitoidentityprovider.AddCustomAttributesInput) (*cognitoidentityprovider.AddCustomAttributesOutput, error)
AdminConfirmSignUpRequest(*cognitoidentityprovider.AdminConfirmSignUpInput) (*request.Request, *cognitoidentityprovider.AdminConfirmSignUpOutput)
AdminConfirmSignUp(*cognitoidentityprovider.AdminConfirmSignUpInput) (*cognitoidentityprovider.AdminConfirmSignUpOutput, error)
AdminDeleteUserRequest(*cognitoidentityprovider.AdminDeleteUserInput) (*request.Request, *cognitoidentityprovider.AdminDeleteUserOutput)
AdminDeleteUser(*cognitoidentityprovider.AdminDeleteUserInput) (*cognitoidentityprovider.AdminDeleteUserOutput, error)
AdminDeleteUserAttributesRequest(*cognitoidentityprovider.AdminDeleteUserAttributesInput) (*request.Request, *cognitoidentityprovider.AdminDeleteUserAttributesOutput)
AdminDeleteUserAttributes(*cognitoidentityprovider.AdminDeleteUserAttributesInput) (*cognitoidentityprovider.AdminDeleteUserAttributesOutput, error)
AdminDisableUserRequest(*cognitoidentityprovider.AdminDisableUserInput) (*request.Request, *cognitoidentityprovider.AdminDisableUserOutput)
AdminDisableUser(*cognitoidentityprovider.AdminDisableUserInput) (*cognitoidentityprovider.AdminDisableUserOutput, error)
AdminEnableUserRequest(*cognitoidentityprovider.AdminEnableUserInput) (*request.Request, *cognitoidentityprovider.AdminEnableUserOutput)
AdminEnableUser(*cognitoidentityprovider.AdminEnableUserInput) (*cognitoidentityprovider.AdminEnableUserOutput, error)
AdminGetUserRequest(*cognitoidentityprovider.AdminGetUserInput) (*request.Request, *cognitoidentityprovider.AdminGetUserOutput)
AdminGetUser(*cognitoidentityprovider.AdminGetUserInput) (*cognitoidentityprovider.AdminGetUserOutput, error)
AdminResetUserPasswordRequest(*cognitoidentityprovider.AdminResetUserPasswordInput) (*request.Request, *cognitoidentityprovider.AdminResetUserPasswordOutput)
AdminResetUserPassword(*cognitoidentityprovider.AdminResetUserPasswordInput) (*cognitoidentityprovider.AdminResetUserPasswordOutput, error)
AdminSetUserSettingsRequest(*cognitoidentityprovider.AdminSetUserSettingsInput) (*request.Request, *cognitoidentityprovider.AdminSetUserSettingsOutput)
AdminSetUserSettings(*cognitoidentityprovider.AdminSetUserSettingsInput) (*cognitoidentityprovider.AdminSetUserSettingsOutput, error)
AdminUpdateUserAttributesRequest(*cognitoidentityprovider.AdminUpdateUserAttributesInput) (*request.Request, *cognitoidentityprovider.AdminUpdateUserAttributesOutput)
AdminUpdateUserAttributes(*cognitoidentityprovider.AdminUpdateUserAttributesInput) (*cognitoidentityprovider.AdminUpdateUserAttributesOutput, error)
ChangePasswordRequest(*cognitoidentityprovider.ChangePasswordInput) (*request.Request, *cognitoidentityprovider.ChangePasswordOutput)
ChangePassword(*cognitoidentityprovider.ChangePasswordInput) (*cognitoidentityprovider.ChangePasswordOutput, error)
ConfirmForgotPasswordRequest(*cognitoidentityprovider.ConfirmForgotPasswordInput) (*request.Request, *cognitoidentityprovider.ConfirmForgotPasswordOutput)
ConfirmForgotPassword(*cognitoidentityprovider.ConfirmForgotPasswordInput) (*cognitoidentityprovider.ConfirmForgotPasswordOutput, error)
ConfirmSignUpRequest(*cognitoidentityprovider.ConfirmSignUpInput) (*request.Request, *cognitoidentityprovider.ConfirmSignUpOutput)
ConfirmSignUp(*cognitoidentityprovider.ConfirmSignUpInput) (*cognitoidentityprovider.ConfirmSignUpOutput, error)
CreateUserPoolRequest(*cognitoidentityprovider.CreateUserPoolInput) (*request.Request, *cognitoidentityprovider.CreateUserPoolOutput)
CreateUserPool(*cognitoidentityprovider.CreateUserPoolInput) (*cognitoidentityprovider.CreateUserPoolOutput, error)
CreateUserPoolClientRequest(*cognitoidentityprovider.CreateUserPoolClientInput) (*request.Request, *cognitoidentityprovider.CreateUserPoolClientOutput)
CreateUserPoolClient(*cognitoidentityprovider.CreateUserPoolClientInput) (*cognitoidentityprovider.CreateUserPoolClientOutput, error)
DeleteUserRequest(*cognitoidentityprovider.DeleteUserInput) (*request.Request, *cognitoidentityprovider.DeleteUserOutput)
DeleteUser(*cognitoidentityprovider.DeleteUserInput) (*cognitoidentityprovider.DeleteUserOutput, error)
DeleteUserAttributesRequest(*cognitoidentityprovider.DeleteUserAttributesInput) (*request.Request, *cognitoidentityprovider.DeleteUserAttributesOutput)
DeleteUserAttributes(*cognitoidentityprovider.DeleteUserAttributesInput) (*cognitoidentityprovider.DeleteUserAttributesOutput, error)
DeleteUserPoolRequest(*cognitoidentityprovider.DeleteUserPoolInput) (*request.Request, *cognitoidentityprovider.DeleteUserPoolOutput)
DeleteUserPool(*cognitoidentityprovider.DeleteUserPoolInput) (*cognitoidentityprovider.DeleteUserPoolOutput, error)
DeleteUserPoolClientRequest(*cognitoidentityprovider.DeleteUserPoolClientInput) (*request.Request, *cognitoidentityprovider.DeleteUserPoolClientOutput)
DeleteUserPoolClient(*cognitoidentityprovider.DeleteUserPoolClientInput) (*cognitoidentityprovider.DeleteUserPoolClientOutput, error)
DescribeUserPoolRequest(*cognitoidentityprovider.DescribeUserPoolInput) (*request.Request, *cognitoidentityprovider.DescribeUserPoolOutput)
DescribeUserPool(*cognitoidentityprovider.DescribeUserPoolInput) (*cognitoidentityprovider.DescribeUserPoolOutput, error)
DescribeUserPoolClientRequest(*cognitoidentityprovider.DescribeUserPoolClientInput) (*request.Request, *cognitoidentityprovider.DescribeUserPoolClientOutput)
DescribeUserPoolClient(*cognitoidentityprovider.DescribeUserPoolClientInput) (*cognitoidentityprovider.DescribeUserPoolClientOutput, error)
ForgotPasswordRequest(*cognitoidentityprovider.ForgotPasswordInput) (*request.Request, *cognitoidentityprovider.ForgotPasswordOutput)
ForgotPassword(*cognitoidentityprovider.ForgotPasswordInput) (*cognitoidentityprovider.ForgotPasswordOutput, error)
GetUserRequest(*cognitoidentityprovider.GetUserInput) (*request.Request, *cognitoidentityprovider.GetUserOutput)
GetUser(*cognitoidentityprovider.GetUserInput) (*cognitoidentityprovider.GetUserOutput, error)
GetUserAttributeVerificationCodeRequest(*cognitoidentityprovider.GetUserAttributeVerificationCodeInput) (*request.Request, *cognitoidentityprovider.GetUserAttributeVerificationCodeOutput)
GetUserAttributeVerificationCode(*cognitoidentityprovider.GetUserAttributeVerificationCodeInput) (*cognitoidentityprovider.GetUserAttributeVerificationCodeOutput, error)
ListUserPoolClientsRequest(*cognitoidentityprovider.ListUserPoolClientsInput) (*request.Request, *cognitoidentityprovider.ListUserPoolClientsOutput)
ListUserPoolClients(*cognitoidentityprovider.ListUserPoolClientsInput) (*cognitoidentityprovider.ListUserPoolClientsOutput, error)
ListUserPoolsRequest(*cognitoidentityprovider.ListUserPoolsInput) (*request.Request, *cognitoidentityprovider.ListUserPoolsOutput)
ListUserPools(*cognitoidentityprovider.ListUserPoolsInput) (*cognitoidentityprovider.ListUserPoolsOutput, error)
ListUsersRequest(*cognitoidentityprovider.ListUsersInput) (*request.Request, *cognitoidentityprovider.ListUsersOutput)
ListUsers(*cognitoidentityprovider.ListUsersInput) (*cognitoidentityprovider.ListUsersOutput, error)
ResendConfirmationCodeRequest(*cognitoidentityprovider.ResendConfirmationCodeInput) (*request.Request, *cognitoidentityprovider.ResendConfirmationCodeOutput)
ResendConfirmationCode(*cognitoidentityprovider.ResendConfirmationCodeInput) (*cognitoidentityprovider.ResendConfirmationCodeOutput, error)
SetUserSettingsRequest(*cognitoidentityprovider.SetUserSettingsInput) (*request.Request, *cognitoidentityprovider.SetUserSettingsOutput)
SetUserSettings(*cognitoidentityprovider.SetUserSettingsInput) (*cognitoidentityprovider.SetUserSettingsOutput, error)
SignUpRequest(*cognitoidentityprovider.SignUpInput) (*request.Request, *cognitoidentityprovider.SignUpOutput)
SignUp(*cognitoidentityprovider.SignUpInput) (*cognitoidentityprovider.SignUpOutput, error)
UpdateUserAttributesRequest(*cognitoidentityprovider.UpdateUserAttributesInput) (*request.Request, *cognitoidentityprovider.UpdateUserAttributesOutput)
UpdateUserAttributes(*cognitoidentityprovider.UpdateUserAttributesInput) (*cognitoidentityprovider.UpdateUserAttributesOutput, error)
UpdateUserPoolRequest(*cognitoidentityprovider.UpdateUserPoolInput) (*request.Request, *cognitoidentityprovider.UpdateUserPoolOutput)
UpdateUserPool(*cognitoidentityprovider.UpdateUserPoolInput) (*cognitoidentityprovider.UpdateUserPoolOutput, error)
UpdateUserPoolClientRequest(*cognitoidentityprovider.UpdateUserPoolClientInput) (*request.Request, *cognitoidentityprovider.UpdateUserPoolClientOutput)
UpdateUserPoolClient(*cognitoidentityprovider.UpdateUserPoolClientInput) (*cognitoidentityprovider.UpdateUserPoolClientOutput, error)
VerifyUserAttributeRequest(*cognitoidentityprovider.VerifyUserAttributeInput) (*request.Request, *cognitoidentityprovider.VerifyUserAttributeOutput)
VerifyUserAttribute(*cognitoidentityprovider.VerifyUserAttributeInput) (*cognitoidentityprovider.VerifyUserAttributeOutput, error)
}
var _ CognitoIdentityProviderAPI = (*cognitoidentityprovider.CognitoIdentityProvider)(nil)

View File

@@ -0,0 +1,829 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package cognitoidentityprovider_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cognitoidentityprovider"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleCognitoIdentityProvider_AddCustomAttributes() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AddCustomAttributesInput{
CustomAttributes: []*cognitoidentityprovider.SchemaAttributeType{ // Required
{ // Required
AttributeDataType: aws.String("AttributeDataType"),
DeveloperOnlyAttribute: aws.Bool(true),
Mutable: aws.Bool(true),
Name: aws.String("CustomAttributeNameType"),
NumberAttributeConstraints: &cognitoidentityprovider.NumberAttributeConstraintsType{
MaxValue: aws.String("StringType"),
MinValue: aws.String("StringType"),
},
Required: aws.Bool(true),
StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{
MaxLength: aws.String("StringType"),
MinLength: aws.String("StringType"),
},
},
// More values...
},
UserPoolId: aws.String("UserPoolIdType"), // Required
}
resp, err := svc.AddCustomAttributes(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminConfirmSignUp() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminConfirmSignUpInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminConfirmSignUp(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminDeleteUser() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminDeleteUserInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminDeleteUser(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminDeleteUserAttributes() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminDeleteUserAttributesInput{
UserAttributeNames: []*string{ // Required
aws.String("AttributeNameType"), // Required
// More values...
},
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminDeleteUserAttributes(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminDisableUser() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminDisableUserInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminDisableUser(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminEnableUser() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminEnableUserInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminEnableUser(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminGetUser() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminGetUserInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminGetUser(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminResetUserPassword() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminResetUserPasswordInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminResetUserPassword(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminSetUserSettings() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminSetUserSettingsInput{
MFAOptions: []*cognitoidentityprovider.MFAOptionType{ // Required
{ // Required
AttributeName: aws.String("AttributeNameType"),
DeliveryMedium: aws.String("DeliveryMediumType"),
},
// More values...
},
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminSetUserSettings(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_AdminUpdateUserAttributes() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.AdminUpdateUserAttributesInput{
UserAttributes: []*cognitoidentityprovider.AttributeType{ // Required
{ // Required
Name: aws.String("AttributeNameType"), // Required
Value: aws.String("AttributeValueType"),
},
// More values...
},
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
}
resp, err := svc.AdminUpdateUserAttributes(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ChangePassword() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ChangePasswordInput{
PreviousPassword: aws.String("PasswordType"), // Required
ProposedPassword: aws.String("PasswordType"), // Required
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.ChangePassword(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ConfirmForgotPassword() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ConfirmForgotPasswordInput{
ClientId: aws.String("ClientIdType"), // Required
ConfirmationCode: aws.String("ConfirmationCodeType"), // Required
Password: aws.String("PasswordType"), // Required
Username: aws.String("UsernameType"), // Required
SecretHash: aws.String("SecretHashType"),
}
resp, err := svc.ConfirmForgotPassword(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ConfirmSignUp() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ConfirmSignUpInput{
ClientId: aws.String("ClientIdType"), // Required
ConfirmationCode: aws.String("ConfirmationCodeType"), // Required
Username: aws.String("UsernameType"), // Required
ForceAliasCreation: aws.Bool(true),
SecretHash: aws.String("SecretHashType"),
}
resp, err := svc.ConfirmSignUp(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_CreateUserPool() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.CreateUserPoolInput{
PoolName: aws.String("UserPoolNameType"), // Required
AliasAttributes: []*string{
aws.String("AliasAttributeType"), // Required
// More values...
},
AutoVerifiedAttributes: []*string{
aws.String("VerifiedAttributeType"), // Required
// More values...
},
EmailVerificationMessage: aws.String("EmailVerificationMessageType"),
EmailVerificationSubject: aws.String("EmailVerificationSubjectType"),
LambdaConfig: &cognitoidentityprovider.LambdaConfigType{
CustomMessage: aws.String("ArnType"),
PostAuthentication: aws.String("ArnType"),
PostConfirmation: aws.String("ArnType"),
PreAuthentication: aws.String("ArnType"),
PreSignUp: aws.String("ArnType"),
},
MfaConfiguration: aws.String("UserPoolMfaType"),
Policies: &cognitoidentityprovider.UserPoolPolicyType{
PasswordPolicy: &cognitoidentityprovider.PasswordPolicyType{
MinimumLength: aws.Int64(1),
RequireLowercase: aws.Bool(true),
RequireNumbers: aws.Bool(true),
RequireSymbols: aws.Bool(true),
RequireUppercase: aws.Bool(true),
},
},
SmsAuthenticationMessage: aws.String("SmsVerificationMessageType"),
SmsVerificationMessage: aws.String("SmsVerificationMessageType"),
}
resp, err := svc.CreateUserPool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_CreateUserPoolClient() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.CreateUserPoolClientInput{
ClientName: aws.String("ClientNameType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
GenerateSecret: aws.Bool(true),
}
resp, err := svc.CreateUserPoolClient(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_DeleteUser() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.DeleteUserInput{
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.DeleteUser(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_DeleteUserAttributes() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.DeleteUserAttributesInput{
UserAttributeNames: []*string{ // Required
aws.String("AttributeNameType"), // Required
// More values...
},
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.DeleteUserAttributes(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_DeleteUserPool() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.DeleteUserPoolInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
}
resp, err := svc.DeleteUserPool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_DeleteUserPoolClient() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.DeleteUserPoolClientInput{
ClientId: aws.String("ClientIdType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
}
resp, err := svc.DeleteUserPoolClient(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_DescribeUserPool() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.DescribeUserPoolInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
}
resp, err := svc.DescribeUserPool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_DescribeUserPoolClient() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.DescribeUserPoolClientInput{
ClientId: aws.String("ClientIdType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
}
resp, err := svc.DescribeUserPoolClient(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ForgotPassword() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ForgotPasswordInput{
ClientId: aws.String("ClientIdType"), // Required
Username: aws.String("UsernameType"), // Required
SecretHash: aws.String("SecretHashType"),
}
resp, err := svc.ForgotPassword(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_GetUser() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.GetUserInput{
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.GetUser(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_GetUserAttributeVerificationCode() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.GetUserAttributeVerificationCodeInput{
AttributeName: aws.String("AttributeNameType"), // Required
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.GetUserAttributeVerificationCode(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ListUserPoolClients() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ListUserPoolClientsInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationKey"),
}
resp, err := svc.ListUserPoolClients(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ListUserPools() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ListUserPoolsInput{
MaxResults: aws.Int64(1), // Required
NextToken: aws.String("PaginationKeyType"),
}
resp, err := svc.ListUserPools(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ListUsers() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ListUsersInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
AttributesToGet: []*string{
aws.String("AttributeNameType"), // Required
// More values...
},
Limit: aws.Int64(1),
PaginationToken: aws.String("SearchPaginationTokenType"),
UserStatus: aws.String("UserStatusType"),
}
resp, err := svc.ListUsers(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_ResendConfirmationCode() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.ResendConfirmationCodeInput{
ClientId: aws.String("ClientIdType"), // Required
Username: aws.String("UsernameType"), // Required
SecretHash: aws.String("SecretHashType"),
}
resp, err := svc.ResendConfirmationCode(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_SetUserSettings() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.SetUserSettingsInput{
AccessToken: aws.String("TokenModelType"), // Required
MFAOptions: []*cognitoidentityprovider.MFAOptionType{ // Required
{ // Required
AttributeName: aws.String("AttributeNameType"),
DeliveryMedium: aws.String("DeliveryMediumType"),
},
// More values...
},
}
resp, err := svc.SetUserSettings(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_SignUp() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.SignUpInput{
ClientId: aws.String("ClientIdType"), // Required
Password: aws.String("PasswordType"), // Required
Username: aws.String("UsernameType"), // Required
SecretHash: aws.String("SecretHashType"),
UserAttributes: []*cognitoidentityprovider.AttributeType{
{ // Required
Name: aws.String("AttributeNameType"), // Required
Value: aws.String("AttributeValueType"),
},
// More values...
},
ValidationData: []*cognitoidentityprovider.AttributeType{
{ // Required
Name: aws.String("AttributeNameType"), // Required
Value: aws.String("AttributeValueType"),
},
// More values...
},
}
resp, err := svc.SignUp(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_UpdateUserAttributes() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.UpdateUserAttributesInput{
UserAttributes: []*cognitoidentityprovider.AttributeType{ // Required
{ // Required
Name: aws.String("AttributeNameType"), // Required
Value: aws.String("AttributeValueType"),
},
// More values...
},
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.UpdateUserAttributes(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_UpdateUserPool() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.UpdateUserPoolInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
AutoVerifiedAttributes: []*string{
aws.String("VerifiedAttributeType"), // Required
// More values...
},
EmailVerificationMessage: aws.String("EmailVerificationMessageType"),
EmailVerificationSubject: aws.String("EmailVerificationSubjectType"),
LambdaConfig: &cognitoidentityprovider.LambdaConfigType{
CustomMessage: aws.String("ArnType"),
PostAuthentication: aws.String("ArnType"),
PostConfirmation: aws.String("ArnType"),
PreAuthentication: aws.String("ArnType"),
PreSignUp: aws.String("ArnType"),
},
MfaConfiguration: aws.String("UserPoolMfaType"),
Policies: &cognitoidentityprovider.UserPoolPolicyType{
PasswordPolicy: &cognitoidentityprovider.PasswordPolicyType{
MinimumLength: aws.Int64(1),
RequireLowercase: aws.Bool(true),
RequireNumbers: aws.Bool(true),
RequireSymbols: aws.Bool(true),
RequireUppercase: aws.Bool(true),
},
},
SmsAuthenticationMessage: aws.String("SmsVerificationMessageType"),
SmsVerificationMessage: aws.String("SmsVerificationMessageType"),
}
resp, err := svc.UpdateUserPool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_UpdateUserPoolClient() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.UpdateUserPoolClientInput{
ClientId: aws.String("ClientIdType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
ClientName: aws.String("ClientNameType"),
}
resp, err := svc.UpdateUserPoolClient(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleCognitoIdentityProvider_VerifyUserAttribute() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.VerifyUserAttributeInput{
AttributeName: aws.String("AttributeNameType"), // Required
Code: aws.String("ConfirmationCodeType"), // Required
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.VerifyUserAttribute(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}

View File

@@ -0,0 +1,93 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package cognitoidentityprovider
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// You can create a user pool in Amazon Cognito Identity to manage directories
// and users. You can authenticate a user to obtain tokens related to user identity
// and access policies.
//
// This API reference provides information about user pools in Amazon Cognito
// Identity, which is a new capability that is available as a beta.
//The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
type CognitoIdentityProvider struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// A ServiceName is the name of the service the client will make API calls to.
const ServiceName = "cognito-idp"
// New creates a new instance of the CognitoIdentityProvider client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a CognitoIdentityProvider client from just a session.
// svc := cognitoidentityprovider.New(mySession)
//
// // Create a CognitoIdentityProvider client with additional configuration
// svc := cognitoidentityprovider.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CognitoIdentityProvider {
c := p.ClientConfig(ServiceName, cfgs...)
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *CognitoIdentityProvider {
svc := &CognitoIdentityProvider{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2016-04-18",
JSONVersion: "1.1",
TargetPrefix: "AWSCognitoIdentityProviderService",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CognitoIdentityProvider operation and runs any
// custom request initialization.
func (c *CognitoIdentityProvider) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}