Interface CreatePolicyRequest.Builder
-
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<CreatePolicyRequest.Builder,CreatePolicyRequest>,OrganizationsRequest.Builder,SdkBuilder<CreatePolicyRequest.Builder,CreatePolicyRequest>,SdkPojo,SdkRequest.Builder
- Enclosing class:
- CreatePolicyRequest
public static interface CreatePolicyRequest.Builder extends OrganizationsRequest.Builder, SdkPojo, CopyableBuilder<CreatePolicyRequest.Builder,CreatePolicyRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CreatePolicyRequest.Buildercontent(String content)The policy text content to add to the new policy.CreatePolicyRequest.Builderdescription(String description)An optional description to assign to the policy.CreatePolicyRequest.Buildername(String name)The friendly name to assign to the policy.CreatePolicyRequest.BuilderoverrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)CreatePolicyRequest.BuilderoverrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)CreatePolicyRequest.Buildertags(Collection<Tag> tags)A list of tags that you want to attach to the newly created policy.CreatePolicyRequest.Buildertags(Consumer<Tag.Builder>... tags)A list of tags that you want to attach to the newly created policy.CreatePolicyRequest.Buildertags(Tag... tags)A list of tags that you want to attach to the newly created policy.CreatePolicyRequest.Buildertype(String type)The type of policy to create.CreatePolicyRequest.Buildertype(PolicyType type)The type of policy to create.-
Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.services.organizations.model.OrganizationsRequest.Builder
build
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
content
CreatePolicyRequest.Builder content(String content)
The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy type you specify in the
Typeparameter.The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
- Parameters:
content- The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy type you specify in theTypeparameter.The maximum size of a policy document depends on the policy's type. For more information, see Maximum and minimum values in the Organizations User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
CreatePolicyRequest.Builder description(String description)
An optional description to assign to the policy.
- Parameters:
description- An optional description to assign to the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
name
CreatePolicyRequest.Builder name(String name)
The friendly name to assign to the policy.
The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
- Parameters:
name- The friendly name to assign to the policy.The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
type
CreatePolicyRequest.Builder type(String type)
The type of policy to create. You can specify one of the following values:
- Parameters:
type- The type of policy to create. You can specify one of the following values:- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PolicyType,PolicyType
-
type
CreatePolicyRequest.Builder type(PolicyType type)
The type of policy to create. You can specify one of the following values:
- Parameters:
type- The type of policy to create. You can specify one of the following values:- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PolicyType,PolicyType
-
tags
CreatePolicyRequest.Builder tags(Collection<Tag> tags)
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
- Parameters:
tags- A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it tonull. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CreatePolicyRequest.Builder tags(Tag... tags)
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
- Parameters:
tags- A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it tonull. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide.If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CreatePolicyRequest.Builder tags(Consumer<Tag.Builder>... tags)
A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide. This is a convenience method that creates an instance of theIf any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
Tag.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)
-
overrideConfiguration
CreatePolicyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
overrideConfiguration
CreatePolicyRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
-