Java 类com.amazonaws.services.cloudformation.model.UpdateStackRequest 实例源码

项目:cerberus-lifecycle-cli    文件:CloudFormationService.java   
/**
 * Updates an existing stack by name.
 *
 * @param stackId Stack ID.
 * @param parameters Input parameters.
 * @param templatePath Path to the JSON template of the stack.
 */
public void updateStack(final String stackId,
                        final Map<String, String> parameters,
                        final String templatePath,
                        final boolean iamCapabilities) {
    final UpdateStackRequest request = new UpdateStackRequest()
            .withStackName(stackId)
            .withParameters(convertParameters(parameters));

    if (StringUtils.isNotBlank(templatePath)) {
        request.withTemplateBody(getTemplateText(templatePath));
    } else {
        request.withUsePreviousTemplate(true);
    }

    if (iamCapabilities) {
        request.getCapabilities().add("CAPABILITY_IAM");
    }

    cloudFormationClient.updateStack(request);
}
项目:aws-ant-tasks    文件:UpdateStackTask.java   
public void execute() {
    checkParams();
    AmazonCloudFormationClient client = getOrCreateClient(AmazonCloudFormationClient.class);
    UpdateStackRequest request = new UpdateStackRequest()
            .withStackName(stackName).withStackPolicyBody(stackPolicyBody)
            .withStackPolicyURL(stackPolicyURL)
            .withTemplateBody(templateBody).withTemplateURL(templateURL)
            .withStackPolicyDuringUpdateBody(stackPolicyDuringUpdateBody)
            .withStackPolicyDuringUpdateURL(stackPolicyDuringUpdateURL)
            .withUsePreviousTemplate(usePreviousTemplate);

    if (capabilities.size() > 0) {
        request.setCapabilities(capabilities);
    }
    if (parameters.size() > 0) {
        request.setParameters(parameters);
    }
    if (notificationArns.size() > 0) {
        request.setNotificationARNs(notificationArns);
    }

    try {
        client.updateStack(request);
        System.out.println("Update stack " + stackName
                + " request submitted.");
    } catch (Exception e) {
        throw new BuildException("Could not update stack: "
                + e.getMessage(), e);
    }
}
项目:cfnassist    文件:PollingStackMonitor.java   
@Override
public void addMonitoringTo(UpdateStackRequest updateStackRequest)
        throws NotReadyException {
    // does nothing in this implementation  
}
项目:cfnassist    文件:SNSMonitor.java   
@Override
public void addMonitoringTo(UpdateStackRequest updateStackRequest) throws NotReadyException {
    Collection<String> arns = getArns();
    updateStackRequest.setNotificationARNs(arns);   
}
项目:jwrapper-maven-plugin    文件:CarrotCloudForm.java   
public Stack stackUpdate() throws Exception {

        final UpdateStackRequest request = new UpdateStackRequest();

        request.withStackName(name);
        request.withParameters(paramList);
        request.withTemplateBody(template);

        amazonClient.updateStack(request);

        final Stack stack = waitForStackUpdate();

        return stack;

    }
项目:cfnassist    文件:MonitorStackEvents.java   
void addMonitoringTo(UpdateStackRequest updateStackRequest) throws NotReadyException;