Class RecordTarget
Type union for a record that accepts multiple types of target.
Inheritance
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RecordTarget : DeputyBase
Syntax (vb)
Public Class RecordTarget
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudFront;
HostedZone myZone;
CloudFrontWebDistribution distribution;
new AaaaRecord(this, "Alias", new AaaaRecordProps {
Zone = myZone,
Target = RecordTarget.FromAlias(new CloudFrontTarget(distribution))
});
Synopsis
Constructors
RecordTarget(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
RecordTarget(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
RecordTarget(String[], IAliasRecordTarget) |
Properties
AliasTarget | alias for targets such as CloudFront distribution to route traffic to. |
Values | correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses). |
Methods
FromAlias(IAliasRecordTarget) | Use an alias as target. |
FromIpAddresses(String[]) | Use ip addresses as target. |
FromValues(String[]) | Use string values as target. |
Constructors
RecordTarget(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected RecordTarget(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
RecordTarget(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected RecordTarget(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
RecordTarget(String[], IAliasRecordTarget)
public RecordTarget(string[] values = null, IAliasRecordTarget aliasTarget = null)
Parameters
- values System.String[]
correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses).
- aliasTarget IAliasRecordTarget
alias for targets such as CloudFront distribution to route traffic to.
Properties
AliasTarget
alias for targets such as CloudFront distribution to route traffic to.
public virtual IAliasRecordTarget AliasTarget { get; }
Property Value
Values
correspond with the chosen record type (e.g. for 'A' Type, specify one or more IP addresses).
public virtual string[] Values { get; }
Property Value
System.String[]
Methods
FromAlias(IAliasRecordTarget)
Use an alias as target.
public static RecordTarget FromAlias(IAliasRecordTarget aliasTarget)
Parameters
- aliasTarget IAliasRecordTarget
Returns
FromIpAddresses(String[])
Use ip addresses as target.
public static RecordTarget FromIpAddresses(params string[] ipAddresses)
Parameters
- ipAddresses System.String[]
Returns
FromValues(String[])
Use string values as target.
public static RecordTarget FromValues(params string[] values)
Parameters
- values System.String[]
Returns