AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.apigateway.getAuthorizer
Explore with Pulumi AI
Provides details about a specific API Gateway Authorizer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.apigateway.getAuthorizer({
    restApiId: exampleAwsApiGatewayRestApi.id,
    authorizerId: exampleAwsApiGatewayAuthorizers.ids[0],
});
import pulumi
import pulumi_aws as aws
example = aws.apigateway.get_authorizer(rest_api_id=example_aws_api_gateway_rest_api["id"],
    authorizer_id=example_aws_api_gateway_authorizers["ids"])
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigateway.LookupAuthorizer(ctx, &apigateway.LookupAuthorizerArgs{
			RestApiId:    exampleAwsApiGatewayRestApi.Id,
			AuthorizerId: exampleAwsApiGatewayAuthorizers.Ids[0],
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.ApiGateway.GetAuthorizer.Invoke(new()
    {
        RestApiId = exampleAwsApiGatewayRestApi.Id,
        AuthorizerId = exampleAwsApiGatewayAuthorizers.Ids[0],
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApigatewayFunctions;
import com.pulumi.aws.apigateway.inputs.GetAuthorizerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = ApigatewayFunctions.getAuthorizer(GetAuthorizerArgs.builder()
            .restApiId(exampleAwsApiGatewayRestApi.id())
            .authorizerId(exampleAwsApiGatewayAuthorizers.ids()[0])
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:apigateway:getAuthorizer
      arguments:
        restApiId: ${exampleAwsApiGatewayRestApi.id}
        authorizerId: ${exampleAwsApiGatewayAuthorizers.ids[0]}
Using getAuthorizer
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAuthorizer(args: GetAuthorizerArgs, opts?: InvokeOptions): Promise<GetAuthorizerResult>
function getAuthorizerOutput(args: GetAuthorizerOutputArgs, opts?: InvokeOptions): Output<GetAuthorizerResult>def get_authorizer(authorizer_id: Optional[str] = None,
                   rest_api_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAuthorizerResult
def get_authorizer_output(authorizer_id: Optional[pulumi.Input[str]] = None,
                   rest_api_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAuthorizerResult]func LookupAuthorizer(ctx *Context, args *LookupAuthorizerArgs, opts ...InvokeOption) (*LookupAuthorizerResult, error)
func LookupAuthorizerOutput(ctx *Context, args *LookupAuthorizerOutputArgs, opts ...InvokeOption) LookupAuthorizerResultOutput> Note: This function is named LookupAuthorizer in the Go SDK.
public static class GetAuthorizer 
{
    public static Task<GetAuthorizerResult> InvokeAsync(GetAuthorizerArgs args, InvokeOptions? opts = null)
    public static Output<GetAuthorizerResult> Invoke(GetAuthorizerInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAuthorizerResult> getAuthorizer(GetAuthorizerArgs args, InvokeOptions options)
public static Output<GetAuthorizerResult> getAuthorizer(GetAuthorizerArgs args, InvokeOptions options)
fn::invoke:
  function: aws:apigateway/getAuthorizer:getAuthorizer
  arguments:
    # arguments dictionaryThe following arguments are supported:
- string
- Authorizer identifier.
- RestApi stringId 
- ID of the associated REST API.
- string
- Authorizer identifier.
- RestApi stringId 
- ID of the associated REST API.
- String
- Authorizer identifier.
- restApi StringId 
- ID of the associated REST API.
- string
- Authorizer identifier.
- restApi stringId 
- ID of the associated REST API.
- str
- Authorizer identifier.
- rest_api_ strid 
- ID of the associated REST API.
- String
- Authorizer identifier.
- restApi StringId 
- ID of the associated REST API.
getAuthorizer Result
The following output properties are available:
- Arn string
- ARN of the API Gateway Authorizer.
- string
- Credentials required for the authorizer.
- string
- int
- TTL of cached authorizer results in seconds.
- string
- Authorizer's Uniform Resource Identifier (URI).
- Id string
- The provider-assigned unique ID for this managed resource.
- IdentitySource string
- Source of the identity in an incoming request.
- IdentityValidation stringExpression 
- Validation expression for the incoming identity.
- Name string
- Name of the authorizer.
- ProviderArns List<string>
- List of the Amazon Cognito user pool ARNs.
- RestApi stringId 
- Type string
- Type of the authorizer.
- Arn string
- ARN of the API Gateway Authorizer.
- string
- Credentials required for the authorizer.
- string
- int
- TTL of cached authorizer results in seconds.
- string
- Authorizer's Uniform Resource Identifier (URI).
- Id string
- The provider-assigned unique ID for this managed resource.
- IdentitySource string
- Source of the identity in an incoming request.
- IdentityValidation stringExpression 
- Validation expression for the incoming identity.
- Name string
- Name of the authorizer.
- ProviderArns []string
- List of the Amazon Cognito user pool ARNs.
- RestApi stringId 
- Type string
- Type of the authorizer.
- arn String
- ARN of the API Gateway Authorizer.
- String
- Credentials required for the authorizer.
- String
- Integer
- TTL of cached authorizer results in seconds.
- String
- Authorizer's Uniform Resource Identifier (URI).
- id String
- The provider-assigned unique ID for this managed resource.
- identitySource String
- Source of the identity in an incoming request.
- identityValidation StringExpression 
- Validation expression for the incoming identity.
- name String
- Name of the authorizer.
- providerArns List<String>
- List of the Amazon Cognito user pool ARNs.
- restApi StringId 
- type String
- Type of the authorizer.
- arn string
- ARN of the API Gateway Authorizer.
- string
- Credentials required for the authorizer.
- string
- number
- TTL of cached authorizer results in seconds.
- string
- Authorizer's Uniform Resource Identifier (URI).
- id string
- The provider-assigned unique ID for this managed resource.
- identitySource string
- Source of the identity in an incoming request.
- identityValidation stringExpression 
- Validation expression for the incoming identity.
- name string
- Name of the authorizer.
- providerArns string[]
- List of the Amazon Cognito user pool ARNs.
- restApi stringId 
- type string
- Type of the authorizer.
- arn str
- ARN of the API Gateway Authorizer.
- str
- Credentials required for the authorizer.
- str
- int
- TTL of cached authorizer results in seconds.
- str
- Authorizer's Uniform Resource Identifier (URI).
- id str
- The provider-assigned unique ID for this managed resource.
- identity_source str
- Source of the identity in an incoming request.
- identity_validation_ strexpression 
- Validation expression for the incoming identity.
- name str
- Name of the authorizer.
- provider_arns Sequence[str]
- List of the Amazon Cognito user pool ARNs.
- rest_api_ strid 
- type str
- Type of the authorizer.
- arn String
- ARN of the API Gateway Authorizer.
- String
- Credentials required for the authorizer.
- String
- Number
- TTL of cached authorizer results in seconds.
- String
- Authorizer's Uniform Resource Identifier (URI).
- id String
- The provider-assigned unique ID for this managed resource.
- identitySource String
- Source of the identity in an incoming request.
- identityValidation StringExpression 
- Validation expression for the incoming identity.
- name String
- Name of the authorizer.
- providerArns List<String>
- List of the Amazon Cognito user pool ARNs.
- restApi StringId 
- type String
- Type of the authorizer.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.