Class CognitoUserPoolsAuthorizer
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
Cognito user pools based custom authorizer.
public class CognitoUserPoolsAuthorizer : Authorizer, IAuthorizer
- Inheritance
-
CognitoUserPoolsAuthorizer
- Implements
- Inherited Members
Examples
Resource books;
var userPool = new UserPool(this, "UserPool");
var auth = new CognitoUserPoolsAuthorizer(this, "booksAuthorizer", new CognitoUserPoolsAuthorizerProps {
CognitoUserPools = new [] { userPool }
});
books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
Authorizer = auth,
AuthorizationType = AuthorizationType.COGNITO
});
Remarks
Resource: AWS::ApiGateway::Authorizer
ExampleMetadata: infused
Constructors
CognitoUserPoolsAuthorizer(Construct, string, ICognitoUserPoolsAuthorizerProps)
public CognitoUserPoolsAuthorizer(Construct scope, string id, ICognitoUserPoolsAuthorizerProps props)
Parameters
scope
Constructid
stringprops
ICognitoUserPoolsAuthorizerProps
Properties
AuthorizationType
The authorization type of this authorizer.
public override AuthorizationType? AuthorizationType { get; }
Property Value
AuthorizerArn
The ARN of the authorizer to be used in permission policies, such as IAM and resource-based grants.
public virtual string AuthorizerArn { get; }
Property Value
Remarks
Attribute: true
AuthorizerId
The id of the authorizer.
public override string AuthorizerId { get; }
Property Value
Remarks
Attribute: true