Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Dimension selection and MS Teams sending. #22

Merged
merged 3 commits into from
Apr 18, 2022

Conversation

stevemac007
Copy link
Contributor

You can now deploy the function and override the dimension the cost data is grouped by.

For example, I deploy this as follows.

serverless deploy --stage="service" \
	--param="group=SERVICE" \
	--param="group_length=20" \
	--param="teams_url=https://abc.webhook.office.com/webhookb2/<hook> \

serverless deploy --stage="account" \
	--param="group=LINKED_ACCOUNT" \
	--param="group_length=10" \
	--param="teams_url=https://abc.webhook.office.com/webhookb2/<hook>" \

stevemac007 and others added 3 commits April 17, 2022 12:09
Support name lookup for LINKED_ACCOUNT dimension.
Support for varying the ROWS returned by env.
Added support for posting to MS Teams.
--param "group_length=15"
```

Possible value for `group` are:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include a link to the AWS docs where these groups come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually got them from the error message when I specified an invalid value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From - https://docs.aws.amazon.com/cli/latest/reference/ce/get-cost-and-usage.html#options

Valid values for the DIMENSION type are AZ , INSTANCE_TYPE , LEGAL_ENTITY_NAME , INVOICING_ENTITY , LINKED_ACCOUNT , OPERATION , PLATFORM , PURCHASE_TYPE , SERVICE , TENANCY , RECORD_TYPE , and USAGE_TYPE .

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@iandees iandees merged commit 5d5b5f2 into iandees:master Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants