public static interface CreatePolicyRequest.Builder extends OrganizationsRequest.Builder, SdkPojo, CopyableBuilder<CreatePolicyRequest.Builder,CreatePolicyRequest>
Modifier and Type | Method and Description |
---|---|
CreatePolicyRequest.Builder |
content(String content)
The policy text content to add to the new policy.
|
CreatePolicyRequest.Builder |
description(String description)
An optional description to assign to the policy.
|
CreatePolicyRequest.Builder |
name(String name)
The friendly name to assign to the policy.
|
CreatePolicyRequest.Builder |
overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
Add an optional request override configuration.
|
CreatePolicyRequest.Builder |
overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
Add an optional request override configuration.
|
CreatePolicyRequest.Builder |
tags(Collection<Tag> tags)
A list of tags that you want to attach to the newly created policy.
|
CreatePolicyRequest.Builder |
tags(Consumer<Tag.Builder>... tags)
A list of tags that you want to attach to the newly created policy.
|
CreatePolicyRequest.Builder |
tags(Tag... tags)
A list of tags that you want to attach to the newly created policy.
|
CreatePolicyRequest.Builder |
type(PolicyType type)
The type of policy to create.
|
CreatePolicyRequest.Builder |
type(String type)
The type of policy to create.
|
build
overrideConfiguration
equalsBySdkFields, sdkFields
copy
applyMutation, build
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 Type
parameter.
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 Type
parameter.CreatePolicyRequest.Builder description(String description)
An optional description to assign to the policy.
description
- An optional description to assign to the policy.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.
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.
CreatePolicyRequest.Builder type(String type)
The type of policy to create. You can specify one of the following values:
type
- The type of policy to create. You can specify one of the following values:
PolicyType
,
PolicyType
CreatePolicyRequest.Builder type(PolicyType type)
The type of policy to create. You can specify one of the following values:
type
- The type of policy to create. You can specify one of the following values:
PolicyType
,
PolicyType
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 AWS Organizations
resources in the AWS Organizations User Guide.
If any one of the tags is invalid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
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 AWS
Organizations resources in the AWS Organizations User Guide. If any one of the tags is invalid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
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 AWS Organizations
resources in the AWS Organizations User Guide.
If any one of the tags is invalid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
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 AWS
Organizations resources in the AWS Organizations User Guide. If any one of the tags is invalid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
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 AWS Organizations
resources in the AWS Organizations User Guide.
If any one of the tags is invalid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.
List.Builder
avoiding the need to
create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately and its result
is passed to #tags(List)
.tags
- a consumer that will call methods on List.Builder
#tags(List)
CreatePolicyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
AwsRequest.Builder
overrideConfiguration
in interface AwsRequest.Builder
overrideConfiguration
- The override configuration.CreatePolicyRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
AwsRequest.Builder
overrideConfiguration
in interface AwsRequest.Builder
builderConsumer
- A Consumer
to which an empty AwsRequestOverrideConfiguration.Builder
will be
given.Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.