Interface CreatePolicyRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<CreatePolicyRequest.Builder,,CreatePolicyRequest> NetworkSecurityManagerRequest.Builder,SdkBuilder<CreatePolicyRequest.Builder,,CreatePolicyRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreatePolicyRequest
-
Method Summary
Modifier and TypeMethodDescriptionassociatedTemplateAndRuleList(Collection<TemplateOrRuleReference> associatedTemplateAndRuleList) The templates and rules to associate with the policy.associatedTemplateAndRuleList(Consumer<TemplateOrRuleReference.Builder>... associatedTemplateAndRuleList) The templates and rules to associate with the policy.associatedTemplateAndRuleList(TemplateOrRuleReference... associatedTemplateAndRuleList) The templates and rules to associate with the policy.clientToken(String clientToken) A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time.firewallType(String firewallType) The firewall type associated with the resource.firewallType(PolicyFirewallType firewallType) The firewall type associated with the resource.isPublished(Boolean isPublished) Specifies whether to publish the resource.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default CreatePolicyRequest.BuilderpolicyConfiguration(Consumer<PolicyConfiguration.Builder> policyConfiguration) The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.policyConfiguration(PolicyConfiguration policyConfiguration) The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.policyDescription(String policyDescription) A description of the policy.policyName(String policyName) The name of the policy.The priority of the resource.The tags to add to the resource when it is created.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.networksecuritymanager.model.NetworkSecurityManagerRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
clientToken
A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
- Parameters:
clientToken- A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyName
The name of the policy.
- Parameters:
policyName- The name of the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyDescription
A description of the policy.
- Parameters:
policyDescription- A description of the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
priority
The priority of the resource. A lower number indicates a higher priority.
- Parameters:
priority- The priority of the resource. A lower number indicates a higher priority.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
associatedTemplateAndRuleList
CreatePolicyRequest.Builder associatedTemplateAndRuleList(Collection<TemplateOrRuleReference> associatedTemplateAndRuleList) The templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.
- Parameters:
associatedTemplateAndRuleList- The templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
associatedTemplateAndRuleList
CreatePolicyRequest.Builder associatedTemplateAndRuleList(TemplateOrRuleReference... associatedTemplateAndRuleList) The templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.
- Parameters:
associatedTemplateAndRuleList- The templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
associatedTemplateAndRuleList
CreatePolicyRequest.Builder associatedTemplateAndRuleList(Consumer<TemplateOrRuleReference.Builder>... associatedTemplateAndRuleList) The templates and rules to associate with the policy. For AWS WAF policies, specify 1 to 100 templates or rules, of which at most 2 can be templates. For AWS Shield Advanced policies, this list must be empty.
This is a convenience method that creates an instance of theTemplateOrRuleReference.Builderavoiding the need to create one manually viaTemplateOrRuleReference.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toassociatedTemplateAndRuleList(List<TemplateOrRuleReference>).- Parameters:
associatedTemplateAndRuleList- a consumer that will call methods onTemplateOrRuleReference.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
firewallType
The firewall type associated with the resource.
- Parameters:
firewallType- The firewall type associated with the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
firewallType
The firewall type associated with the resource.
- Parameters:
firewallType- The firewall type associated with the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
policyConfiguration
The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
- Parameters:
policyConfiguration- The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyConfiguration
default CreatePolicyRequest.Builder policyConfiguration(Consumer<PolicyConfiguration.Builder> policyConfiguration) The configuration settings that control the policy's behavior, including remediation and firewall-type-specific settings.
This is a convenience method that creates an instance of thePolicyConfiguration.Builderavoiding the need to create one manually viaPolicyConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed topolicyConfiguration(PolicyConfiguration).- Parameters:
policyConfiguration- a consumer that will call methods onPolicyConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
isPublished
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.- Parameters:
isPublished- Specifies whether to publish the resource. Whentrue, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
The tags to add to the resource when it is created.
- Parameters:
tags- The tags to add to the resource when it is created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreatePolicyRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreatePolicyRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-