Skip to content

Commit

Permalink
chore(release): 1.47.0 (aws#8719)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 24, 2020
2 parents 63860b2 + e64fd55 commit c2b499a
Show file tree
Hide file tree
Showing 136 changed files with 5,069 additions and 2,027 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.47.0](https://github.com/aws/aws-cdk/compare/v1.46.0...v1.47.0) (2020-06-24)


### ⚠ BREAKING CHANGES

* **stepfunctions-tasks:** `Dynamo*` tasks no longer implement`IStepFunctionsTask` and have been replaced by constructs that can be instantiated directly. See README for examples

### Features

* **cfn-include:** add support for retrieving parameter objects ([#8658](https://github.com/aws/aws-cdk/issues/8658)) ([52dc123](https://github.com/aws/aws-cdk/commit/52dc123ba8696abcfad99d8093e98cd39b5b104f)), closes [#8657](https://github.com/aws/aws-cdk/issues/8657)
* **cfn-include:** support logical id overrides ([#8529](https://github.com/aws/aws-cdk/issues/8529)) ([d9c4f5e](https://github.com/aws/aws-cdk/commit/d9c4f5e67c54e1a2a436978fbc28fffd92b24cd6)), closes [#7375](https://github.com/aws/aws-cdk/issues/7375)
* **cloudwatch:** CompositeAlarm ([#8498](https://github.com/aws/aws-cdk/issues/8498)) ([1e6d293](https://github.com/aws/aws-cdk/commit/1e6d293f4c445318b11bd6fe998325688a675807))
* **efs:** access point ([#8631](https://github.com/aws/aws-cdk/issues/8631)) ([dde0ef5](https://github.com/aws/aws-cdk/commit/dde0ef52cc0cdbc40fd212f518f3cee4f30450b9))
* **stepfunctions:** grant APIs for state machine construct ([#8486](https://github.com/aws/aws-cdk/issues/8486)) ([fe71364](https://github.com/aws/aws-cdk/commit/fe71364b6cd8274e937cc2dc9185249dcbbb9388)), closes [#5933](https://github.com/aws/aws-cdk/issues/5933)
* **stepfunctions-tasks:** task constructs to call DynamoDB APIs ([#8466](https://github.com/aws/aws-cdk/issues/8466)) ([a7cb3b7](https://github.com/aws/aws-cdk/commit/a7cb3b7633c433ecb0619c030914bfa497ee39bc)), closes [#8108](https://github.com/aws/aws-cdk/issues/8108)


### Bug Fixes

* **appsync:** Not to throw an Error even if 'additionalAuthorizationModes' is undefined ([#8673](https://github.com/aws/aws-cdk/issues/8673)) ([6b5d77b](https://github.com/aws/aws-cdk/commit/6b5d77b452bccb35564d6acee118112156149eb0)), closes [#8666](https://github.com/aws/aws-cdk/issues/8666) [#8668](https://github.com/aws/aws-cdk/issues/8668)
* **cli:** cannot change policies or trust after initial bootstrap ([#8677](https://github.com/aws/aws-cdk/issues/8677)) ([6e6b23e](https://github.com/aws/aws-cdk/commit/6e6b23e329d8a1b6455210768371a5ab9de478ef)), closes [#6581](https://github.com/aws/aws-cdk/issues/6581)
* **cli:** crash on tiny reported terminal width ([#8675](https://github.com/aws/aws-cdk/issues/8675)) ([a186c24](https://github.com/aws/aws-cdk/commit/a186c24918fddc697270b794b6603add5a47e947)), closes [#8667](https://github.com/aws/aws-cdk/issues/8667)
* **toolkit:** CLI tool fails on CloudFormation Throttling ([#8711](https://github.com/aws/aws-cdk/issues/8711)) ([e512a40](https://github.com/aws/aws-cdk/commit/e512a4057b21d32432d4dc7ac14ae7caa812265d)), closes [#5637](https://github.com/aws/aws-cdk/issues/5637)

## [1.46.0](https://github.com/aws/aws-cdk/compare/v1.45.0...v1.46.0) (2020-06-19)


Expand Down
12 changes: 12 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ removed:@aws-cdk/core.BootstraplessSynthesizer.DEFAULT_ASSET_PUBLISHING_ROLE_ARN
removed:@aws-cdk/core.DefaultStackSynthesizer.DEFAULT_ASSET_PUBLISHING_ROLE_ARN
removed:@aws-cdk/core.DefaultStackSynthesizerProps.assetPublishingExternalId
removed:@aws-cdk/core.DefaultStackSynthesizerProps.assetPublishingRoleArn

# merge asset manifest schema into cloud assembly schema
removed:@aws-cdk/cdk-assets-schema.AssetManifestSchema
removed:@aws-cdk/cdk-assets-schema.AwsDestination
removed:@aws-cdk/cdk-assets-schema.DockerImageAsset
removed:@aws-cdk/cdk-assets-schema.DockerImageDestination
removed:@aws-cdk/cdk-assets-schema.DockerImageSource
removed:@aws-cdk/cdk-assets-schema.FileAsset
removed:@aws-cdk/cdk-assets-schema.FileDestination
removed:@aws-cdk/cdk-assets-schema.FileSource
removed:@aws-cdk/cdk-assets-schema.ManifestFile
removed:@aws-cdk/cdk-assets-schema.FileAssetPackaging
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"tools/*"
],
"rejectCycles": "true",
"version": "1.46.0"
"version": "1.47.0"
}
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
"@aws-cdk/aws-ecr-assets/minimatch/**",
"@aws-cdk/aws-lambda-nodejs/parcel-bundler",
"@aws-cdk/aws-lambda-nodejs/parcel-bundler/**",
"@aws-cdk/cdk-assets-schema/semver",
"@aws-cdk/cdk-assets-schema/semver/**",
"@aws-cdk/cloud-assembly-schema/jsonschema",
"@aws-cdk/cloud-assembly-schema/jsonschema/**",
"@aws-cdk/cloud-assembly-schema/semver",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cdk-build-tools": "0.0.0",
"jest": "^25.5.4",
"pkglint": "0.0.0",
"ts-jest": "^26.1.0"
"ts-jest": "^26.1.1"
},
"dependencies": {
"@aws-cdk/cloudformation-diff": "0.0.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,7 @@ export class GraphQLApi extends Construct {
props.authorizationConfig.defaultAuthorization.userPoolConfig!,
)
: undefined,
additionalAuthenticationProviders: props.authorizationConfig
?.additionalAuthorizationModes!.length
? this.formatAdditionalAuthorizationModes(
props.authorizationConfig!.additionalAuthorizationModes!,
)
: undefined,
additionalAuthenticationProviders: this.formatAdditionalAuthenticationProviders(props),
});

this.apiId = this.api.attrApiId;
Expand Down Expand Up @@ -569,6 +564,11 @@ export class GraphQLApi extends Construct {
[],
);
}

private formatAdditionalAuthenticationProviders(props: GraphQLApiProps): CfnGraphQLApi.AdditionalAuthenticationProviderProperty[] | undefined {
const authModes = props.authorizationConfig?.additionalAuthorizationModes;
return authModes ? this.formatAdditionalAuthorizationModes(authModes) : undefined;
}
}

/**
Expand Down
21 changes: 18 additions & 3 deletions packages/@aws-cdk/aws-appsync/test/appsync.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
import '@aws-cdk/assert/jest';
import {} from '../lib';
import * as cdk from '@aws-cdk/core';
import * as path from 'path';
import * as appsync from '../lib';

test('No tests are specified for this package', () => {
expect(true).toBe(true);
test('should not throw an Error', () => {
// Given
const stack = new cdk.Stack();

// When
const when = () => {
new appsync.GraphQLApi(stack, 'api', {
authorizationConfig: {},
name: 'api',
schemaDefinitionFile: path.join(__dirname, 'schema.graphql'),
});
};

// Then
expect(when).not.toThrow();
});
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"aws-sdk": "^2.699.0",
"aws-sdk": "^2.703.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"aws-sdk": "^2.699.0",
"aws-sdk": "^2.703.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
23 changes: 23 additions & 0 deletions packages/@aws-cdk/aws-cloudwatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,29 @@ const alarm = new cloudwatch.Alarm(stack, 'Alarm', { /* ... */ });
alarm.addAlarmAction(new cw_actions.SnsAction(topic));
```

### Composite Alarms

[Composite Alarms](https://aws.amazon.com/about-aws/whats-new/2020/03/amazon-cloudwatch-now-allows-you-to-combine-multiple-alarms/)
can be created from existing Alarm resources.

```ts
const alarmRule = AlarmRule.anyOf(
AlarmRule.allOf(
AlarmRule.anyOf(
alarm1,
AlarmRule.fromAlarm(alarm2, AlarmState.OK),
alarm3,
),
AlarmRule.not(AlarmRule.fromAlarm(alarm4, AlarmState.INSUFFICIENT_DATA)),
),
AlarmRule.fromBoolean(false),
);

new CompositeAlarm(this, 'MyAwesomeCompositeAlarm', {
alarmRule,
});
```

### A note on units

In CloudWatch, Metrics datums are emitted with units, such as `seconds` or
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudwatch/lib/alarm-action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from '@aws-cdk/core';
import { IAlarm } from './alarm';
import { IAlarm } from './alarm-base';

/**
* Interface for objects that can be the targets of CloudWatch alarm actions
Expand Down
96 changes: 96 additions & 0 deletions packages/@aws-cdk/aws-cloudwatch/lib/alarm-base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import { IResource, Resource } from '@aws-cdk/core';
import { IAlarmAction } from './alarm-action';

/**
* Interface for Alarm Rule.
*/
export interface IAlarmRule {

/**
* serialized representation of Alarm Rule to be used when building the Composite Alarm resource.
*/
renderAlarmRule(): string;

}

/**
* Represents a CloudWatch Alarm
*/
export interface IAlarm extends IAlarmRule, IResource {
/**
* Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:Foo)
*
* @attribute
*/
readonly alarmArn: string;

/**
* Name of the alarm
*
* @attribute
*/
readonly alarmName: string;
}

/**
* The base class for Alarm and CompositeAlarm resources.
*/
export abstract class AlarmBase extends Resource implements IAlarm {

/**
* @attribute
*/
public abstract readonly alarmArn: string;
public abstract readonly alarmName: string;

protected alarmActionArns?: string[];
protected insufficientDataActionArns?: string[];
protected okActionArns?: string[];

/**
* AlarmRule indicating ALARM state for Alarm.
*/
public renderAlarmRule(): string {
return `ALARM(${this.alarmArn})`;
}

/**
* Trigger this action if the alarm fires
*
* Typically the ARN of an SNS topic or ARN of an AutoScaling policy.
*/
public addAlarmAction(...actions: IAlarmAction[]) {
if (this.alarmActionArns === undefined) {
this.alarmActionArns = [];
}

this.alarmActionArns.push(...actions.map(a => a.bind(this, this).alarmActionArn));
}

/**
* Trigger this action if there is insufficient data to evaluate the alarm
*
* Typically the ARN of an SNS topic or ARN of an AutoScaling policy.
*/
public addInsufficientDataAction(...actions: IAlarmAction[]) {
if (this.insufficientDataActionArns === undefined) {
this.insufficientDataActionArns = [];
}

this.insufficientDataActionArns.push(...actions.map(a => a.bind(this, this).alarmActionArn));
}

/**
* Trigger this action if the alarm returns from breaching state into ok state
*
* Typically the ARN of an SNS topic or ARN of an AutoScaling policy.
*/
public addOkAction(...actions: IAlarmAction[]) {
if (this.okActionArns === undefined) {
this.okActionArns = [];
}

this.okActionArns.push(...actions.map(a => a.bind(this, this).alarmActionArn));
}

}
Loading

0 comments on commit c2b499a

Please sign in to comment.