Created
August 20, 2020 15:33
-
-
Save francoiscampbell/bc23bbf6210d5fbfdd32d2e692ff7b9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tg_foo_bar = TargetGroupArn( | |
"arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/foo-bar/abc123" | |
) | |
# generate a new ARN from the first one | |
tg_baz_quz = TargetGroupArn( | |
target_group_arn, | |
name="baz-qux", | |
internal_id="def456", | |
) | |
# the fields were overridden | |
assert tg_baz_quz.name == "baz-qux" | |
assert tg_baz_quz.internal_id == "def456" | |
# and the new ARN is the str() of the object | |
assert str(tg_baz_quz) == ( | |
"arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/baz-qux/def456" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment