Interface TagResourceRequest.Builder
-
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<TagResourceRequest.Builder,TagResourceRequest>,OrganizationsRequest.Builder,SdkBuilder<TagResourceRequest.Builder,TagResourceRequest>,SdkPojo,SdkRequest.Builder
- Enclosing class:
- TagResourceRequest
public static interface TagResourceRequest.Builder extends OrganizationsRequest.Builder, SdkPojo, CopyableBuilder<TagResourceRequest.Builder,TagResourceRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TagResourceRequest.BuilderoverrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)TagResourceRequest.BuilderoverrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)TagResourceRequest.BuilderresourceId(String resourceId)The ID of the resource to add a tag to.TagResourceRequest.Buildertags(Collection<Tag> tags)A list of tags to add to the specified resource.TagResourceRequest.Buildertags(Consumer<Tag.Builder>... tags)A list of tags to add to the specified resource.TagResourceRequest.Buildertags(Tag... tags)A list of tags to add to the specified resource.-
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
-
resourceId
TagResourceRequest.Builder resourceId(String resourceId)
The ID of the resource to add a tag to.
You can specify any of the following taggable resources.
-
Amazon Web Services account – specify the account ID number.
-
Organizational unit – specify the OU ID that begins with
ou-and looks similar to:ou-1a2b-34uvwxyz -
Root – specify the root ID that begins with
r-and looks similar to:r-1a2b -
Policy – specify the policy ID that begins with
p-andlooks similar to:p-12abcdefg3
- Parameters:
resourceId- The ID of the resource to add a tag to.You can specify any of the following taggable resources.
-
Amazon Web Services account – specify the account ID number.
-
Organizational unit – specify the OU ID that begins with
ou-and looks similar to:ou-1a2b-34uvwxyz -
Root – specify the root ID that begins with
r-and looks similar to:r-1a2b -
Policy – specify the policy ID that begins with
p-andlooks similar to:p-12abcdefg3
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
tags
TagResourceRequest.Builder tags(Collection<Tag> tags)
A list of tags to add to the specified resource.
For each tag in the list, you must specify both a tag key and a value. The value can be an empty string, but you can't set it to
null.If any one of the tags is not valid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
- Parameters:
tags- A list of tags to add to the specified resource.For each tag in the list, you must specify both a tag key and a value. The value can be an empty string, but you can't set it to
null.If any one of the tags is not valid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
TagResourceRequest.Builder tags(Tag... tags)
A list of tags to add to the specified resource.
For each tag in the list, you must specify both a tag key and a value. The value can be an empty string, but you can't set it to
null.If any one of the tags is not valid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
- Parameters:
tags- A list of tags to add to the specified resource.For each tag in the list, you must specify both a tag key and a value. The value can be an empty string, but you can't set it to
null.If any one of the tags is not valid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
TagResourceRequest.Builder tags(Consumer<Tag.Builder>... tags)
A list of tags to add to the specified resource.
For each tag in the list, you must specify both a tag key and a value. The value can be an empty string, but you can't set it to
null. This is a convenience method that creates an instance of theIf any one of the tags is not valid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
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
TagResourceRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
overrideConfiguration
TagResourceRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
-