Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

aws-slack-cost-reporter

aws-slack-cost-reporter


Community icon

Community

9 Weekly downloads

Author Florian Siegel

Published

Repository github.com

License Apache-2.0

Registry www.npmjs.com


npm install aws-slack-cost-reporter@0.0.3

SlackCostReporter

The constructs sets up a chatbot sending cost reports of the current bill & the expected forecast to a slack channel based on a rate or schedule.

To use this construct, manual steps are required to be able to authorize with the AWS account. Therefore, navigate to {@link https://us-east-2.console.aws.amazon.com/chatbot/home} and configure the slack client corresponding to the {@link SlackCostReporterProps.slackWorkspaceId}. Right now, this is neither possible via the CLI, nor CloudFormation. If this is not done, the deployment is going to fail with the error message "Invalid request provided: AWS Chatbot can't create the configuration because Slack workspace *** is not authorized with AWS account ***".

Initializers

import { SlackCostReporter } from 'aws-slack-cost-reporter'
new SlackCostReporter(scope: Construct, id: string, props: SlackCostReporterProps)
NameTypeDescription
scopeConstructNo description.
idstringNo description.
propsSlackCostReporterPropsNo description.
scopeRequired
idRequired
  • Type: string
propsRequired

Methods

NameDescription
toStringReturns a string representation of this construct.
toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.
isConstruct
import { SlackCostReporter } from 'aws-slack-cost-reporter'
SlackCostReporter.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.

Properties

NameTypeDescription
nodeNodeThe tree node.
nodeRequired
public readonly node: Node;

The tree node.