Class CfnTrafficPolicy

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITrafficPolicyRef, 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.000Z") @Stability(Stable) public class CfnTrafficPolicy extends CfnResource implements IInspectable, ITrafficPolicyRef
Resource Type definition for AWS::Route53::TrafficPolicy.

Creates a Route 53 traffic policy, a JSON document that describes how Route 53 responds to DNS queries for a domain 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.*;
 CfnTrafficPolicy cfnTrafficPolicy = CfnTrafficPolicy.Builder.create(this, "MyCfnTrafficPolicy")
         .document("document")
         .name("name")
         // the properties below are optional
         .comment("comment")
         .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

    • CfnTrafficPolicy

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

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

      @Stability(Stable) public CfnTrafficPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTrafficPolicyProps props)
      Create a new AWS::Route53::TrafficPolicy.

      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

    • arnForTrafficPolicy

      @Stability(Stable) @NotNull public static String arnForTrafficPolicy(@NotNull ITrafficPolicyRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTrafficPolicy

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

      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.
    • getAttrId

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

      @Stability(Stable) @NotNull public String getAttrType()
      The DNS type of the resource record sets that Amazon Route 53 creates when the traffic policy is used to create a traffic policy instance.
    • getAttrVersion

      @Stability(Stable) @NotNull public Number getAttrVersion()
      The version number that Amazon Route 53 assigned to the 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
    • getTrafficPolicyRef

      @Stability(Stable) @NotNull public TrafficPolicyReference getTrafficPolicyRef()
      A reference to a TrafficPolicy resource.
      Specified by:
      getTrafficPolicyRef in interface ITrafficPolicyRef
    • getDocument

      @Stability(Stable) @NotNull public String getDocument()
      The definition of the traffic policy in JSON format.
    • setDocument

      @Stability(Stable) public void setDocument(@NotNull String value)
      The definition of the traffic policy in JSON format.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the traffic policy.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the traffic policy.
    • getComment

      @Stability(Stable) @Nullable public String getComment()
      Any comments to include about the traffic policy.
    • setComment

      @Stability(Stable) public void setComment(@Nullable String value)
      Any comments to include about the traffic policy.