aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
89 stars 79 forks source link

feat: add metrics metadata for auth mode and custom operations #2966

Closed dpilch closed 1 month ago

dpilch commented 1 month ago

Description of changes

Add additional metrics metadata for authorizationMode and customOperations. The metric data is stored in the CFN stack description.

{
  "metadata": {
    "dataSources": "dynamodb,mysql,postgres", // exists today

    // new fields below
    /*
      Possible options
      'aws_iam',
      'openid_connect',
      'amazon_cognito_identity_pools',
      'amazon_congnito_user_pools',
      'api_key',
      'aws_lambda',
    */
    "authorizationModes", "api_key,aws_lambda",
    "customOperations": "queries,mutations"
  }
}
CDK / CloudFormation Parameters Changed

The metrics are stored in the CFN description. No real functional change, but the descriptions will be updated.

Issue #, if available

N/A

Description of how you validated changes

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

palpatim commented 1 month ago

As far as I can tell this is a typo in the PR description, but calling it out in case:

    /*
      Possible options
      'aws_iam',
      'openid_connect',
      'amazon_cognito_identity_pools',
      'amazon_congnit_user_pools',
      'api_key',
      'aws_lambda',
    */
dpilch commented 1 month ago

Yes, typo in the description. We can see amazon_congnito_user_pools is set correctly in the unit test.