Class RecordTarget
Type union for a record that accepts multiple types of target.
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.Apigatewayv2;
HostedZone zone;
DomainName domainName;
new ARecord(this, "AliasRecord", new ARecordProps {
Zone = zone,
Target = RecordTarget.FromAlias(new ApiGatewayv2DomainProperties(domainName.RegionalDomainName, domainName.RegionalHostedZoneId))
});
Synopsis
Constructors
| RecordTarget(string[]?, IAliasRecordTarget?) | Type union for a record that accepts multiple types of target. |
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(params string[]) | Use ip addresses as target. |
| FromValues(params string[]) | Use string values as target. |
Constructors
RecordTarget(string[]?, IAliasRecordTarget?)
Type union for a record that accepts multiple types of target.
public RecordTarget(string[]? values = null, IAliasRecordTarget? aliasTarget = null)
Parameters
- values 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.
Remarks
ExampleMetadata: infused
Properties
AliasTarget
alias for targets such as CloudFront distribution to route traffic to.
public virtual IAliasRecordTarget? AliasTarget { get; }
Property Value
Remarks
ExampleMetadata: infused
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
string[]
Remarks
ExampleMetadata: infused
Methods
FromAlias(IAliasRecordTarget)
Use an alias as target.
public static RecordTarget FromAlias(IAliasRecordTarget aliasTarget)
Parameters
- aliasTarget IAliasRecordTarget
Returns
Remarks
ExampleMetadata: infused
FromIpAddresses(params string[])
Use ip addresses as target.
public static RecordTarget FromIpAddresses(params string[] ipAddresses)
Parameters
- ipAddresses string[]
Returns
Remarks
ExampleMetadata: infused
FromValues(params string[])
Use string values as target.
public static RecordTarget FromValues(params string[] values)
Parameters
- values string[]
Returns
Remarks
ExampleMetadata: infused