Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.cloudformation.model;
 
 
Container for the parameters to the SignalResource operation.

Sends a signal to the specified resource with a success or failure status. You can use the SignalResource API in conjunction with a creation policy or update policy. AWS 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 API is useful in cases where you want to send signals from anywhere other than an Amazon EC2 instance.

 
 public class SignalResourceRequest extends AmazonWebServiceRequest implements SerializableCloneable {

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

Constraints:
Length: 1 -
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)

 
     private String stackName;

    
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.
 
     private String logicalResourceId;

    
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.

Constraints:
Length: 1 - 64

 
     private String uniqueId;

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

Constraints:
Allowed Values: SUCCESS, FAILURE

 
     private String status;

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

Constraints:
Length: 1 -
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)

Returns:
The stack name or ID that includes the resource that you want to signal.
 
     public String getStackName() {
         return ;
     }
    
    
The stack name or ID that includes the resource that you want to signal.

Constraints:
Length: 1 -
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)

Parameters:
stackName The stack name or ID that includes the resource that you want to signal.
    public void setStackName(String stackName) {
        this. = stackName;
    }
    
    
The stack name or ID that includes the resource that you want to signal.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 -
Pattern: ([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)

Parameters:
stackName The stack name or ID that includes the resource that you want to signal.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SignalResourceRequest withStackName(String stackName) {
        this. = stackName;
        return this;
    }

    
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.

Returns:
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.
    public String getLogicalResourceId() {
        return ;
    }
    
    
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.

Parameters:
logicalResourceId 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.
    public void setLogicalResourceId(String logicalResourceId) {
        this. = logicalResourceId;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
logicalResourceId 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.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SignalResourceRequest withLogicalResourceId(String logicalResourceId) {
        this. = logicalResourceId;
        return this;
    }

    
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.

Constraints:
Length: 1 - 64

Returns:
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.
    public String getUniqueId() {
        return ;
    }
    
    
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.

Constraints:
Length: 1 - 64

Parameters:
uniqueId 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.
    public void setUniqueId(String uniqueId) {
        this. = uniqueId;
    }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64

Parameters:
uniqueId 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.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SignalResourceRequest withUniqueId(String uniqueId) {
        this. = uniqueId;
        return this;
    }

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

Constraints:
Allowed Values: SUCCESS, FAILURE

Returns:
The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.
See also:
ResourceSignalStatus
    public String getStatus() {
        return ;
    }
    
    
The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.

Constraints:
Allowed Values: SUCCESS, FAILURE

Parameters:
status The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.
See also:
ResourceSignalStatus
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: SUCCESS, FAILURE

Parameters:
status The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ResourceSignalStatus
    public SignalResourceRequest withStatus(String status) {
        this. = status;
        return this;
    }

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

Constraints:
Allowed Values: SUCCESS, FAILURE

Parameters:
status The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.
See also:
ResourceSignalStatus
    public void setStatus(ResourceSignalStatus status) {
        this. = status.toString();
    }
    
    
The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: SUCCESS, FAILURE

Parameters:
status The status of the signal, which is either success or failure. A failure signal causes AWS CloudFormation to immediately fail the stack creation or update.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ResourceSignalStatus
        this. = status.toString();
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStackName() != nullsb.append("StackName: " + getStackName() + ",");
        if (getLogicalResourceId() != nullsb.append("LogicalResourceId: " + getLogicalResourceId() + ",");
        if (getUniqueId() != nullsb.append("UniqueId: " + getUniqueId() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); 
        hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); 
        hashCode = prime * hashCode + ((getUniqueId() == null) ? 0 : getUniqueId().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SignalResourceRequest == falsereturn false;
        SignalResourceRequest other = (SignalResourceRequest)obj;
        
        if (other.getStackName() == null ^ this.getStackName() == nullreturn false;
        if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == falsereturn false
        if (other.getLogicalResourceId() == null ^ this.getLogicalResourceId() == nullreturn false;
        if (other.getLogicalResourceId() != null && other.getLogicalResourceId().equals(this.getLogicalResourceId()) == falsereturn false
        if (other.getUniqueId() == null ^ this.getUniqueId() == nullreturn false;
        if (other.getUniqueId() != null && other.getUniqueId().equals(this.getUniqueId()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        return true;
    }
    
    @Override
    public SignalResourceRequest clone() {
        
            return (SignalResourceRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X