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

Add builtin for AccountIdEndpointMode #2065

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/source-2.0/aws/rules-engine/built-ins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ Description
Type
``string``

.. _rules-engine-aws-built-ins-account-id-endpoint-mode:

``AWS::Auth::AccountIdEndpointMode`` built-in
=============================================

Description
The AccountId Endpoint Mode.
Type
``string``

.. _rules-engine-aws-built-ins-credential-scope:

``AWS::Auth::CredentialScope`` built-in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ public final class AwsBuiltIns {
.documentation("The AWS AccountId used for the request.")
.build();

/**
* Built-in parameter representing the AccountId Endpoint Mode.
*/
public static final Parameter ACCOUNT_ID_ENDPOINT_MODE =
Parameter.builder()
.name("AccountIdEndpointMode")
.type(ParameterType.STRING)
.builtIn("AWS::Auth::AccountIdEndpointMode")
.documentation("The AccountId Endpoint Mode.")
.build();

/**
* Built-in parameter representing the Credential Scope.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public List<Parameter> getBuiltIns() {
AwsBuiltIns.FIPS,
AwsBuiltIns.REGION,
AwsBuiltIns.ACCOUNT_ID,
AwsBuiltIns.ACCOUNT_ID_ENDPOINT_MODE,
AwsBuiltIns.CREDENTIAL_SCOPE,
AwsBuiltIns.S3_ACCELERATE,
AwsBuiltIns.S3_DISABLE_MRAP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
public class RuleSetAwsBuiltInValidator extends AbstractValidator {
private static final Set<String> ADDITIONAL_CONSIDERATION_BUILT_INS = SetUtils.of(
AwsBuiltIns.ACCOUNT_ID.getBuiltIn().get(),
AwsBuiltIns.ACCOUNT_ID_ENDPOINT_MODE.getBuiltIn().get(),
AwsBuiltIns.CREDENTIAL_SCOPE.getBuiltIn().get());
private static final String ADDITIONAL_CONSIDERATION_MESSAGE = "The `%s` built-in used requires additional "
+ "consideration of the rules that use it.";
Expand Down