SignalResourceCommand

Sends a signal to the specified resource with a success or failure status. You can use the SignalResource operation in conjunction with a creation policy or update policy. CloudFormation doesn't proceed with a stack creation or update until resources receive the required number of signals or the timeout period is exceeded. The SignalResource operation is useful in cases where you want to send signals from anywhere other than an Amazon EC2 instance.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CloudFormationClient, SignalResourceCommand } from "@aws-sdk/client-cloudformation"; // ES Modules import
// const { CloudFormationClient, SignalResourceCommand } = require("@aws-sdk/client-cloudformation"); // CommonJS import
const client = new CloudFormationClient(config);
const input = { // SignalResourceInput
  StackName: "STRING_VALUE", // required
  LogicalResourceId: "STRING_VALUE", // required
  UniqueId: "STRING_VALUE", // required
  Status: "SUCCESS" || "FAILURE", // required
};
const command = new SignalResourceCommand(input);
const response = await client.send(command);
// {};

SignalResourceCommand Input

See SignalResourceCommandInput for more details

Parameter
Type
Description
LogicalResourceId
Required
string | undefined

The logical ID of the resource that you want to signal. The logical ID is the name of the resource that given in the template.

StackName
Required
string | undefined

The stack name or unique stack ID that includes the resource that you want to signal.

Status
Required
ResourceSignalStatus | undefined

The status of the signal, which is either success or failure. A failure signal causes CloudFormation to immediately fail the stack creation or update.

UniqueId
Required
string | undefined

A unique ID of the signal. When you signal Amazon EC2 instances or Auto Scaling groups, specify the instance ID that you are signaling as the unique ID. If you send multiple signals to a single resource (such as signaling a wait condition), each signal requires a different unique ID.

SignalResourceCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
CloudFormationServiceException
Base exception class for all service exceptions from CloudFormation service.