com.amazonaws.services.ec2.model.Tag.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中com.amazonaws.services.ec2.model.Tag.getValue()方法的一些代码示例,展示了Tag.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.getValue()方法的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Tag
类名称:Tag
方法名:getValue

Tag.getValue介绍

[英]The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
[中]标记的值。
限制:标记值区分大小写,最多可接受255个Unicode字符。

代码示例

代码示例来源: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

@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

/**
 * 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: 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: h2oai/h2o-2

String name = null;
if( instance.getTags().size() > 0 )
 name = instance.getTags().get(0).getValue();
if( NAME.equals(name) )
 instances.add(instance);

代码示例来源:origin: aws/aws-sdk-java

if (createTagsRequestTagsListValue.getValue() != null) {
  request.addParameter("Tag." + tagsListIndex + ".Value", StringUtils.fromString(createTagsRequestTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (deleteTagsRequestTagsListValue.getValue() != null) {
  request.addParameter("Tag." + tagsListIndex + ".Value", StringUtils.fromString(deleteTagsRequestTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecifications." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源: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.getValue() != null) {
  request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecifications." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecifications." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (launchTemplateTagSpecificationRequestTagsListValue.getValue() != null) {
  request.addParameter("LaunchTemplateData.TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(launchTemplateTagSpecificationRequestTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (launchTemplateTagSpecificationRequestTagsListValue.getValue() != null) {
  request.addParameter("LaunchTemplateData.TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(launchTemplateTagSpecificationRequestTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (tagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("TagSpecification." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(tagSpecificationTagsListValue.getValue()));

代码示例来源:origin: aws/aws-sdk-java

if (spotFleetTagSpecificationTagsListValue.getValue() != null) {
  request.addParameter("SpotFleetRequestConfig.LaunchSpecifications." + launchSpecificationsListIndex
      + ".TagSpecificationSet." + tagSpecificationsListIndex + ".Tag." + tagsListIndex + ".Value",
      StringUtils.fromString(spotFleetTagSpecificationTagsListValue.getValue()));

相关文章