awsroute53patterns

package
v1.155.0-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpsRedirect_IsConstruct

func HttpsRedirect_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func NewHttpsRedirect_Override

func NewHttpsRedirect_Override(h HttpsRedirect, scope constructs.Construct, id *string, props *HttpsRedirectProps)

Experimental.

Types

type HttpsRedirect

type HttpsRedirect interface {
	awscdk.Construct
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Allows creating a domainA -> domainB redirect using CloudFront and S3.

You can specify multiple domains to be redirected.

Example:

patterns.NewHttpsRedirect(this, jsii.String("Redirect"), &httpsRedirectProps{
	recordNames: []*string{
		jsii.String("foo.example.com"),
	},
	targetDomain: jsii.String("bar.example.com"),
	zone: route53.hostedZone.fromHostedZoneAttributes(this, jsii.String("HostedZone"), &hostedZoneAttributes{
		hostedZoneId: jsii.String("ID"),
		zoneName: jsii.String("example.com"),
	}),
})

Experimental.

func NewHttpsRedirect

func NewHttpsRedirect(scope constructs.Construct, id *string, props *HttpsRedirectProps) HttpsRedirect

Experimental.

type HttpsRedirectProps

type HttpsRedirectProps struct {
	// The redirect target fully qualified domain name (FQDN).
	//
	// An alias record
	// will be created that points to your CloudFront distribution. Root domain
	// or sub-domain can be supplied.
	// Experimental.
	TargetDomain *string `json:"targetDomain" yaml:"targetDomain"`
	// Hosted zone of the domain which will be used to create alias record(s) from domain names in the hosted zone to the target domain.
	//
	// The hosted zone must
	// contain entries for the domain name(s) supplied through `recordNames` that
	// will redirect to the target domain.
	//
	// Domain names in the hosted zone can include a specific domain (example.com)
	// and its subdomains (acme.example.com, zenith.example.com).
	// Experimental.
	Zone awsroute53.IHostedZone `json:"zone" yaml:"zone"`
	// The AWS Certificate Manager (ACM) certificate that will be associated with the CloudFront distribution that will be created.
	//
	// If provided, the certificate must be
	// stored in us-east-1 (N. Virginia)
	// Experimental.
	Certificate awscertificatemanager.ICertificate `json:"certificate" yaml:"certificate"`
	// The domain names that will redirect to `targetDomain`.
	// Experimental.
	RecordNames *[]*string `json:"recordNames" yaml:"recordNames"`
}

Properties to configure an HTTPS Redirect.

Example:

patterns.NewHttpsRedirect(this, jsii.String("Redirect"), &httpsRedirectProps{
	recordNames: []*string{
		jsii.String("foo.example.com"),
	},
	targetDomain: jsii.String("bar.example.com"),
	zone: route53.hostedZone.fromHostedZoneAttributes(this, jsii.String("HostedZone"), &hostedZoneAttributes{
		hostedZoneId: jsii.String("ID"),
		zoneName: jsii.String("example.com"),
	}),
})

Experimental.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL