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

项目:aws-sam-gradle    文件:CloudformationService.java   
public String createChangeSet(String changeSetName, String stackName, ChangeSetType changeSetType,
        String templateBody, Collection<Parameter> parameters) {
    LOG.info("Creating change set for stack {} with name {}, type {} and parameters {}", stackName, changeSetName,
            changeSetType, parameters);
    final CreateChangeSetRequest changeSetRequest = new CreateChangeSetRequest() //
            .withCapabilities(Capability.CAPABILITY_IAM) //
            .withStackName(stackName) //
            .withDescription(stackName) //
            .withChangeSetName(changeSetName) //
            .withChangeSetType(changeSetType) //
            .withParameters(parameters).withTemplateBody(templateBody);
    final CreateChangeSetResult result = cloudFormation.createChangeSet(changeSetRequest);
    LOG.info("Change set created: {}", result);
    return result.getId();
}
项目:aws-ant-tasks    文件:UpdateStackTask.java   
/**
 * Allows you to add any number of nested preconfigured Capability elements.
 * Will warn you if the Capability is not supported by our model, but will
 * still try to execute.
 * 
 * @param capability
 *            a preconfigured Capability object.
 */
public void addConfiguredCapability(StackCapability capability) {
    String toAdd = capability.getValue();
    try {
        Capability.fromValue(toAdd);
    } catch (IllegalArgumentException e) {
        System.out
                .println("The capability "
                        + toAdd
                        + " does not seem to be in our model. If this build fails, this may be why.");
    } finally {
        capabilities.add(toAdd);
    }
}
项目:aws-ant-tasks    文件:CreateStackTask.java   
/**
 * Allows you to add any number of nested preconfigured Capability elements.
 * Will warn you if the Capability is not supported by our model, but will
 * still try to execute.
 * 
 * @param capability
 *            a preconfigured Capability object.
 */
public void addConfiguredCapability(StackCapability capability) {
    String toAdd = capability.getValue();
    try {
        Capability.fromValue(toAdd);
    } catch (IllegalArgumentException e) {
        System.out
                .println("The capability "
                        + toAdd
                        + " does not seem to be in our model. If this build fails, this may be why.");
    } finally {
        capabilities.add(toAdd);
    }
}