Skip to content

Commit

Permalink
feat: cloudformation registry update (#641)
Browse files Browse the repository at this point in the history
* feat: cloudformation registry update

* chore: self mutation

Signed-off-by: github-actions <github-actions@github.com>

---------

Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: mergify <mergify@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent 4fa1604 commit cb26027
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# datadog-monitors-monitor

> AWS CDK [L1 construct] and data structures for the [AWS CloudFormation Registry] type `Datadog::Monitors::Monitor` v4.7.1.
> AWS CDK [L1 construct] and data structures for the [AWS CloudFormation Registry] type `Datadog::Monitors::Monitor` v4.8.0.
[L1 construct]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html
[AWS CloudFormation Registry]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html

## Description

Datadog Monitor 4.7.1
Datadog Monitor 4.8.0

## Usage

Expand Down Expand Up @@ -35,7 +35,7 @@ You can find more information about activating this type in the [AWS CloudFormat

This library is auto-generated and published to all supported programming languages by the [cdklabs/cdk-cloudformation] project based on the API schema published for `Datadog::Monitors::Monitor`.

* Issues related to this generated library should be [reported here](https://github.com/cdklabs/cdk-cloudformation/issues/new?title=Issue+with+%40cdk-cloudformation%2Fdatadog-monitors-monitor+v4.7.1).
* Issues related to this generated library should be [reported here](https://github.com/cdklabs/cdk-cloudformation/issues/new?title=Issue+with+%40cdk-cloudformation%2Fdatadog-monitors-monitor+v4.8.0).
* Issues related to `Datadog::Monitors::Monitor` should be reported to the [publisher](undefined).

[cdklabs/cdk-cloudformation]: https://github.com/cdklabs/cdk-cloudformation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@cdk-cloudformation/datadog-monitors-monitor",
"description": "Datadog Monitor 4.7.1",
"version": "4.7.1-alpha.7",
"description": "Datadog Monitor 4.8.0",
"version": "4.8.0-alpha.7",
"author": {
"name": "Amazon Web Services",
"url": "https://aws.amazon.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as cdk from 'aws-cdk-lib';
import * as constructs from 'constructs';

/**
* Datadog Monitor 4.7.1
* Datadog Monitor 4.8.0
*
* @schema CfnMonitorProps
*/
Expand Down Expand Up @@ -76,6 +76,13 @@ export interface CfnMonitorProps {
*/
readonly restrictedRoles?: string[];

/**
* Cloudformation specific options. This is only used by the Cloudformation resource.
*
* @schema CfnMonitorProps#CloudformationOptions
*/
readonly cloudformationOptions?: CloudformationOptions;

}

/**
Expand All @@ -95,6 +102,7 @@ export function toJson_CfnMonitorProps(obj: CfnMonitorProps | undefined): Record
'Type': obj.type,
'Multi': obj.multi,
'RestrictedRoles': obj.restrictedRoles?.map(y => y),
'CloudformationOptions': toJson_CloudformationOptions(obj.cloudformationOptions),
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
Expand Down Expand Up @@ -420,6 +428,33 @@ export enum CfnMonitorPropsType {
CI_HYPHEN_TESTS_ALERT = "ci-tests alert",
}

/**
* @schema CloudformationOptions
*/
export interface CloudformationOptions {
/**
* Whether or not to convert monitor query to lowercase when checking for drift.
*
* @schema CloudformationOptions#LowercaseQuery
*/
readonly lowercaseQuery?: boolean;

}

/**
* Converts an object of type 'CloudformationOptions' to JSON representation.
*/
/* eslint-disable max-len, quote-props */
export function toJson_CloudformationOptions(obj: CloudformationOptions | undefined): Record<string, any> | undefined {
if (obj === undefined) { return undefined; }
const result = {
'LowercaseQuery': obj.lowercaseQuery,
};
// filter undefined values
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}
/* eslint-enable max-len, quote-props */

/**
* Toggles the display of additional content sent in the monitor notification.
*
Expand Down
Loading

0 comments on commit cb26027

Please sign in to comment.