summaryrefslogtreecommitdiff
path: root/docs-src
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2019-03-15 16:53:51 -0400
committerDave Henderson <dhenderson@gmail.com>2019-03-31 09:55:56 -0400
commit0f6bdb8654bb74283c064956cc6edbb9332647a8 (patch)
treede14080b9923cdff3adf485d2741ed4f855261e7 /docs-src
parente991f3ec7d502702e176aa57247826881ea031ab (diff)
AWS STS functions
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs-src')
-rw-r--r--docs-src/content/functions/aws.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs-src/content/functions/aws.yml b/docs-src/content/functions/aws.yml
index f65935ba..f90da80d 100644
--- a/docs-src/content/functions/aws.yml
+++ b/docs-src/content/functions/aws.yml
@@ -150,3 +150,42 @@ funcs:
- |
$ export CIPHER=$(gomplate -i '{{ aws.KMSEncrypt "alias/gomplate" "hello world" }}')
$ gomplate -i '{{ env.Getenv "CIPHER" | aws.KMSDecrypt }}'
+ - name: aws.Account
+ description: |
+ Returns the currently-authenticated AWS account ID number.
+
+ Wraps the [STS GetCallerIdentity API](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html)
+
+ See also [`aws.UserID`](#aws-userid) and [`aws.ARN`](#aws-arn).
+ pipeline: false
+ examples:
+ - |
+ $ gomplate -i 'My account is {{ aws.Account }}'
+ My account is 123456789012
+ - name: aws.ARN
+ description: |
+ Returns the AWS ARN (Amazon Resource Name) associated with the current authentication credentials.
+
+ Wraps the [STS GetCallerIdentity API](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html)
+
+ See also [`aws.UserID`](#aws-userid) and [`aws.Account`](#aws-account).
+ pipeline: false
+ examples:
+ - |
+ $ gomplate -i 'Calling from {{ aws.ARN }}'
+ Calling from arn:aws:iam::123456789012:user/Alice
+ - name: aws.UserID
+ description: |
+ Returns the unique identifier of the calling entity. The exact value
+ depends on the type of entity making the call. The values returned are those
+ listed in the `aws:userid` column in the [Principal table](http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
+ found on the Policy Variables reference page in the IAM User Guide.
+
+ Wraps the [STS GetCallerIdentity API](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html)
+
+ See also [`aws.ARN`](#aws-arn) and [`aws.Account`](#aws-account).
+ pipeline: false
+ examples:
+ - |
+ $ gomplate -i 'I am {{ aws.UserID }}'
+ I am AIDACKCEVSQ6C2EXAMPLE