public static class DefaultIamStatement.Builder extends Object implements IamStatement.Builder
| Modifier and Type | Method and Description |
|---|---|
IamStatement.Builder |
actionIds(Collection<String> actions)
Configure the
Action
element of the statement, specifying the actions that are allowed or denied. |
IamStatement.Builder |
actions(Collection<IamAction> actions)
Configure the
Action
element of the statement, specifying the actions that are allowed or denied. |
IamStatement.Builder |
addAction(IamAction action)
Append an
Action element to this statement, specifying an action that is allowed or denied. |
IamStatement.Builder |
addAction(String action)
Append an
Action element to this statement, specifying an action that is allowed or denied. |
IamStatement.Builder |
addCondition(Consumer<IamCondition.Builder> condition)
Append a
Condition to the statement, specifying a condition in which the statement is in effect. |
IamStatement.Builder |
addCondition(IamCondition condition)
Append a
Condition to the statement, specifying a condition in which the statement is in effect. |
IamStatement.Builder |
addCondition(IamConditionOperator operator,
IamConditionKey key,
String value)
Append a
Condition to the statement, specifying a condition in which the statement is in effect. |
IamStatement.Builder |
addCondition(IamConditionOperator operator,
String key,
String value)
Append a
Condition to the statement, specifying a condition in which the statement is in effect. |
IamStatement.Builder |
addCondition(String operator,
String key,
String value)
Append a
Condition to the statement, specifying a condition in which the statement is in effect. |
IamStatement.Builder |
addConditions(IamConditionOperator operator,
IamConditionKey key,
Collection<String> values)
Append multiple
Conditions to the statement, specifying conditions in which the statement is in effect. |
IamStatement.Builder |
addConditions(IamConditionOperator operator,
String key,
Collection<String> values)
Append multiple
Conditions to the statement, specifying conditions in which the statement is in effect. |
IamStatement.Builder |
addConditions(String operator,
String key,
Collection<String> values)
Append multiple
Conditions to the statement, specifying conditions in which the statement is in effect. |
IamStatement.Builder |
addNotAction(IamAction notAction)
Append a
NotAction element to this statement, specifying an action that is denied or allowed. |
IamStatement.Builder |
addNotAction(String notAction)
Append a
NotAction element to this statement, specifying an action that is denied or allowed. |
IamStatement.Builder |
addNotPrincipal(Consumer<IamPrincipal.Builder> notPrincipal)
Append a
NotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
addNotPrincipal(IamPrincipal notPrincipal)
Append a
NotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
addNotPrincipal(IamPrincipalType iamPrincipalType,
String principal)
Append a
NotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
addNotPrincipal(String iamPrincipalType,
String principal)
Append a
NotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
addNotPrincipals(IamPrincipalType notPrincipalType,
Collection<String> notPrincipals)
Append multiple
NotPrincipals to this statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
addNotPrincipals(String notPrincipalType,
Collection<String> notPrincipals)
Append multiple
NotPrincipals to this statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
addNotResource(IamResource notResource)
Append a
NotResource element to the statement, specifying that the statement should apply to every resource except the
ones listed. |
IamStatement.Builder |
addNotResource(String notResource)
Append a
NotResource element to the statement, specifying that the statement should apply to every resource except the
ones listed. |
IamStatement.Builder |
addPrincipal(Consumer<IamPrincipal.Builder> principal)
Append a
Principal to this statement, specifying a principal that is allowed or denied access to
a resource. |
IamStatement.Builder |
addPrincipal(IamPrincipal principal)
Append a
Principal to this statement, specifying a principal that is allowed or denied access to
a resource. |
IamStatement.Builder |
addPrincipal(IamPrincipalType iamPrincipalType,
String principal)
Append a
Principal to this statement, specifying a principal that is allowed or denied access to
a resource. |
IamStatement.Builder |
addPrincipal(String iamPrincipalType,
String principal)
Append a
Principal to this statement, specifying a principal that is allowed or denied access to
a resource. |
IamStatement.Builder |
addPrincipals(IamPrincipalType principalType,
Collection<String> principals)
Append multiple
Principals to this statement, specifying principals that are allowed or denied access to
a resource. |
IamStatement.Builder |
addPrincipals(String principalType,
Collection<String> principals)
Append multiple
Principals to this statement, specifying principals that are allowed or denied access to
a resource. |
IamStatement.Builder |
addResource(IamResource resource)
Append a
Resource
element to the statement, specifying a resource that the statement covers. |
IamStatement.Builder |
addResource(String resource)
Append a
Resource
element to the statement, specifying a resource that the statement covers. |
IamStatement |
build() |
IamStatement.Builder |
conditions(Collection<IamCondition> conditions)
Configure the
Condition element of the statement, specifying the conditions in which the statement is in effect. |
IamStatement.Builder |
effect(IamEffect effect)
Configure the
Effect
element of the policy, specifying whether the statement results in an allow or deny. |
IamStatement.Builder |
effect(String effect)
Configure the
Effect
element of the policy, specifying whether the statement results in an allow or deny. |
IamStatement.Builder |
notActionIds(Collection<String> notActions)
Configure the
NotAction element of the statement, specifying actions that are denied or allowed. |
IamStatement.Builder |
notActions(Collection<IamAction> notActions)
Configure the
NotAction element of the statement, specifying actions that are denied or allowed. |
IamStatement.Builder |
notPrincipals(Collection<IamPrincipal> notPrincipals)
Configure the
NotPrincipal element of the statement, specifying that all principals are affected by the policy except the
ones listed. |
IamStatement.Builder |
notResourceIds(Collection<String> notResources)
Configure the
NotResource element of the statement, specifying that the statement should apply to every resource except the
ones listed. |
IamStatement.Builder |
notResources(Collection<IamResource> notResources)
Configure the
NotResource element of the statement, specifying that the statement should apply to every resource except the
ones listed. |
IamStatement.Builder |
principals(Collection<IamPrincipal> principals)
Configure the
Principal element of the statement, specifying the principals that are allowed or denied
access to a resource. |
IamStatement.Builder |
resourceIds(Collection<String> resources)
Configure the
Resource
element of the statement, specifying the resource(s) that the statement covers. |
IamStatement.Builder |
resources(Collection<IamResource> resources)
Configure the
Resource
element of the statement, specifying the resource(s) that the statement covers. |
IamStatement.Builder |
sid(String sid)
Configure the
Sid element of the policy, specifying an identifier for the statement. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyapplyMutationpublic IamStatement.Builder sid(String sid)
IamStatement.BuilderSid element of the policy, specifying an identifier for the statement.
sid in interface IamStatement.Builderpublic IamStatement.Builder effect(IamEffect effect)
IamStatement.BuilderEffect
element of the policy, specifying whether the statement results in an allow or deny.
This value is required.
effect in interface IamStatement.BuilderIamEffect,
Effect user
guidepublic IamStatement.Builder effect(String effect)
IamStatement.BuilderEffect
element of the policy, specifying whether the statement results in an allow or deny.
This works the same as IamStatement.Builder.effect(IamEffect), except you do not need to IamEffect. This value is required.
effect in interface IamStatement.BuilderIamEffect,
Effect user
guidepublic IamStatement.Builder principals(Collection<IamPrincipal> principals)
IamStatement.BuilderPrincipal element of the statement, specifying the principals that are allowed or denied
access to a resource.
This will replace any other principals already added to the statement.
principals in interface IamStatement.BuilderIamPrincipal,
Principal
user guidepublic IamStatement.Builder addPrincipal(IamPrincipal principal)
IamStatement.BuilderPrincipal to this statement, specifying a principal that is allowed or denied access to
a resource.
addPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addPrincipal(Consumer<IamPrincipal.Builder> principal)
IamStatement.BuilderPrincipal to this statement, specifying a principal that is allowed or denied access to
a resource.
This works the same as IamStatement.Builder.addPrincipal(IamPrincipal), except you do not need to specify IamPrincipal
.builder() or build().
addPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addPrincipal(IamPrincipalType iamPrincipalType, String principal)
IamStatement.BuilderPrincipal to this statement, specifying a principal that is allowed or denied access to
a resource.
This works the same as IamStatement.Builder.addPrincipal(IamPrincipal), except you do not need to specify IamPrincipal
.create().
addPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addPrincipal(String iamPrincipalType, String principal)
IamStatement.BuilderPrincipal to this statement, specifying a principal that is allowed or denied access to
a resource.
This works the same as IamStatement.Builder.addPrincipal(IamPrincipalType, String), except you do not need to specify IamPrincipalType.create().
addPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addPrincipals(IamPrincipalType principalType, Collection<String> principals)
IamStatement.BuilderPrincipals to this statement, specifying principals that are allowed or denied access to
a resource.
This works the same as calling IamStatement.Builder.addPrincipal(IamPrincipalType, String) multiple times with the same
IamPrincipalType.
addPrincipals in interface IamStatement.Builderpublic IamStatement.Builder addPrincipals(String principalType, Collection<String> principals)
IamStatement.BuilderPrincipals to this statement, specifying principals that are allowed or denied access to
a resource.
This works the same as calling IamStatement.Builder.addPrincipal(String, String) multiple times with the same
IamPrincipalType.
addPrincipals in interface IamStatement.Builderpublic IamStatement.Builder notPrincipals(Collection<IamPrincipal> notPrincipals)
IamStatement.BuilderNotPrincipal element of the statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
This will replace any other not-principals already added to the statement.
notPrincipals in interface IamStatement.Builderpublic IamStatement.Builder addNotPrincipal(IamPrincipal notPrincipal)
IamStatement.BuilderNotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
addNotPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addNotPrincipal(Consumer<IamPrincipal.Builder> notPrincipal)
IamStatement.BuilderNotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
This works the same as IamStatement.Builder.addNotPrincipal(IamPrincipal), except you do not need to specify IamPrincipal
.builder() or build().
addNotPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addNotPrincipal(IamPrincipalType iamPrincipalType, String principal)
IamStatement.BuilderNotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
This works the same as IamStatement.Builder.addNotPrincipal(IamPrincipal), except you do not need to specify IamPrincipal
.create().
addNotPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addNotPrincipal(String iamPrincipalType, String principal)
IamStatement.BuilderNotPrincipal to this statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
This works the same as IamStatement.Builder.addNotPrincipal(IamPrincipalType, String), except you do not need to specify IamPrincipalType.create().
addNotPrincipal in interface IamStatement.Builderpublic IamStatement.Builder addNotPrincipals(IamPrincipalType notPrincipalType, Collection<String> notPrincipals)
IamStatement.BuilderNotPrincipals to this statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
This works the same as calling IamStatement.Builder.addNotPrincipal(IamPrincipalType, String) multiple times with the same
IamPrincipalType.
addNotPrincipals in interface IamStatement.Builderpublic IamStatement.Builder addNotPrincipals(String notPrincipalType, Collection<String> notPrincipals)
IamStatement.BuilderNotPrincipals to this statement, specifying that all principals are affected by the policy except the
ones listed.
Very few scenarios require the use of NotPrincipal. We recommend that you explore other authorization options
before you decide to use NotPrincipal. NotPrincipal can only be used with IamEffect.DENY
statements.
This works the same as calling IamStatement.Builder.addNotPrincipal(String, String) multiple times with the same
IamPrincipalType.
addNotPrincipals in interface IamStatement.Builderpublic IamStatement.Builder actions(Collection<IamAction> actions)
IamStatement.BuilderAction
element of the statement, specifying the actions that are allowed or denied.
This will replace any other actions already added to the statement.
actions in interface IamStatement.Builderpublic IamStatement.Builder actionIds(Collection<String> actions)
IamStatement.BuilderAction
element of the statement, specifying the actions that are allowed or denied.
This works the same as IamStatement.Builder.actions(Collection), except you do not need to call IamAction.create()
on each action. This will replace any other actions already added to the statement.
actionIds in interface IamStatement.Builderpublic IamStatement.Builder addAction(IamAction action)
IamStatement.BuilderAction element to this statement, specifying an action that is allowed or denied.
addAction in interface IamStatement.Builderpublic IamStatement.Builder addAction(String action)
IamStatement.BuilderAction element to this statement, specifying an action that is allowed or denied.
This works the same as IamStatement.Builder.addAction(IamAction), except you do not need to call IamAction.create().
addAction in interface IamStatement.Builderpublic IamStatement.Builder notActions(Collection<IamAction> notActions)
IamStatement.BuilderNotAction element of the statement, specifying actions that are denied or allowed.
This will replace any other not-actions already added to the statement.
notActions in interface IamStatement.Builderpublic IamStatement.Builder notActionIds(Collection<String> notActions)
IamStatement.BuilderNotAction element of the statement, specifying actions that are denied or allowed.
This works the same as IamStatement.Builder.notActions(Collection), except you do not need to call IamAction.create()
on each action. This will replace any other not-actions already added to the statement.
notActionIds in interface IamStatement.Builderpublic IamStatement.Builder addNotAction(IamAction notAction)
IamStatement.BuilderNotAction element to this statement, specifying an action that is denied or allowed.
addNotAction in interface IamStatement.Builderpublic IamStatement.Builder addNotAction(String notAction)
IamStatement.BuilderNotAction element to this statement, specifying an action that is denied or allowed.
This works the same as IamStatement.Builder.addNotAction(IamAction), except you do not need to call IamAction.create().
addNotAction in interface IamStatement.Builderpublic IamStatement.Builder resources(Collection<IamResource> resources)
IamStatement.BuilderResource
element of the statement, specifying the resource(s) that the statement covers.
This will replace any other resources already added to the statement.
resources in interface IamStatement.Builderpublic IamStatement.Builder resourceIds(Collection<String> resources)
IamStatement.BuilderResource
element of the statement, specifying the resource(s) that the statement covers.
This works the same as IamStatement.Builder.resources(Collection), except you do not need to call IamResource.create()
on each resource. This will replace any other resources already added to the statement.
resourceIds in interface IamStatement.Builderpublic IamStatement.Builder addResource(IamResource resource)
IamStatement.BuilderResource
element to the statement, specifying a resource that the statement covers.
addResource in interface IamStatement.Builderpublic IamStatement.Builder addResource(String resource)
IamStatement.BuilderResource
element to the statement, specifying a resource that the statement covers.
This works the same as IamStatement.Builder.addResource(IamResource), except you do not need to call IamResource.create().
addResource in interface IamStatement.Builderpublic IamStatement.Builder notResources(Collection<IamResource> notResources)
IamStatement.BuilderNotResource element of the statement, specifying that the statement should apply to every resource except the
ones listed.
This will replace any other not-resources already added to the statement.
notResources in interface IamStatement.Builderpublic IamStatement.Builder notResourceIds(Collection<String> notResources)
IamStatement.BuilderNotResource element of the statement, specifying that the statement should apply to every resource except the
ones listed.
This works the same as IamStatement.Builder.notResources(Collection), except you do not need to call IamResource.create()
on each resource. This will replace any other not-resources already added to the statement.
notResourceIds in interface IamStatement.Builderpublic IamStatement.Builder addNotResource(IamResource notResource)
IamStatement.BuilderNotResource element to the statement, specifying that the statement should apply to every resource except the
ones listed.
addNotResource in interface IamStatement.Builderpublic IamStatement.Builder addNotResource(String notResource)
IamStatement.BuilderNotResource element to the statement, specifying that the statement should apply to every resource except the
ones listed.
addNotResource in interface IamStatement.Builderpublic IamStatement.Builder conditions(Collection<IamCondition> conditions)
IamStatement.BuilderCondition element of the statement, specifying the conditions in which the statement is in effect.
This will replace any other conditions already added to the statement.
conditions in interface IamStatement.Builderpublic IamStatement.Builder addCondition(IamCondition condition)
IamStatement.BuilderCondition to the statement, specifying a condition in which the statement is in effect.
addCondition in interface IamStatement.Builderpublic IamStatement.Builder addCondition(Consumer<IamCondition.Builder> condition)
IamStatement.BuilderCondition to the statement, specifying a condition in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(IamCondition), except you do not need to specify IamCondition
.builder() or build().
addCondition in interface IamStatement.Builderpublic IamStatement.Builder addCondition(IamConditionOperator operator, IamConditionKey key, String value)
IamStatement.BuilderCondition to the statement, specifying a condition in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(IamCondition), except you do not need to specify IamCondition
.create().
addCondition in interface IamStatement.Builderpublic IamStatement.Builder addCondition(IamConditionOperator operator, String key, String value)
IamStatement.BuilderCondition to the statement, specifying a condition in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(IamCondition), except you do not need to specify IamCondition
.create().
addCondition in interface IamStatement.Builderpublic IamStatement.Builder addCondition(String operator, String key, String value)
IamStatement.BuilderCondition to the statement, specifying a condition in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(IamCondition), except you do not need to specify IamCondition
.create().
addCondition in interface IamStatement.Builderpublic IamStatement.Builder addConditions(IamConditionOperator operator, IamConditionKey key, Collection<String> values)
IamStatement.BuilderConditions to the statement, specifying conditions in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(IamConditionOperator, IamConditionKey, String) multiple times with the
same operator and key, but different values.
addConditions in interface IamStatement.Builderpublic IamStatement.Builder addConditions(IamConditionOperator operator, String key, Collection<String> values)
IamStatement.BuilderConditions to the statement, specifying conditions in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(IamConditionOperator, String, String) multiple times with the
same operator and key, but different values.
addConditions in interface IamStatement.Builderpublic IamStatement.Builder addConditions(String operator, String key, Collection<String> values)
IamStatement.BuilderConditions to the statement, specifying conditions in which the statement is in effect.
This works the same as IamStatement.Builder.addCondition(String, String, String) multiple times with the
same operator and key, but different values.
addConditions in interface IamStatement.Builderpublic IamStatement build()
build in interface Buildablebuild in interface SdkBuilder<IamStatement.Builder,IamStatement>Copyright © 2023. All rights reserved.