Class RecordTarget

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.route53.RecordTarget
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
AddressRecordTarget

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.043Z") @Stability(Stable) public class RecordTarget extends software.amazon.jsii.JsiiObject
Type union for a record that accepts multiple types of target.

Example:

 import software.amazon.awscdk.services.cloudfront.*;
 HostedZone myZone;
 CloudFrontWebDistribution distribution;
 AaaaRecord.Builder.create(this, "Alias")
         .zone(myZone)
         .target(RecordTarget.fromAlias(new CloudFrontTarget(distribution)))
         .build();
 
  • Constructor Details

    • RecordTarget

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

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

      @Stability(Stable) protected RecordTarget(@Nullable List<String> values, @Nullable IAliasRecordTarget aliasTarget)
      Parameters:
      values - correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses).
      aliasTarget - alias for targets such as CloudFront distribution to route traffic to.
    • RecordTarget

      @Stability(Stable) protected RecordTarget(@Nullable List<String> values)
      Parameters:
      values - correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses).
    • RecordTarget

      @Stability(Stable) protected RecordTarget()
  • Method Details

    • fromAlias

      @Stability(Stable) @NotNull public static RecordTarget fromAlias(@NotNull IAliasRecordTarget aliasTarget)
      Use an alias as target.

      Parameters:
      aliasTarget - This parameter is required.
    • fromIpAddresses

      @Stability(Stable) @NotNull public static RecordTarget fromIpAddresses(@NotNull @NotNull String... ipAddresses)
      Use ip addresses as target.

      Parameters:
      ipAddresses - This parameter is required.
    • fromValues

      @Stability(Stable) @NotNull public static RecordTarget fromValues(@NotNull @NotNull String... values)
      Use string values as target.

      Parameters:
      values - This parameter is required.
    • getAliasTarget

      @Stability(Stable) @Nullable public IAliasRecordTarget getAliasTarget()
      alias for targets such as CloudFront distribution to route traffic to.
    • getValues

      @Stability(Stable) @Nullable public List<String> getValues()
      correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses).