1. Packages
  2. AWS Classic
  3. API Docs
  4. apigateway
  5. getAuthorizer

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

aws.apigateway.getAuthorizer

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:apigateway/getAuthorizer:getAuthorizer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AuthorizerId string
    Authorizer identifier.
    RestApiId string
    ID of the associated REST API.
    AuthorizerId string
    Authorizer identifier.
    RestApiId string
    ID of the associated REST API.
    authorizerId String
    Authorizer identifier.
    restApiId String
    ID of the associated REST API.
    authorizerId string
    Authorizer identifier.
    restApiId string
    ID of the associated REST API.
    authorizer_id str
    Authorizer identifier.
    rest_api_id str
    ID of the associated REST API.
    authorizerId String
    Authorizer identifier.
    restApiId String
    ID of the associated REST API.

    getAuthorizer Result

    The following output properties are available:

    Arn string
    ARN of the API Gateway Authorizer.
    AuthorizerCredentials string
    Credentials required for the authorizer.
    AuthorizerId string
    AuthorizerResultTtlInSeconds int
    TTL of cached authorizer results in seconds.
    AuthorizerUri 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.
    IdentityValidationExpression string
    Validation expression for the incoming identity.
    Name string
    Name of the authorizer.
    ProviderArns List<string>
    List of the Amazon Cognito user pool ARNs.
    RestApiId string
    Type string
    Type of the authorizer.
    Arn string
    ARN of the API Gateway Authorizer.
    AuthorizerCredentials string
    Credentials required for the authorizer.
    AuthorizerId string
    AuthorizerResultTtlInSeconds int
    TTL of cached authorizer results in seconds.
    AuthorizerUri 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.
    IdentityValidationExpression string
    Validation expression for the incoming identity.
    Name string
    Name of the authorizer.
    ProviderArns []string
    List of the Amazon Cognito user pool ARNs.
    RestApiId string
    Type string
    Type of the authorizer.
    arn String
    ARN of the API Gateway Authorizer.
    authorizerCredentials String
    Credentials required for the authorizer.
    authorizerId String
    authorizerResultTtlInSeconds Integer
    TTL of cached authorizer results in seconds.
    authorizerUri 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.
    identityValidationExpression String
    Validation expression for the incoming identity.
    name String
    Name of the authorizer.
    providerArns List<String>
    List of the Amazon Cognito user pool ARNs.
    restApiId String
    type String
    Type of the authorizer.
    arn string
    ARN of the API Gateway Authorizer.
    authorizerCredentials string
    Credentials required for the authorizer.
    authorizerId string
    authorizerResultTtlInSeconds number
    TTL of cached authorizer results in seconds.
    authorizerUri 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.
    identityValidationExpression string
    Validation expression for the incoming identity.
    name string
    Name of the authorizer.
    providerArns string[]
    List of the Amazon Cognito user pool ARNs.
    restApiId string
    type string
    Type of the authorizer.
    arn str
    ARN of the API Gateway Authorizer.
    authorizer_credentials str
    Credentials required for the authorizer.
    authorizer_id str
    authorizer_result_ttl_in_seconds int
    TTL of cached authorizer results in seconds.
    authorizer_uri 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_expression str
    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_id str
    type str
    Type of the authorizer.
    arn String
    ARN of the API Gateway Authorizer.
    authorizerCredentials String
    Credentials required for the authorizer.
    authorizerId String
    authorizerResultTtlInSeconds Number
    TTL of cached authorizer results in seconds.
    authorizerUri 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.
    identityValidationExpression String
    Validation expression for the incoming identity.
    name String
    Name of the authorizer.
    providerArns List<String>
    List of the Amazon Cognito user pool ARNs.
    restApiId String
    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 aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi