
com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRule Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.route53.inputs;
import com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRuleGeoProximityLocation;
import com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRuleItem;
import com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRuleLocation;
import com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRulePrimary;
import com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRuleRegion;
import com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentRuleSecondary;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class GetTrafficPolicyDocumentRule extends com.pulumi.resources.InvokeArgs {
public static final GetTrafficPolicyDocumentRule Empty = new GetTrafficPolicyDocumentRule();
/**
* Configuration block for when you add a geoproximity rule, you configure Amazon Route 53 to route traffic to your resources based on the geographic location of your resources. Only valid for `geoproximity` type. See below
*
*/
@Import(name="geoProximityLocations")
private @Nullable List geoProximityLocations;
/**
* @return Configuration block for when you add a geoproximity rule, you configure Amazon Route 53 to route traffic to your resources based on the geographic location of your resources. Only valid for `geoproximity` type. See below
*
*/
public Optional> geoProximityLocations() {
return Optional.ofNullable(this.geoProximityLocations);
}
/**
* ID of a rule you want to assign.
*
*/
@Import(name="id", required=true)
private String id;
/**
* @return ID of a rule you want to assign.
*
*/
public String id() {
return this.id;
}
/**
* Configuration block for when you add a multivalue answer rule, you configure your traffic policy to route traffic approximately randomly to your healthy resources. Only valid for `multivalue` type. See below
*
*/
@Import(name="items")
private @Nullable List items;
/**
* @return Configuration block for when you add a multivalue answer rule, you configure your traffic policy to route traffic approximately randomly to your healthy resources. Only valid for `multivalue` type. See below
*
*/
public Optional> items() {
return Optional.ofNullable(this.items);
}
/**
* Configuration block for when you add a geolocation rule, you configure your traffic policy to route your traffic based on the geographic location of your users. Only valid for `geo` type. See below
*
*/
@Import(name="locations")
private @Nullable List locations;
/**
* @return Configuration block for when you add a geolocation rule, you configure your traffic policy to route your traffic based on the geographic location of your users. Only valid for `geo` type. See below
*
*/
public Optional> locations() {
return Optional.ofNullable(this.locations);
}
/**
* Configuration block for the settings for the rule or endpoint that you want to route traffic to whenever the corresponding resources are available. Only valid for `failover` type. See below
*
*/
@Import(name="primary")
private @Nullable GetTrafficPolicyDocumentRulePrimary primary;
/**
* @return Configuration block for the settings for the rule or endpoint that you want to route traffic to whenever the corresponding resources are available. Only valid for `failover` type. See below
*
*/
public Optional primary() {
return Optional.ofNullable(this.primary);
}
@Import(name="regions")
private @Nullable List regions;
public Optional> regions() {
return Optional.ofNullable(this.regions);
}
/**
* Configuration block for the rule or endpoint that you want to route traffic to whenever the primary resources are not available. Only valid for `failover` type. See below
*
*/
@Import(name="secondary")
private @Nullable GetTrafficPolicyDocumentRuleSecondary secondary;
/**
* @return Configuration block for the rule or endpoint that you want to route traffic to whenever the primary resources are not available. Only valid for `failover` type. See below
*
*/
public Optional secondary() {
return Optional.ofNullable(this.secondary);
}
/**
* Type of the rule.
*
*/
@Import(name="type")
private @Nullable String type;
/**
* @return Type of the rule.
*
*/
public Optional type() {
return Optional.ofNullable(this.type);
}
private GetTrafficPolicyDocumentRule() {}
private GetTrafficPolicyDocumentRule(GetTrafficPolicyDocumentRule $) {
this.geoProximityLocations = $.geoProximityLocations;
this.id = $.id;
this.items = $.items;
this.locations = $.locations;
this.primary = $.primary;
this.regions = $.regions;
this.secondary = $.secondary;
this.type = $.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetTrafficPolicyDocumentRule defaults) {
return new Builder(defaults);
}
public static final class Builder {
private GetTrafficPolicyDocumentRule $;
public Builder() {
$ = new GetTrafficPolicyDocumentRule();
}
public Builder(GetTrafficPolicyDocumentRule defaults) {
$ = new GetTrafficPolicyDocumentRule(Objects.requireNonNull(defaults));
}
/**
* @param geoProximityLocations Configuration block for when you add a geoproximity rule, you configure Amazon Route 53 to route traffic to your resources based on the geographic location of your resources. Only valid for `geoproximity` type. See below
*
* @return builder
*
*/
public Builder geoProximityLocations(@Nullable List geoProximityLocations) {
$.geoProximityLocations = geoProximityLocations;
return this;
}
/**
* @param geoProximityLocations Configuration block for when you add a geoproximity rule, you configure Amazon Route 53 to route traffic to your resources based on the geographic location of your resources. Only valid for `geoproximity` type. See below
*
* @return builder
*
*/
public Builder geoProximityLocations(GetTrafficPolicyDocumentRuleGeoProximityLocation... geoProximityLocations) {
return geoProximityLocations(List.of(geoProximityLocations));
}
/**
* @param id ID of a rule you want to assign.
*
* @return builder
*
*/
public Builder id(String id) {
$.id = id;
return this;
}
/**
* @param items Configuration block for when you add a multivalue answer rule, you configure your traffic policy to route traffic approximately randomly to your healthy resources. Only valid for `multivalue` type. See below
*
* @return builder
*
*/
public Builder items(@Nullable List items) {
$.items = items;
return this;
}
/**
* @param items Configuration block for when you add a multivalue answer rule, you configure your traffic policy to route traffic approximately randomly to your healthy resources. Only valid for `multivalue` type. See below
*
* @return builder
*
*/
public Builder items(GetTrafficPolicyDocumentRuleItem... items) {
return items(List.of(items));
}
/**
* @param locations Configuration block for when you add a geolocation rule, you configure your traffic policy to route your traffic based on the geographic location of your users. Only valid for `geo` type. See below
*
* @return builder
*
*/
public Builder locations(@Nullable List locations) {
$.locations = locations;
return this;
}
/**
* @param locations Configuration block for when you add a geolocation rule, you configure your traffic policy to route your traffic based on the geographic location of your users. Only valid for `geo` type. See below
*
* @return builder
*
*/
public Builder locations(GetTrafficPolicyDocumentRuleLocation... locations) {
return locations(List.of(locations));
}
/**
* @param primary Configuration block for the settings for the rule or endpoint that you want to route traffic to whenever the corresponding resources are available. Only valid for `failover` type. See below
*
* @return builder
*
*/
public Builder primary(@Nullable GetTrafficPolicyDocumentRulePrimary primary) {
$.primary = primary;
return this;
}
public Builder regions(@Nullable List regions) {
$.regions = regions;
return this;
}
public Builder regions(GetTrafficPolicyDocumentRuleRegion... regions) {
return regions(List.of(regions));
}
/**
* @param secondary Configuration block for the rule or endpoint that you want to route traffic to whenever the primary resources are not available. Only valid for `failover` type. See below
*
* @return builder
*
*/
public Builder secondary(@Nullable GetTrafficPolicyDocumentRuleSecondary secondary) {
$.secondary = secondary;
return this;
}
/**
* @param type Type of the rule.
*
* @return builder
*
*/
public Builder type(@Nullable String type) {
$.type = type;
return this;
}
public GetTrafficPolicyDocumentRule build() {
if ($.id == null) {
throw new MissingRequiredPropertyException("GetTrafficPolicyDocumentRule", "id");
}
return $;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy