Skip to content

added new properties - #107

Merged
ammokhov merged 2 commits into
aws-cloudformation:masterfrom
ammokhov:request-data-enhancements
Jul 16, 2020
Merged

ammokhov merged 2 commits into
aws-cloudformation:masterfrom
ammokhov:request-data-enhancements

Conversation

@ammokhov

@ammokhov ammokhov commented Jul 14, 2020 •

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

additional properties to BaseResourceHandlerRequest interface:

  • desiredResourceTags: Optional[Mapping[str, Any]]
  • systemTags: Optional[Mapping[str, Any]]
  • awsAccountId: Optional[str]
  • region: Optional[str]
  • awsPartition: Optional[str]*

*- there are no good methods in boto.session or regions to retrieve current partition. we can use get_available_partitions to get list of partitions but that is not what is needed. We cant get endpoint interface either as get_available_endpoints returns list of str. There is an outstanding PR to get partition by region boto/botocore#1715. We could replicate something like that but might make sense to just wait.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ammokhov
ammokhov requested review from jaymccon and rjlohan July 14, 2020 07:16
@ammokhov ammokhov added enhancement New feature or request help wanted Extra attention is needed labels Jul 14, 2020
@ammokhov ammokhov self-assigned this Jul 14, 2020
@rjlohan

rjlohan commented Jul 14, 2020

Copy link
Copy Markdown

It won't necessarily be 100% future proof, but you could probably just hard code the awsPartition as a helper func.

if cn-north-1 || cn-northwest-1 == aws-cn
if us-gov-* == aws-us-gov
else == aws

@ammokhov
ammokhov merged commit 64f454e into aws-cloudformation:master Jul 16, 2020
@ammokhov
ammokhov deleted the request-data-enhancements branch July 16, 2020 07:31
@PatMyron

Copy link
Copy Markdown
Contributor

It won't necessarily be 100% future proof, but you could probably just hard code the awsPartition as a helper func.

if cn-north-1 || cn-northwest-1 == aws-cn
if us-gov-* == aws-us-gov
else == aws

The other partitions are publicly documented as well, so we should hardcode those partitions as well while hardcoding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants