ControlPanel
The ControlPanel resource allows you to create and manage AWS Route53RecoveryControl ControlPanels for controlling the failover and recovery of your applications across multiple AWS accounts and regions.
Minimal Example
Section titled “Minimal Example”Create a basic ControlPanel with required properties and an optional tag.
import AWS from "alchemy/aws/control";
const basicControlPanel = await AWS.Route53RecoveryControl.ControlPanel("basicControlPanel", { Name: "PrimaryControlPanel", ClusterArn: "arn:aws:route53-recovery-control::123456789012:cluster:example-cluster", Tags: [{ Key: "Environment", Value: "Production" }]});
Advanced Configuration
Section titled “Advanced Configuration”Configure a ControlPanel with a name and tags, while adopting an existing resource if it already exists.
const advancedControlPanel = await AWS.Route53RecoveryControl.ControlPanel("advancedControlPanel", { Name: "SecondaryControlPanel", ClusterArn: "arn:aws:route53-recovery-control::123456789012:cluster:example-cluster", Tags: [{ Key: "Environment", Value: "Staging" }], adopt: true});
ControlPanel without Cluster
Section titled “ControlPanel without Cluster”Create a ControlPanel without specifying a ClusterArn, indicating it will not be associated with any existing cluster.
const standaloneControlPanel = await AWS.Route53RecoveryControl.ControlPanel("standaloneControlPanel", { Name: "StandaloneControlPanel"});
Updating a ControlPanel
Section titled “Updating a ControlPanel”An example of how to update the name of an existing ControlPanel.
const updatedControlPanel = await AWS.Route53RecoveryControl.ControlPanel("updatedControlPanel", { Name: "UpdatedControlPanelName"});
Deleting a ControlPanel
Section titled “Deleting a ControlPanel”Illustrate how to delete a ControlPanel when it is no longer needed.
const deleteControlPanel = await AWS.Route53RecoveryControl.ControlPanel("deleteControlPanel", { Name: "ToBeDeletedControlPanel", delete: true // Indicates that the ControlPanel should be deleted on --destroy});