Class ARecord
A DNS A record.
Inherited Members
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ARecord : RecordSet, IRecordSet, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class ARecord Inherits RecordSet Implements IRecordSet, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::Route53::RecordSet
ExampleMetadata: infused
Examples
using Amazon.CDK.RegionInfo;
HostedZone zone;
string ebsEnvironmentUrl;
new ARecord(this, "AliasRecord", new ARecordProps {
Zone = zone,
Target = RecordTarget.FromAlias(
new ElasticBeanstalkEnvironmentEndpointTarget(ebsEnvironmentUrl, new Dictionary<string, string?> {
{ "hostedZoneId", RegionInfo.Get("us-east-1").EbsEnvEndpointHostedZoneId }
}))
});
Synopsis
Constructors
| ARecord(Construct, string, IARecordProps) | A DNS A record. |
Properties
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| FromARecordAttributes(Construct, string, IARecordAttrs) | Creates new A record of type alias with target set to an existing A Record DNS. |
Constructors
ARecord(Construct, string, IARecordProps)
A DNS A record.
public ARecord(Construct scope, string id, IARecordProps props)
Parameters
- scope Construct
- id string
- props IARecordProps
Remarks
Resource: AWS::Route53::RecordSet
ExampleMetadata: infused
Examples
using Amazon.CDK.RegionInfo;
HostedZone zone;
string ebsEnvironmentUrl;
new ARecord(this, "AliasRecord", new ARecordProps {
Zone = zone,
Target = RecordTarget.FromAlias(
new ElasticBeanstalkEnvironmentEndpointTarget(ebsEnvironmentUrl, new Dictionary<string, string?> {
{ "hostedZoneId", RegionInfo.Get("us-east-1").EbsEnvEndpointHostedZoneId }
}))
});
Properties
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::Route53::RecordSet
ExampleMetadata: infused
Methods
FromARecordAttributes(Construct, string, IARecordAttrs)
Creates new A record of type alias with target set to an existing A Record DNS.
public static ARecord FromARecordAttributes(Construct scope, string id, IARecordAttrs attrs)
Parameters
- scope Construct
the parent Construct for this Construct.
- id string
Logical Id of the resource.
- attrs IARecordAttrs
the ARecordAttributes (Target Arecord DNS name and HostedZone).
Returns
AWS::Route53::RecordSet of type A with target alias set to existing A record
Remarks
Use when the target A record is created outside of CDK For records created as part of CDK use
Aws-cdk-lib: /aws-route53-targets/route53-record.ts