本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/cognitoidentityprovider.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleCognitoIdentityProvider_AdminSetUserSettings
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)
}
开发者ID:Xercoy,项目名称:aws-sdk-go,代码行数:26,代码来源:examples_test.go
示例2: ExampleCognitoIdentityProvider_SetUserSettings
func ExampleCognitoIdentityProvider_SetUserSettings() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:31,代码来源:examples_test.go
示例3: ExampleCognitoIdentityProvider_ForgotPassword
func ExampleCognitoIdentityProvider_ForgotPassword() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go
示例4: ExampleCognitoIdentityProvider_AdminUpdateUserAttributes
func ExampleCognitoIdentityProvider_AdminUpdateUserAttributes() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:32,代码来源:examples_test.go
示例5: ExampleCognitoIdentityProvider_AdminUpdateDeviceStatus
func ExampleCognitoIdentityProvider_AdminUpdateDeviceStatus() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.AdminUpdateDeviceStatusInput{
DeviceKey: aws.String("DeviceKeyType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
DeviceRememberedStatus: aws.String("DeviceRememberedStatusType"),
}
resp, err := svc.AdminUpdateDeviceStatus(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:27,代码来源:examples_test.go
示例6: ExampleCognitoIdentityProvider_ListUsers
func ExampleCognitoIdentityProvider_ListUsers() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.ListUsersInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
AttributesToGet: []*string{
aws.String("AttributeNameType"), // Required
// More values...
},
Filter: aws.String("UserFilterType"),
Limit: aws.Int64(1),
PaginationToken: aws.String("SearchPaginationTokenType"),
}
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:31,代码来源:examples_test.go
示例7: ExampleCognitoIdentityProvider_CreateUserPoolClient
func ExampleCognitoIdentityProvider_CreateUserPoolClient() {
svc := cognitoidentityprovider.New(session.New())
params := &cognitoidentityprovider.CreateUserPoolClientInput{
ClientName: aws.String("ClientNameType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
ExplicitAuthFlows: []*string{
aws.String("ExplicitAuthFlowsType"), // Required
// More values...
},
GenerateSecret: aws.Bool(true),
ReadAttributes: []*string{
aws.String("ClientPermissionType"), // Required
// More values...
},
RefreshTokenValidity: aws.Int64(1),
WriteAttributes: []*string{
aws.String("ClientPermissionType"), // Required
// More values...
},
}
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)
}
开发者ID:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:33,代码来源:examples_test.go
示例8: ExampleCognitoIdentityProvider_ConfirmDevice
func ExampleCognitoIdentityProvider_ConfirmDevice() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.ConfirmDeviceInput{
AccessToken: aws.String("TokenModelType"), // Required
DeviceKey: aws.String("DeviceKeyType"), // Required
DeviceName: aws.String("DeviceNameType"),
DeviceSecretVerifierConfig: &cognitoidentityprovider.DeviceSecretVerifierConfigType{
PasswordVerifier: aws.String("StringType"),
Salt: aws.String("StringType"),
},
}
resp, err := svc.ConfirmDevice(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:30,代码来源:examples_test.go
示例9: ExampleCognitoIdentityProvider_ListUserPools
func ExampleCognitoIdentityProvider_ListUserPools() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:25,代码来源:examples_test.go
示例10: ExampleCognitoIdentityProvider_SignUp
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)
}
开发者ID:Xercoy,项目名称:aws-sdk-go,代码行数:35,代码来源:examples_test.go
示例11: ExampleCognitoIdentityProvider_AdminRespondToAuthChallenge
func ExampleCognitoIdentityProvider_AdminRespondToAuthChallenge() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.AdminRespondToAuthChallengeInput{
ChallengeName: aws.String("ChallengeNameType"), // Required
ClientId: aws.String("ClientIdType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
ChallengeResponses: map[string]*string{
"Key": aws.String("StringType"), // Required
// More values...
},
Session: aws.String("SessionType"),
}
resp, err := svc.AdminRespondToAuthChallenge(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:31,代码来源:examples_test.go
示例12: ExampleCognitoIdentityProvider_CreateUserImportJob
func ExampleCognitoIdentityProvider_CreateUserImportJob() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.CreateUserImportJobInput{
CloudWatchLogsRoleArn: aws.String("ArnType"), // Required
JobName: aws.String("UserImportJobNameType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
}
resp, err := svc.CreateUserImportJob(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go
示例13: ExampleCognitoIdentityProvider_ConfirmSignUp
func ExampleCognitoIdentityProvider_ConfirmSignUp() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:28,代码来源:examples_test.go
示例14: ExampleCognitoIdentityProvider_DeleteUserAttributes
func ExampleCognitoIdentityProvider_DeleteUserAttributes() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:28,代码来源:examples_test.go
示例15: ExampleCognitoIdentityProvider_DescribeUserPoolClient
func ExampleCognitoIdentityProvider_DescribeUserPoolClient() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:25,代码来源:examples_test.go
示例16: ExampleCognitoIdentityProvider_ForgetDevice
func ExampleCognitoIdentityProvider_ForgetDevice() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.ForgetDeviceInput{
DeviceKey: aws.String("DeviceKeyType"), // Required
AccessToken: aws.String("TokenModelType"),
}
resp, err := svc.ForgetDevice(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:25,代码来源:examples_test.go
示例17: ExampleCognitoIdentityProvider_AdminInitiateAuth
func ExampleCognitoIdentityProvider_AdminInitiateAuth() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.AdminInitiateAuthInput{
AuthFlow: aws.String("AuthFlowType"), // Required
ClientId: aws.String("ClientIdType"), // Required
UserPoolId: aws.String("UserPoolIdType"), // Required
AuthParameters: map[string]*string{
"Key": aws.String("StringType"), // Required
// More values...
},
ClientMetadata: map[string]*string{
"Key": aws.String("StringType"), // Required
// More values...
},
}
resp, err := svc.AdminInitiateAuth(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:34,代码来源:examples_test.go
示例18: ExampleCognitoIdentityProvider_UpdateUserAttributes
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)
}
开发者ID:Xercoy,项目名称:aws-sdk-go,代码行数:25,代码来源:examples_test.go
示例19: ExampleCognitoIdentityProvider_AdminListDevices
func ExampleCognitoIdentityProvider_AdminListDevices() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
params := &cognitoidentityprovider.AdminListDevicesInput{
UserPoolId: aws.String("UserPoolIdType"), // Required
Username: aws.String("UsernameType"), // Required
Limit: aws.Int64(1),
PaginationToken: aws.String("SearchPaginationTokenType"),
}
resp, err := svc.AdminListDevices(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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:27,代码来源:examples_test.go
示例20: ExampleCognitoIdentityProvider_VerifyUserAttribute
func ExampleCognitoIdentityProvider_VerifyUserAttribute() {
sess, err := session.NewSession()
if err != nil {
fmt.Println("failed to create session,", err)
return
}
svc := cognitoidentityprovider.New(sess)
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)
}
开发者ID:acquia,项目名称:fifo2kinesis,代码行数:26,代码来源:examples_test.go
注:本文中的github.com/aws/aws-sdk-go/service/cognitoidentityprovider.New函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论