Skip to main content

global_request_keys

Function global_request_keys 

Source
pub fn global_request_keys(
    ctx: &mut ConditionContext,
    principal_account: &str,
    resource_account_id: &str,
    org_of: impl Fn(&str) -> Option<(String, String)>,
)
Expand description

Populate the global keys AWS sets on every request from who makes it and what it is made on: aws:ResourceAccount (the account owning the target resource), aws:PrincipalOrgID / aws:PrincipalOrgPaths when the principal’s account (principal_account) is in an organization, aws:ResourceOrgID / aws:ResourceOrgPaths when the resource’s account is, and aws:ViaAWSService (false unless a service set it for a call it forwards). org_of gives an account’s organization id and path. A value already present wins.