Interface IamPolicy.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<IamPolicy.Builder,IamPolicy>,SdkBuilder<IamPolicy.Builder,IamPolicy>
- All Known Implementing Classes:
DefaultIamPolicy.Builder
- Enclosing interface:
- IamPolicy
public static interface IamPolicy.Builder extends CopyableBuilder<IamPolicy.Builder,IamPolicy>
- See Also:
IamPolicy.builder()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IamPolicy.BuilderaddStatement(Consumer<IamStatement.Builder> statement)Append aStatementelement to this policy to specify additional access rules.IamPolicy.BuilderaddStatement(IamStatement statement)Append aStatementelement to this policy to specify additional access rules.IamPolicy.Builderid(String id)Configure theIdelement of the policy, specifying an optional identifier for the policy.IamPolicy.Builderstatements(Collection<IamStatement> statements)Configure theStatementelement of the policy, specifying the access rules for this policy.IamPolicy.Builderversion(String version)Configure theVersionelement of the policy, specifying the language syntax rules that are to be used to process the policy.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
-
-
-
Method Detail
-
id
IamPolicy.Builder id(String id)
Configure theIdelement of the policy, specifying an optional identifier for the policy.The ID is used differently in different services. ID is allowed in resource-based policies, but not in identity-based policies.
For services that let you set an ID element, we recommend you use a UUID (GUID) for the value, or incorporate a UUID as part of the ID to ensure uniqueness.
This value is optional.
- See Also:
- ID user guide
-
version
IamPolicy.Builder version(String version)
Configure theVersionelement of the policy, specifying the language syntax rules that are to be used to process the policy.By default, this value is
2012-10-17.- See Also:
- Version user guide
-
statements
IamPolicy.Builder statements(Collection<IamStatement> statements)
Configure theStatementelement of the policy, specifying the access rules for this policy.This will replace any other statements already added to the policy. At least one statement is required to create a policy.
- See Also:
- Statement user guide
-
addStatement
IamPolicy.Builder addStatement(IamStatement statement)
Append aStatementelement to this policy to specify additional access rules.At least one statement is required to create a policy.
- See Also:
- Statement user guide
-
addStatement
IamPolicy.Builder addStatement(Consumer<IamStatement.Builder> statement)
Append aStatementelement to this policy to specify additional access rules.This works the same as
addStatement(IamStatement), except you do not need to specifyIamStatement .builder()orbuild(). At least one statement is required to create a policy.- See Also:
- Statement user guide
-
-