本文整理汇总了Java中com.amazonaws.services.cloudformation.model.Parameter.setParameterValue方法的典型用法代码示例。如果您正苦于以下问题:Java Parameter.setParameterValue方法的具体用法?Java Parameter.setParameterValue怎么用?Java Parameter.setParameterValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amazonaws.services.cloudformation.model.Parameter
的用法示例。
在下文中一共展示了Parameter.setParameterValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addParameterTo
import com.amazonaws.services.cloudformation.model.Parameter; //导入方法依赖的package包/类
protected void addParameterTo(Collection<Parameter> parameters, List<TemplateParameter> declared, String parameterName, String parameterValue) {
boolean isDeclared = false;
for(TemplateParameter declaration : declared) {
isDeclared = (declaration.getParameterKey().equals(parameterName));
if (isDeclared==true) break;
}
if (!isDeclared) {
logger.info(String.format("Not populating parameter %s as it is not declared in the json file", parameterName));
} else {
logger.info(String.format("Setting %s parameter to %s", parameterName, parameterValue));
Parameter parameter = new Parameter();
parameter.setParameterKey(parameterName);
parameter.setParameterValue(parameterValue);
parameters.add(parameter);
}
}
示例2: checkParameterCannotBePassed
import com.amazonaws.services.cloudformation.model.Parameter; //导入方法依赖的package包/类
private void checkParameterCannotBePassed(String parameterName)
throws IOException,
CfnAssistException, InterruptedException {
Parameter parameter = new Parameter();
parameter.setParameterKey(parameterName);
parameter.setParameterValue("test");
Collection<Parameter> parameters = new HashSet<>();
parameters.add(parameter);
try {
aws.applyTemplate(new File(FilesForTesting.SIMPLE_STACK), projectAndEnv, parameters);
fail("Should have thrown exception");
}
catch (InvalidStackParameterException exception) {
// expected
}
}
示例3: checkForKeyValueParameters
import com.amazonaws.services.cloudformation.model.Parameter; //导入方法依赖的package包/类
private Collection<Parameter> checkForKeyValueParameters(CommandLine cmd, Option commandFlag) throws InvalidStackParameterException {
LinkedList<Parameter> results = new LinkedList<>();
String argName = commandFlag.getArgName();
logger.debug("Checking for arg " + argName);
if (!cmd.hasOption(argName)) {
logger.debug("Additional parameters not supplied");
return results;
}
logger.info("Process additional parameters");
List<String> valuesList = Arrays.asList(cmd.getOptionValues(argName));
logger.debug(String.format("Found %s arguments inside of parameter", valuesList.size()));
for(String keyValue : valuesList) {
String[] parts = keyValue.split("=");
if (parts.length!=2) {
String msg = "Unable to process parameters given, problem with " + keyValue;
logger.error(msg);
throw new InvalidStackParameterException(msg);
}
Parameter pair = new Parameter();
pair.setParameterKey(parts[0]);
pair.setParameterValue(parts[1]);
results.add(pair);
logger.info("Add parameter " + keyValue);
}
return results;
}
示例4: getParamter
import com.amazonaws.services.cloudformation.model.Parameter; //导入方法依赖的package包/类
public Parameter getParamter() {
Parameter param = new Parameter();
param.setParameterKey(name);
param.setParameterValue(value);
return param;
}
示例5: createParam
import com.amazonaws.services.cloudformation.model.Parameter; //导入方法依赖的package包/类
private static Parameter createParam(String key, String value) {
Parameter p = new Parameter();
p.setParameterKey(key);
p.setParameterValue(value);
return p;
}
示例6: convert
import com.amazonaws.services.cloudformation.model.Parameter; //导入方法依赖的package包/类
private List<Parameter> convert(final Map<String, String> paraMap) {
final List<Parameter> list = Lists.newArrayList();
if (paraMap == null || paraMap.values().size() == 0) {
return list;
}
for (final String name : paraMap.keySet()) {
final Parameter parameter = new Parameter();
parameter.setParameterKey(name);
parameter.setParameterValue(paraMap.get(name));
list.add(parameter);
}
return list;
}