Class CfnTrafficPolicyInstance

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITrafficPolicyInstanceRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:05:00.001Z") @Stability(Stable) public class CfnTrafficPolicyInstance extends CfnResource implements IInspectable, ITrafficPolicyInstanceRef
Resource Type definition for AWS::Route53::TrafficPolicyInstance.

Applies a version of a Route 53 traffic policy to a DNS name in a public hosted zone, and Route 53 creates and owns the resource record sets that answer queries for that name.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.route53.*;
 CfnTrafficPolicyInstance cfnTrafficPolicyInstance = CfnTrafficPolicyInstance.Builder.create(this, "MyCfnTrafficPolicyInstance")
         .hostedZoneId("hostedZoneId")
         .name("name")
         .trafficPolicyId("trafficPolicyId")
         .trafficPolicyVersion(123)
         .ttl(123)
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTrafficPolicyInstance

      protected CfnTrafficPolicyInstance(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTrafficPolicyInstance

      protected CfnTrafficPolicyInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTrafficPolicyInstance

      @Stability(Stable) public CfnTrafficPolicyInstance(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTrafficPolicyInstanceProps props)
      Create a new AWS::Route53::TrafficPolicyInstance.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForTrafficPolicyInstance

      @Stability(Stable) @NotNull public static String arnForTrafficPolicyInstance(@NotNull ITrafficPolicyInstanceRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTrafficPolicyInstance

      @Stability(Stable) @NotNull public static Boolean isCfnTrafficPolicyInstance(@NotNull Object x)
      Checks whether the given object is a CfnTrafficPolicyInstance.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the traffic policy instance.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID that Amazon Route 53 assigned to the traffic policy instance when it was created.
    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The current state of the traffic policy instance.

      A steady-state instance is Applied.

    • getAttrTrafficPolicyType

      @Stability(Stable) @NotNull public String getAttrTrafficPolicyType()
      The DNS type that Amazon Route 53 assigned to all of the resource record sets that it created for this traffic policy instance.

      Route 53 derives it from the referenced traffic policy.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getTrafficPolicyInstanceRef

      @Stability(Stable) @NotNull public TrafficPolicyInstanceReference getTrafficPolicyInstanceRef()
      A reference to a TrafficPolicyInstance resource.
      Specified by:
      getTrafficPolicyInstanceRef in interface ITrafficPolicyInstanceRef
    • getHostedZoneId

      @Stability(Stable) @NotNull public String getHostedZoneId()
      The ID of the hosted zone that Amazon Route 53 creates the resource record sets in.
    • setHostedZoneId

      @Stability(Stable) public void setHostedZoneId(@NotNull String value)
      The ID of the hosted zone that Amazon Route 53 creates the resource record sets in.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The domain name, or subdomain name, for which Amazon Route 53 answers DNS queries by using the resource record sets it creates for this traffic policy instance.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The domain name, or subdomain name, for which Amazon Route 53 answers DNS queries by using the resource record sets it creates for this traffic policy instance.
    • getTrafficPolicyId

      @Stability(Stable) @NotNull public String getTrafficPolicyId()
      The ID of the traffic policy that Amazon Route 53 uses to create resource record sets in the specified hosted zone.
    • setTrafficPolicyId

      @Stability(Stable) public void setTrafficPolicyId(@NotNull String value)
      The ID of the traffic policy that Amazon Route 53 uses to create resource record sets in the specified hosted zone.
    • getTrafficPolicyVersion

      @Stability(Stable) @NotNull public Number getTrafficPolicyVersion()
      The version of the traffic policy that Amazon Route 53 uses to create resource record sets in the specified hosted zone.
    • setTrafficPolicyVersion

      @Stability(Stable) public void setTrafficPolicyVersion(@NotNull Number value)
      The version of the traffic policy that Amazon Route 53 uses to create resource record sets in the specified hosted zone.
    • getTtl

      @Stability(Stable) @NotNull public Number getTtl()
      The TTL that Amazon Route 53 assigns to all of the resource record sets that it creates in the specified hosted zone.
    • setTtl

      @Stability(Stable) public void setTtl(@NotNull Number value)
      The TTL that Amazon Route 53 assigns to all of the resource record sets that it creates in the specified hosted zone.