/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.route53resolver.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateResolverRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A unique string that identifies the request and that allows failed requests to be retried without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
* A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. *
*/ private String name; /** *
* When you want to forward DNS queries for specified domain name to resolvers on your network, specify
* FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to
* process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify
* FORWARD
for RuleType
. To then have Resolver process queries for apex.example.com, you
* create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for RuleType
.
*
* DNS queries for this domain name are forwarded to the IP addresses that you specify in TargetIps
. If
* a query matches multiple Resolver rules (example.com and www.example.com), outbound DNS queries are routed using
* the Resolver rule that contains the most specific domain name (www.example.com).
*
* The IPs that you want Resolver to forward DNS queries to. You can specify either Ipv4 or Ipv6 addresses but not * both in the same rule. Separate IP addresses with a space. *
*
* TargetIps
is available only when the value of Rule type
is FORWARD
.
*
* The ID of the outbound Resolver endpoint that you want to use to route DNS queries to the IP addresses that you
* specify in TargetIps
.
*
* A list of the tag keys and values that you want to associate with the endpoint. *
*/ private java.util.List
* A unique string that identifies the request and that allows failed requests to be retried without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
CreatorRequestId
can be any unique string, for example, a
* date/time stamp.
*/
public void setCreatorRequestId(String creatorRequestId) {
this.creatorRequestId = creatorRequestId;
}
/**
*
* A unique string that identifies the request and that allows failed requests to be retried without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
CreatorRequestId
can be any unique string, for example,
* a date/time stamp.
*/
public String getCreatorRequestId() {
return this.creatorRequestId;
}
/**
*
* A unique string that identifies the request and that allows failed requests to be retried without the risk of
* running the operation twice. CreatorRequestId
can be any unique string, for example, a date/time
* stamp.
*
CreatorRequestId
can be any unique string, for example, a
* date/time stamp.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateResolverRuleRequest withCreatorRequestId(String creatorRequestId) {
setCreatorRequestId(creatorRequestId);
return this;
}
/**
* * A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. *
* * @param name * A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. */ public void setName(String name) { this.name = name; } /** ** A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. *
* * @return A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. */ public String getName() { return this.name; } /** ** A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. *
* * @param name * A friendly name that lets you easily find a rule in the Resolver dashboard in the Route 53 console. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateResolverRuleRequest withName(String name) { setName(name); return this; } /** *
* When you want to forward DNS queries for specified domain name to resolvers on your network, specify
* FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to
* process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify
* FORWARD
for RuleType
. To then have Resolver process queries for apex.example.com, you
* create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for RuleType
.
*
FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver
* to process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and
* specify FORWARD
for RuleType
. To then have Resolver process queries for
* apex.example.com, you create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for
* RuleType
.
* @see RuleTypeOption
*/
public void setRuleType(String ruleType) {
this.ruleType = ruleType;
}
/**
*
* When you want to forward DNS queries for specified domain name to resolvers on your network, specify
* FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to
* process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify
* FORWARD
for RuleType
. To then have Resolver process queries for apex.example.com, you
* create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for RuleType
.
*
FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver
* to process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and
* specify FORWARD
for RuleType
. To then have Resolver process queries for
* apex.example.com, you create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for
* RuleType
.
* @see RuleTypeOption
*/
public String getRuleType() {
return this.ruleType;
}
/**
*
* When you want to forward DNS queries for specified domain name to resolvers on your network, specify
* FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to
* process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify
* FORWARD
for RuleType
. To then have Resolver process queries for apex.example.com, you
* create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for RuleType
.
*
FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver
* to process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and
* specify FORWARD
for RuleType
. To then have Resolver process queries for
* apex.example.com, you create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for
* RuleType
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleTypeOption
*/
public CreateResolverRuleRequest withRuleType(String ruleType) {
setRuleType(ruleType);
return this;
}
/**
*
* When you want to forward DNS queries for specified domain name to resolvers on your network, specify
* FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to
* process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and specify
* FORWARD
for RuleType
. To then have Resolver process queries for apex.example.com, you
* create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for RuleType
.
*
FORWARD
.
*
* When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver
* to process queries for a subdomain of that domain, specify SYSTEM
.
*
* For example, to forward DNS queries for example.com to resolvers on your network, you create a rule and
* specify FORWARD
for RuleType
. To then have Resolver process queries for
* apex.example.com, you create a rule and specify SYSTEM
for RuleType
.
*
* Currently, only Resolver can create rules that have a value of RECURSIVE
for
* RuleType
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RuleTypeOption
*/
public CreateResolverRuleRequest withRuleType(RuleTypeOption ruleType) {
this.ruleType = ruleType.toString();
return this;
}
/**
*
* DNS queries for this domain name are forwarded to the IP addresses that you specify in TargetIps
. If
* a query matches multiple Resolver rules (example.com and www.example.com), outbound DNS queries are routed using
* the Resolver rule that contains the most specific domain name (www.example.com).
*
TargetIps
. If a query matches multiple Resolver rules (example.com and www.example.com),
* outbound DNS queries are routed using the Resolver rule that contains the most specific domain name
* (www.example.com).
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* DNS queries for this domain name are forwarded to the IP addresses that you specify in TargetIps
. If
* a query matches multiple Resolver rules (example.com and www.example.com), outbound DNS queries are routed using
* the Resolver rule that contains the most specific domain name (www.example.com).
*
TargetIps
. If a query matches multiple Resolver rules (example.com and www.example.com),
* outbound DNS queries are routed using the Resolver rule that contains the most specific domain name
* (www.example.com).
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* DNS queries for this domain name are forwarded to the IP addresses that you specify in TargetIps
. If
* a query matches multiple Resolver rules (example.com and www.example.com), outbound DNS queries are routed using
* the Resolver rule that contains the most specific domain name (www.example.com).
*
TargetIps
. If a query matches multiple Resolver rules (example.com and www.example.com),
* outbound DNS queries are routed using the Resolver rule that contains the most specific domain name
* (www.example.com).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateResolverRuleRequest withDomainName(String domainName) {
setDomainName(domainName);
return this;
}
/**
* * The IPs that you want Resolver to forward DNS queries to. You can specify either Ipv4 or Ipv6 addresses but not * both in the same rule. Separate IP addresses with a space. *
*
* TargetIps
is available only when the value of Rule type
is FORWARD
.
*
*
* The IPs that you want Resolver to forward DNS queries to. You can specify either Ipv4 or Ipv6 addresses but not
* both in the same rule. Separate IP addresses with a space.
*
* TargetIps
is available only when the value of Rule type
is FORWARD
.
*/
public java.util.ListTargetIps
is available only when the value of Rule type
is FORWARD
.
*
*
* The IPs that you want Resolver to forward DNS queries to. You can specify either Ipv4 or Ipv6 addresses but not
* both in the same rule. Separate IP addresses with a space.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTargetIps(java.util.Collection)} or {@link #withTargetIps(java.util.Collection)} if you want to
* override the existing values.
* TargetIps
is available only when the value of Rule type
is FORWARD
.
*/
public void setTargetIps(java.util.CollectionTargetIps
is available only when the value of Rule type
is FORWARD
.
*
*
* The IPs that you want Resolver to forward DNS queries to. You can specify either Ipv4 or Ipv6 addresses but not
* both in the same rule. Separate IP addresses with a space.
*
* TargetIps
is available only when the value of Rule type
is FORWARD
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateResolverRuleRequest withTargetIps(TargetAddress... targetIps) {
if (this.targetIps == null) {
setTargetIps(new java.util.ArrayListTargetIps
is available only when the value of Rule type
is FORWARD
.
*
*
* The ID of the outbound Resolver endpoint that you want to use to route DNS queries to the IP addresses that you
* specify in
* The ID of the outbound Resolver endpoint that you want to use to route DNS queries to the IP addresses that you
* specify in
* The ID of the outbound Resolver endpoint that you want to use to route DNS queries to the IP addresses that you
* specify in
* A list of the tag keys and values that you want to associate with the endpoint.
*
* A list of the tag keys and values that you want to associate with the endpoint.
*
* A list of the tag keys and values that you want to associate with the endpoint.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
* A list of the tag keys and values that you want to associate with the endpoint.
* TargetIps
is available only when the value of Rule type
is FORWARD
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateResolverRuleRequest withTargetIps(java.util.CollectionTargetIps
.
* TargetIps
.
*/
public void setResolverEndpointId(String resolverEndpointId) {
this.resolverEndpointId = resolverEndpointId;
}
/**
* TargetIps
.
* TargetIps
.
*/
public String getResolverEndpointId() {
return this.resolverEndpointId;
}
/**
* TargetIps
.
* TargetIps
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateResolverRuleRequest withResolverEndpointId(String resolverEndpointId) {
setResolverEndpointId(resolverEndpointId);
return this;
}
/**
*