github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/apigateway/getAuthorizer.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 apigateway 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 // Provides details about a specific API Gateway Authorizer. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := apigateway.LookupAuthorizer(ctx, &apigateway.LookupAuthorizerArgs{ 32 // RestApiId: exampleAwsApiGatewayRestApi.Id, 33 // AuthorizerId: exampleAwsApiGatewayAuthorizers.Ids[0], 34 // }, nil) 35 // if err != nil { 36 // return err 37 // } 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 func LookupAuthorizer(ctx *pulumi.Context, args *LookupAuthorizerArgs, opts ...pulumi.InvokeOption) (*LookupAuthorizerResult, error) { 45 opts = internal.PkgInvokeDefaultOpts(opts) 46 var rv LookupAuthorizerResult 47 err := ctx.Invoke("aws:apigateway/getAuthorizer:getAuthorizer", args, &rv, opts...) 48 if err != nil { 49 return nil, err 50 } 51 return &rv, nil 52 } 53 54 // A collection of arguments for invoking getAuthorizer. 55 type LookupAuthorizerArgs struct { 56 // Authorizer identifier. 57 AuthorizerId string `pulumi:"authorizerId"` 58 // ID of the associated REST API. 59 RestApiId string `pulumi:"restApiId"` 60 } 61 62 // A collection of values returned by getAuthorizer. 63 type LookupAuthorizerResult struct { 64 // ARN of the API Gateway Authorizer. 65 Arn string `pulumi:"arn"` 66 // Credentials required for the authorizer. 67 AuthorizerCredentials string `pulumi:"authorizerCredentials"` 68 AuthorizerId string `pulumi:"authorizerId"` 69 // TTL of cached authorizer results in seconds. 70 AuthorizerResultTtlInSeconds int `pulumi:"authorizerResultTtlInSeconds"` 71 // Authorizer's Uniform Resource Identifier (URI). 72 AuthorizerUri string `pulumi:"authorizerUri"` 73 // The provider-assigned unique ID for this managed resource. 74 Id string `pulumi:"id"` 75 // Source of the identity in an incoming request. 76 IdentitySource string `pulumi:"identitySource"` 77 // Validation expression for the incoming identity. 78 IdentityValidationExpression string `pulumi:"identityValidationExpression"` 79 // Name of the authorizer. 80 Name string `pulumi:"name"` 81 // List of the Amazon Cognito user pool ARNs. 82 ProviderArns []string `pulumi:"providerArns"` 83 RestApiId string `pulumi:"restApiId"` 84 // Type of the authorizer. 85 Type string `pulumi:"type"` 86 } 87 88 func LookupAuthorizerOutput(ctx *pulumi.Context, args LookupAuthorizerOutputArgs, opts ...pulumi.InvokeOption) LookupAuthorizerResultOutput { 89 return pulumi.ToOutputWithContext(context.Background(), args). 90 ApplyT(func(v interface{}) (LookupAuthorizerResult, error) { 91 args := v.(LookupAuthorizerArgs) 92 r, err := LookupAuthorizer(ctx, &args, opts...) 93 var s LookupAuthorizerResult 94 if r != nil { 95 s = *r 96 } 97 return s, err 98 }).(LookupAuthorizerResultOutput) 99 } 100 101 // A collection of arguments for invoking getAuthorizer. 102 type LookupAuthorizerOutputArgs struct { 103 // Authorizer identifier. 104 AuthorizerId pulumi.StringInput `pulumi:"authorizerId"` 105 // ID of the associated REST API. 106 RestApiId pulumi.StringInput `pulumi:"restApiId"` 107 } 108 109 func (LookupAuthorizerOutputArgs) ElementType() reflect.Type { 110 return reflect.TypeOf((*LookupAuthorizerArgs)(nil)).Elem() 111 } 112 113 // A collection of values returned by getAuthorizer. 114 type LookupAuthorizerResultOutput struct{ *pulumi.OutputState } 115 116 func (LookupAuthorizerResultOutput) ElementType() reflect.Type { 117 return reflect.TypeOf((*LookupAuthorizerResult)(nil)).Elem() 118 } 119 120 func (o LookupAuthorizerResultOutput) ToLookupAuthorizerResultOutput() LookupAuthorizerResultOutput { 121 return o 122 } 123 124 func (o LookupAuthorizerResultOutput) ToLookupAuthorizerResultOutputWithContext(ctx context.Context) LookupAuthorizerResultOutput { 125 return o 126 } 127 128 // ARN of the API Gateway Authorizer. 129 func (o LookupAuthorizerResultOutput) Arn() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.Arn }).(pulumi.StringOutput) 131 } 132 133 // Credentials required for the authorizer. 134 func (o LookupAuthorizerResultOutput) AuthorizerCredentials() pulumi.StringOutput { 135 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.AuthorizerCredentials }).(pulumi.StringOutput) 136 } 137 138 func (o LookupAuthorizerResultOutput) AuthorizerId() pulumi.StringOutput { 139 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.AuthorizerId }).(pulumi.StringOutput) 140 } 141 142 // TTL of cached authorizer results in seconds. 143 func (o LookupAuthorizerResultOutput) AuthorizerResultTtlInSeconds() pulumi.IntOutput { 144 return o.ApplyT(func(v LookupAuthorizerResult) int { return v.AuthorizerResultTtlInSeconds }).(pulumi.IntOutput) 145 } 146 147 // Authorizer's Uniform Resource Identifier (URI). 148 func (o LookupAuthorizerResultOutput) AuthorizerUri() pulumi.StringOutput { 149 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.AuthorizerUri }).(pulumi.StringOutput) 150 } 151 152 // The provider-assigned unique ID for this managed resource. 153 func (o LookupAuthorizerResultOutput) Id() pulumi.StringOutput { 154 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.Id }).(pulumi.StringOutput) 155 } 156 157 // Source of the identity in an incoming request. 158 func (o LookupAuthorizerResultOutput) IdentitySource() pulumi.StringOutput { 159 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.IdentitySource }).(pulumi.StringOutput) 160 } 161 162 // Validation expression for the incoming identity. 163 func (o LookupAuthorizerResultOutput) IdentityValidationExpression() pulumi.StringOutput { 164 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.IdentityValidationExpression }).(pulumi.StringOutput) 165 } 166 167 // Name of the authorizer. 168 func (o LookupAuthorizerResultOutput) Name() pulumi.StringOutput { 169 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.Name }).(pulumi.StringOutput) 170 } 171 172 // List of the Amazon Cognito user pool ARNs. 173 func (o LookupAuthorizerResultOutput) ProviderArns() pulumi.StringArrayOutput { 174 return o.ApplyT(func(v LookupAuthorizerResult) []string { return v.ProviderArns }).(pulumi.StringArrayOutput) 175 } 176 177 func (o LookupAuthorizerResultOutput) RestApiId() pulumi.StringOutput { 178 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.RestApiId }).(pulumi.StringOutput) 179 } 180 181 // Type of the authorizer. 182 func (o LookupAuthorizerResultOutput) Type() pulumi.StringOutput { 183 return o.ApplyT(func(v LookupAuthorizerResult) string { return v.Type }).(pulumi.StringOutput) 184 } 185 186 func init() { 187 pulumi.RegisterOutputType(LookupAuthorizerResultOutput{}) 188 }