當前位置: 首頁>>代碼示例>>Java>>正文


Java Capability類代碼示例

本文整理匯總了Java中com.amazonaws.services.cloudformation.model.Capability的典型用法代碼示例。如果您正苦於以下問題:Java Capability類的具體用法?Java Capability怎麽用?Java Capability使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Capability類屬於com.amazonaws.services.cloudformation.model包,在下文中一共展示了Capability類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createChangeSet

import com.amazonaws.services.cloudformation.model.Capability; //導入依賴的package包/類
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();
}
 
開發者ID:kaklakariada,項目名稱:aws-sam-gradle,代碼行數:16,代碼來源:CloudformationService.java

示例2: addConfiguredCapability

import com.amazonaws.services.cloudformation.model.Capability; //導入依賴的package包/類
/**
 * 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);
    }
}
 
開發者ID:awslabs,項目名稱:aws-ant-tasks,代碼行數:22,代碼來源:UpdateStackTask.java


注:本文中的com.amazonaws.services.cloudformation.model.Capability類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。