Interface Policy.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Policy.Builder,Policy>,SdkBuilder<Policy.Builder,Policy>,SdkPojo
- Enclosing class:
- Policy
@Mutable @NotThreadSafe public static interface Policy.Builder extends SdkPojo, CopyableBuilder<Policy.Builder,Policy>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Policy.Builderarn(String arn)Sets the value of the Arn property for this object.Policy.BuilderattachmentCount(Integer attachmentCount)The number of entities (users, groups, and roles) that the policy is attached to.Policy.BuildercreateDate(Instant createDate)The date and time, in ISO 8601 date-time format, when the policy was created.Policy.BuilderdefaultVersionId(String defaultVersionId)The identifier for the version of the policy that is set as the default version.Policy.Builderdescription(String description)A friendly description of the policy.Policy.BuilderisAttachable(Boolean isAttachable)Specifies whether the policy can be attached to an IAM user, group, or role.Policy.Builderpath(String path)The path to the policy.Policy.BuilderpermissionsBoundaryUsageCount(Integer permissionsBoundaryUsageCount)The number of entities (users and roles) for which the policy is used to set the permissions boundary.Policy.BuilderpolicyId(String policyId)The stable and unique string identifying the policy.Policy.BuilderpolicyName(String policyName)The friendly name (not ARN) identifying the policy.Policy.Buildertags(Collection<Tag> tags)A list of tags that are attached to the instance profile.Policy.Buildertags(Consumer<Tag.Builder>... tags)A list of tags that are attached to the instance profile.Policy.Buildertags(Tag... tags)A list of tags that are attached to the instance profile.Policy.BuilderupdateDate(Instant updateDate)The date and time, in ISO 8601 date-time format, when the policy was last updated.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
policyName
Policy.Builder policyName(String policyName)
The friendly name (not ARN) identifying the policy.
- Parameters:
policyName- The friendly name (not ARN) identifying the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyId
Policy.Builder policyId(String policyId)
The stable and unique string identifying the policy.
For more information about IDs, see IAM identifiers in the IAM User Guide.
- Parameters:
policyId- The stable and unique string identifying the policy.For more information about IDs, see IAM identifiers in the IAM User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
arn
Policy.Builder arn(String arn)
Sets the value of the Arn property for this object.- Parameters:
arn- The new value for the Arn property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
path
Policy.Builder path(String path)
The path to the policy.
For more information about paths, see IAM identifiers in the IAM User Guide.
- Parameters:
path- The path to the policy.For more information about paths, see IAM identifiers in the IAM User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
defaultVersionId
Policy.Builder defaultVersionId(String defaultVersionId)
The identifier for the version of the policy that is set as the default version.
- Parameters:
defaultVersionId- The identifier for the version of the policy that is set as the default version.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
attachmentCount
Policy.Builder attachmentCount(Integer attachmentCount)
The number of entities (users, groups, and roles) that the policy is attached to.
- Parameters:
attachmentCount- The number of entities (users, groups, and roles) that the policy is attached to.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
permissionsBoundaryUsageCount
Policy.Builder permissionsBoundaryUsageCount(Integer permissionsBoundaryUsageCount)
The number of entities (users and roles) for which the policy is used to set the permissions boundary.
For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
- Parameters:
permissionsBoundaryUsageCount- The number of entities (users and roles) for which the policy is used to set the permissions boundary.For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isAttachable
Policy.Builder isAttachable(Boolean isAttachable)
Specifies whether the policy can be attached to an IAM user, group, or role.
- Parameters:
isAttachable- Specifies whether the policy can be attached to an IAM user, group, or role.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
Policy.Builder description(String description)
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
- Parameters:
description- A friendly description of the policy.This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
createDate
Policy.Builder createDate(Instant createDate)
The date and time, in ISO 8601 date-time format, when the policy was created.
- Parameters:
createDate- The date and time, in ISO 8601 date-time format, when the policy was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
updateDate
Policy.Builder updateDate(Instant updateDate)
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
- Parameters:
updateDate- The date and time, in ISO 8601 date-time format, when the policy was last updated.When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Policy.Builder tags(Collection<Tag> tags)
A list of tags that are attached to the instance profile. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
- Parameters:
tags- A list of tags that are attached to the instance profile. For more information about tagging, see Tagging IAM resources in the IAM User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Policy.Builder tags(Tag... tags)
A list of tags that are attached to the instance profile. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
- Parameters:
tags- A list of tags that are attached to the instance profile. For more information about tagging, see Tagging IAM resources in the IAM User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Policy.Builder tags(Consumer<Tag.Builder>... tags)
A list of tags that are attached to the instance profile. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
This is a convenience method that creates an instance of theTag.Builderavoiding the need to create one manually viaTag.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#tags(List.) - Parameters:
tags- a consumer that will call methods onTag.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#tags(java.util.Collection)
-
-