Skip to content

Commit

Permalink
feat(appsync): AuthorizationConfig along with Cfn definition
Browse files Browse the repository at this point in the history
  • Loading branch information
haruharuharuby committed Aug 26, 2020
1 parent dbbe4bf commit 4500ce8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions packages/@aws-cdk/aws-appsync/lib/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,30 +206,30 @@ export class DynamoDbDataSource extends BackedDataSource {
/**
* The authorization config in case the HTTP endpoint requires authorization
*/
export interface HttpDataSourceAuthorizationConfig {
export interface AwsIamConfig {
/**
* The authorization type required by the HTTP endpoint
*/
readonly authorizationType: 'AWS_IAM';
/**
* The IAM configuration required by the HTTP endpoint
* The IAM signing configuration required by the HTTP endpoint
*/
readonly awsIamConfig: HttpDataSourceIamConfig;
readonly awsIamConfig: AwsIamConfigSigning;
}

/**
* The IAM configuration required by the HTTP endpoint
* The IAM signing config in case the HTTP endpoint requires authorization
*/
export interface AwsIamConfig {
/**
* The signing region for AWS IAM authorization
*/
readonly signingRegion: string;

/**
* The signing service name for AWS IAM authorization
*/
readonly signingServiceName: string;
export interface AwsIamConfigSigning {
/**
* The signing region for AWS IAM authorization
*/
readonly signingRegion: string;
/**
* The signing service name for AWS IAM authorization
*/
readonly signingServiceName: string;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-appsync/lib/graphqlapi-base.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ITable } from '@aws-cdk/aws-dynamodb';
import { IFunction } from '@aws-cdk/aws-lambda';
import { CfnResource, IResource, Resource } from '@aws-cdk/core';
import { DynamoDbDataSource, HttpDataSource, LambdaDataSource, NoneDataSource, HttpDataSourceAuthorizationConfig } from './data-source';
import { DynamoDbDataSource, HttpDataSource, LambdaDataSource, NoneDataSource, AwsIamConfig } from './data-source';

/**
* Optional configuration for data sources
Expand Down Expand Up @@ -29,7 +29,7 @@ export interface HttpDataSourceOptions extends DataSourceOptions {
/**
* The authorization config in case the HTTP endpoint requires authorization
*/
readonly authorizationConfig?: HttpDataSourceAuthorizationConfig;
readonly authorizationConfig?: AwsIamConfig;
}

/**
Expand Down

0 comments on commit 4500ce8

Please sign in to comment.