@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getChangeSetName() == null) ? 0 : getChangeSetName().hashCode()); hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; }
/** * <p> * The name or ARN of the change set that you want use to update the specified stack. * </p> * * @param changeSetName * The name or ARN of the change set that you want use to update the specified stack. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteChangeSetRequest withChangeSetName(String changeSetName) { setChangeSetName(changeSetName); return this; }
/** * <p> * A unique identifier for this <code>ExecuteChangeSet</code> request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to execute a change set to update a stack * with the same name. You might retry <code>ExecuteChangeSet</code> requests to ensure that AWS CloudFormation * successfully received them. * </p> * * @param clientRequestToken * A unique identifier for this <code>ExecuteChangeSet</code> request. Specify this token if you plan to * retry requests so that AWS CloudFormation knows that you're not attempting to execute a change set to * update a stack with the same name. You might retry <code>ExecuteChangeSet</code> requests to ensure that * AWS CloudFormation successfully received them. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteChangeSetRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; }
public Map<String, String> executeChangeSet(String changeSetName, PollConfiguration pollConfiguration) throws ExecutionException { if (!this.changeSetHasChanges(changeSetName) || !this.exists()) { // If the change set has no changes or the stack was not prepared we should simply delete it. this.listener.getLogger().format("Deleting empty change set %s for stack %s %n", changeSetName, this.stack); DeleteChangeSetRequest req = new DeleteChangeSetRequest().withChangeSetName(changeSetName).withStackName(this.stack); this.client.deleteChangeSet(req); Map<String, String> outputs = this.describeOutputs(); outputs.put(UPDATE_STATUS_OUTPUT, "false"); return outputs; } else { this.listener.getLogger().format("Executing change set %s for stack %s %n", changeSetName, this.stack); final Waiter<DescribeStacksRequest> waiter; if (this.isInReview()) { waiter = this.client.waiters().stackCreateComplete(); } else { waiter = this.client.waiters().stackUpdateComplete(); } ExecuteChangeSetRequest req = new ExecuteChangeSetRequest().withChangeSetName(changeSetName).withStackName(this.stack); this.client.executeChangeSet(req); new EventPrinter(this.client, this.listener).waitAndPrintStackEvents(this.stack, waiter, pollConfiguration); this.listener.getLogger().format("Executed change set %s for stack %s %n", changeSetName, this.stack); Map<String, String> outputs = this.describeOutputs(); outputs.put(UPDATE_STATUS_OUTPUT, "true"); return outputs; } }
public void executeChangeSet(String changeSetArn) { cloudFormation.executeChangeSet(new ExecuteChangeSetRequest().withChangeSetName(changeSetArn)); logger.lifecycle("Executing change set {}", changeSetArn); }
/** * <p> * If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the change * set you want to execute. * </p> * * @param stackName * If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the * change set you want to execute. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteChangeSetRequest withStackName(String stackName) { setStackName(stackName); return this; }
.orElseThrow(() -> new GradleException("ChangeSet for stack " + stackName + " was not found.")) .getChangeSetName(); ExecuteChangeSetRequest req = new ExecuteChangeSetRequest() .withStackName(stackName) .withChangeSetName(changeSetName); cfn.executeChangeSet(req); getLogger().info("ChangeSet is executed : {}, {}", stackName, changeSetName);
/** * <p> * If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the change * set you want to execute. * </p> * * @param stackName * If you specified the name of a change set, specify the stack name or ID (ARN) that is associated with the * change set you want to execute. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteChangeSetRequest withStackName(String stackName) { setStackName(stackName); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ExecuteChangeSetRequest == false) return false; ExecuteChangeSetRequest other = (ExecuteChangeSetRequest) obj; if (other.getChangeSetName() == null ^ this.getChangeSetName() == null) return false; if (other.getChangeSetName() != null && other.getChangeSetName().equals(this.getChangeSetName()) == false) return false; if (other.getStackName() == null ^ this.getStackName() == null) return false; if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; return true; }
/** * <p> * The name or ARN of the change set that you want use to update the specified stack. * </p> * * @param changeSetName * The name or ARN of the change set that you want use to update the specified stack. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteChangeSetRequest withChangeSetName(String changeSetName) { setChangeSetName(changeSetName); return this; }
/** * <p> * A unique identifier for this <code>ExecuteChangeSet</code> request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to execute a change set to update a stack * with the same name. You might retry <code>ExecuteChangeSet</code> requests to ensure that AWS CloudFormation * successfully received them. * </p> * * @param clientRequestToken * A unique identifier for this <code>ExecuteChangeSet</code> request. Specify this token if you plan to * retry requests so that AWS CloudFormation knows that you're not attempting to execute a change set to * update a stack with the same name. You might retry <code>ExecuteChangeSet</code> requests to ensure that * AWS CloudFormation successfully received them. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteChangeSetRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getChangeSetName() != null) sb.append("ChangeSetName: ").append(getChangeSetName()).append(","); if (getStackName() != null) sb.append("StackName: ").append(getStackName()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()); sb.append("}"); return sb.toString(); }
public Request<ExecuteChangeSetRequest> marshall(ExecuteChangeSetRequest executeChangeSetRequest) { if (executeChangeSetRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<ExecuteChangeSetRequest> request = new DefaultRequest<ExecuteChangeSetRequest>(executeChangeSetRequest, "AmazonCloudFormation"); request.addParameter("Action", "ExecuteChangeSet"); request.addParameter("Version", "2010-05-15"); request.setHttpMethod(HttpMethodName.POST); if (executeChangeSetRequest.getChangeSetName() != null) { request.addParameter("ChangeSetName", StringUtils.fromString(executeChangeSetRequest.getChangeSetName())); } if (executeChangeSetRequest.getStackName() != null) { request.addParameter("StackName", StringUtils.fromString(executeChangeSetRequest.getStackName())); } if (executeChangeSetRequest.getClientRequestToken() != null) { request.addParameter("ClientRequestToken", StringUtils.fromString(executeChangeSetRequest.getClientRequestToken())); } return request; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getChangeSetName() == null) ? 0 : getChangeSetName().hashCode()); hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ExecuteChangeSetRequest == false) return false; ExecuteChangeSetRequest other = (ExecuteChangeSetRequest) obj; if (other.getChangeSetName() == null ^ this.getChangeSetName() == null) return false; if (other.getChangeSetName() != null && other.getChangeSetName().equals(this.getChangeSetName()) == false) return false; if (other.getStackName() == null ^ this.getStackName() == null) return false; if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getChangeSetName() != null) sb.append("ChangeSetName: ").append(getChangeSetName()).append(","); if (getStackName() != null) sb.append("StackName: ").append(getStackName()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()); sb.append("}"); return sb.toString(); }
public Request<ExecuteChangeSetRequest> marshall(ExecuteChangeSetRequest executeChangeSetRequest) { if (executeChangeSetRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<ExecuteChangeSetRequest> request = new DefaultRequest<ExecuteChangeSetRequest>(executeChangeSetRequest, "AmazonCloudFormation"); request.addParameter("Action", "ExecuteChangeSet"); request.addParameter("Version", "2010-05-15"); request.setHttpMethod(HttpMethodName.POST); if (executeChangeSetRequest.getChangeSetName() != null) { request.addParameter("ChangeSetName", StringUtils.fromString(executeChangeSetRequest.getChangeSetName())); } if (executeChangeSetRequest.getStackName() != null) { request.addParameter("StackName", StringUtils.fromString(executeChangeSetRequest.getStackName())); } if (executeChangeSetRequest.getClientRequestToken() != null) { request.addParameter("ClientRequestToken", StringUtils.fromString(executeChangeSetRequest.getClientRequestToken())); } return request; }