public static class DefaultIamPolicy.Builder extends Object implements IamPolicy.Builder
| Modifier and Type | Method and Description |
|---|---|
IamPolicy.Builder |
addStatement(Consumer<IamStatement.Builder> statement)
Append a
Statement element to this policy to specify additional access rules. |
IamPolicy.Builder |
addStatement(IamStatement statement)
Append a
Statement element to this policy to specify additional access rules. |
IamPolicy |
build() |
IamPolicy.Builder |
id(String id)
Configure the
Id element of the policy, specifying an optional identifier for the policy. |
IamPolicy.Builder |
statements(Collection<IamStatement> statements)
Configure the
Statement element of the policy, specifying the access rules for this policy. |
IamPolicy.Builder |
version(String version)
Configure the
Version
element of the policy, specifying the language syntax rules that are to be used to
process the policy. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyapplyMutationpublic IamPolicy.Builder id(String id)
IamPolicy.BuilderId element 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.
id in interface IamPolicy.Builderpublic IamPolicy.Builder version(String version)
IamPolicy.BuilderVersion
element 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.
version in interface IamPolicy.Builderpublic IamPolicy.Builder statements(Collection<IamStatement> statements)
IamPolicy.BuilderStatement element 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.
statements in interface IamPolicy.Builderpublic IamPolicy.Builder addStatement(IamStatement statement)
IamPolicy.BuilderStatement element to this policy to specify additional access rules.
At least one statement is required to create a policy.
addStatement in interface IamPolicy.Builderpublic IamPolicy.Builder addStatement(Consumer<IamStatement.Builder> statement)
IamPolicy.BuilderStatement element to this policy to specify additional access rules.
This works the same as IamPolicy.Builder.addStatement(IamStatement), except you do not need to specify IamStatement
.builder() or build(). At least one statement is required to create a policy.
addStatement in interface IamPolicy.Builderpublic IamPolicy build()
build in interface Buildablebuild in interface SdkBuilder<IamPolicy.Builder,IamPolicy>Copyright © 2023. All rights reserved.