本文整理了Java中com.amazonaws.services.ec2.model.Tag.getKey()
方法的一些代码示例,展示了Tag.getKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.getKey()
方法的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Tag
类名称:Tag
方法名:getKey
[英]The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
.
[中]标签的钥匙。
限制:标记键区分大小写,最多可接受127个Unicode字符。不能以[$0$]开头。
代码示例来源:origin: aws/aws-sdk-java
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode());
hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode());
return hashCode;
}
代码示例来源:origin: aws/aws-sdk-java
/**
* 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 (getKey() != null)
sb.append("Key: ").append(getKey()).append(",");
if (getValue() != null)
sb.append("Value: ").append(getValue());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: aws/aws-sdk-java
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Tag == false)
return false;
Tag other = (Tag) obj;
if (other.getKey() == null ^ this.getKey() == null)
return false;
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false)
return false;
if (other.getValue() == null ^ this.getValue() == null)
return false;
if (other.getValue() != null && other.getValue().equals(this.getValue()) == false)
return false;
return true;
}
代码示例来源:origin: Netflix/Priam
public String retriableCall() throws IllegalStateException {
DescribeInstancesRequest desc =
new DescribeInstancesRequest().withInstanceIds(getInstanceId());
DescribeInstancesResult res = client.describeInstances(desc);
for (Reservation resr : res.getReservations()) {
for (Instance ins : resr.getInstances()) {
for (com.amazonaws.services.ec2.model.Tag tag : ins.getTags()) {
if (tag.getKey().equals("aws:autoscaling:groupName"))
return tag.getValue();
}
}
}
throw new IllegalStateException("Couldn't determine ASG name");
}
}.call();
代码示例来源:origin: aws/aws-sdk-java
if (createTagsRequestTagsListValue.getKey() != null) {
request.addParameter("Tag." + tagsListIndex + ".Key", StringUtils.fromString(createTagsRequestTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (deleteTagsRequestTagsListValue.getKey() != null) {
request.addParameter("Tag." + tagsListIndex + ".Key", StringUtils.fromString(deleteTagsRequestTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecifications." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode());
hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode());
return hashCode;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof Tag == false) return false;
Tag other = (Tag)obj;
if (other.getKey() == null ^ this.getKey() == null) return false;
if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false;
if (other.getValue() == null ^ this.getValue() == null) return false;
if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false;
return true;
}
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecifications." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecifications." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (launchTemplateTagSpecificationRequestTagsListValue.getKey() != null) {
request.addParameter("LaunchTemplateData.TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(launchTemplateTagSpecificationRequestTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (launchTemplateTagSpecificationRequestTagsListValue.getKey() != null) {
request.addParameter("LaunchTemplateData.TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(launchTemplateTagSpecificationRequestTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (tagSpecificationTagsListValue.getKey() != null) {
request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(tagSpecificationTagsListValue.getKey()));
代码示例来源:origin: aws/aws-sdk-java
if (spotFleetTagSpecificationTagsListValue.getKey() != null) {
request.addParameter("SpotFleetRequestConfig.LaunchSpecifications." + launchSpecificationsListIndex
+ ".TagSpecificationSet." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Key",
StringUtils.fromString(spotFleetTagSpecificationTagsListValue.getKey()));
内容来源于网络,如有侵权,请联系作者删除!