github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cognito/getIdentityPool.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package cognito 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Data source for managing an AWS Cognito Identity Pool. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := cognito.LookupIdentityPool(ctx, &cognito.LookupIdentityPoolArgs{ 34 // IdentityPoolName: "test pool", 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func LookupIdentityPool(ctx *pulumi.Context, args *LookupIdentityPoolArgs, opts ...pulumi.InvokeOption) (*LookupIdentityPoolResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupIdentityPoolResult 48 err := ctx.Invoke("aws:cognito/getIdentityPool:getIdentityPool", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getIdentityPool. 56 type LookupIdentityPoolArgs struct { 57 // The Cognito Identity Pool name. 58 IdentityPoolName string `pulumi:"identityPoolName"` 59 // A map of tags to assigned to the Identity Pool. 60 Tags map[string]string `pulumi:"tags"` 61 } 62 63 // A collection of values returned by getIdentityPool. 64 type LookupIdentityPoolResult struct { 65 // Whether the classic / basic authentication flow is enabled. 66 AllowClassicFlow bool `pulumi:"allowClassicFlow"` 67 // Whether the identity pool supports unauthenticated logins or not. 68 AllowUnauthenticatedIdentities bool `pulumi:"allowUnauthenticatedIdentities"` 69 // ARN of the Pool. 70 Arn string `pulumi:"arn"` 71 // An array of Amazon Cognito Identity user pools and their client IDs. 72 CognitoIdentityProviders []GetIdentityPoolCognitoIdentityProvider `pulumi:"cognitoIdentityProviders"` 73 // The "domain" by which Cognito will refer to your users. 74 DeveloperProviderName string `pulumi:"developerProviderName"` 75 // The provider-assigned unique ID for this managed resource. 76 Id string `pulumi:"id"` 77 IdentityPoolName string `pulumi:"identityPoolName"` 78 // Set of OpendID Connect provider ARNs. 79 OpenidConnectProviderArns []string `pulumi:"openidConnectProviderArns"` 80 // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity. 81 SamlProviderArns []string `pulumi:"samlProviderArns"` 82 // Key-Value pairs mapping provider names to provider app IDs. 83 SupportedLoginProviders map[string]string `pulumi:"supportedLoginProviders"` 84 // A map of tags to assigned to the Identity Pool. 85 Tags map[string]string `pulumi:"tags"` 86 } 87 88 func LookupIdentityPoolOutput(ctx *pulumi.Context, args LookupIdentityPoolOutputArgs, opts ...pulumi.InvokeOption) LookupIdentityPoolResultOutput { 89 return pulumi.ToOutputWithContext(context.Background(), args). 90 ApplyT(func(v interface{}) (LookupIdentityPoolResult, error) { 91 args := v.(LookupIdentityPoolArgs) 92 r, err := LookupIdentityPool(ctx, &args, opts...) 93 var s LookupIdentityPoolResult 94 if r != nil { 95 s = *r 96 } 97 return s, err 98 }).(LookupIdentityPoolResultOutput) 99 } 100 101 // A collection of arguments for invoking getIdentityPool. 102 type LookupIdentityPoolOutputArgs struct { 103 // The Cognito Identity Pool name. 104 IdentityPoolName pulumi.StringInput `pulumi:"identityPoolName"` 105 // A map of tags to assigned to the Identity Pool. 106 Tags pulumi.StringMapInput `pulumi:"tags"` 107 } 108 109 func (LookupIdentityPoolOutputArgs) ElementType() reflect.Type { 110 return reflect.TypeOf((*LookupIdentityPoolArgs)(nil)).Elem() 111 } 112 113 // A collection of values returned by getIdentityPool. 114 type LookupIdentityPoolResultOutput struct{ *pulumi.OutputState } 115 116 func (LookupIdentityPoolResultOutput) ElementType() reflect.Type { 117 return reflect.TypeOf((*LookupIdentityPoolResult)(nil)).Elem() 118 } 119 120 func (o LookupIdentityPoolResultOutput) ToLookupIdentityPoolResultOutput() LookupIdentityPoolResultOutput { 121 return o 122 } 123 124 func (o LookupIdentityPoolResultOutput) ToLookupIdentityPoolResultOutputWithContext(ctx context.Context) LookupIdentityPoolResultOutput { 125 return o 126 } 127 128 // Whether the classic / basic authentication flow is enabled. 129 func (o LookupIdentityPoolResultOutput) AllowClassicFlow() pulumi.BoolOutput { 130 return o.ApplyT(func(v LookupIdentityPoolResult) bool { return v.AllowClassicFlow }).(pulumi.BoolOutput) 131 } 132 133 // Whether the identity pool supports unauthenticated logins or not. 134 func (o LookupIdentityPoolResultOutput) AllowUnauthenticatedIdentities() pulumi.BoolOutput { 135 return o.ApplyT(func(v LookupIdentityPoolResult) bool { return v.AllowUnauthenticatedIdentities }).(pulumi.BoolOutput) 136 } 137 138 // ARN of the Pool. 139 func (o LookupIdentityPoolResultOutput) Arn() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupIdentityPoolResult) string { return v.Arn }).(pulumi.StringOutput) 141 } 142 143 // An array of Amazon Cognito Identity user pools and their client IDs. 144 func (o LookupIdentityPoolResultOutput) CognitoIdentityProviders() GetIdentityPoolCognitoIdentityProviderArrayOutput { 145 return o.ApplyT(func(v LookupIdentityPoolResult) []GetIdentityPoolCognitoIdentityProvider { 146 return v.CognitoIdentityProviders 147 }).(GetIdentityPoolCognitoIdentityProviderArrayOutput) 148 } 149 150 // The "domain" by which Cognito will refer to your users. 151 func (o LookupIdentityPoolResultOutput) DeveloperProviderName() pulumi.StringOutput { 152 return o.ApplyT(func(v LookupIdentityPoolResult) string { return v.DeveloperProviderName }).(pulumi.StringOutput) 153 } 154 155 // The provider-assigned unique ID for this managed resource. 156 func (o LookupIdentityPoolResultOutput) Id() pulumi.StringOutput { 157 return o.ApplyT(func(v LookupIdentityPoolResult) string { return v.Id }).(pulumi.StringOutput) 158 } 159 160 func (o LookupIdentityPoolResultOutput) IdentityPoolName() pulumi.StringOutput { 161 return o.ApplyT(func(v LookupIdentityPoolResult) string { return v.IdentityPoolName }).(pulumi.StringOutput) 162 } 163 164 // Set of OpendID Connect provider ARNs. 165 func (o LookupIdentityPoolResultOutput) OpenidConnectProviderArns() pulumi.StringArrayOutput { 166 return o.ApplyT(func(v LookupIdentityPoolResult) []string { return v.OpenidConnectProviderArns }).(pulumi.StringArrayOutput) 167 } 168 169 // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity. 170 func (o LookupIdentityPoolResultOutput) SamlProviderArns() pulumi.StringArrayOutput { 171 return o.ApplyT(func(v LookupIdentityPoolResult) []string { return v.SamlProviderArns }).(pulumi.StringArrayOutput) 172 } 173 174 // Key-Value pairs mapping provider names to provider app IDs. 175 func (o LookupIdentityPoolResultOutput) SupportedLoginProviders() pulumi.StringMapOutput { 176 return o.ApplyT(func(v LookupIdentityPoolResult) map[string]string { return v.SupportedLoginProviders }).(pulumi.StringMapOutput) 177 } 178 179 // A map of tags to assigned to the Identity Pool. 180 func (o LookupIdentityPoolResultOutput) Tags() pulumi.StringMapOutput { 181 return o.ApplyT(func(v LookupIdentityPoolResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 182 } 183 184 func init() { 185 pulumi.RegisterOutputType(LookupIdentityPoolResultOutput{}) 186 }