@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Target extends Object implements Serializable, Cloneable
An array of search criteria that targets instances using a Key
;Value
combination that you
specify. Targets
is required if you don't provide one or more instance IDs in the call.
Constructor and Description |
---|
Target() |
Modifier and Type | Method and Description |
---|---|
Target |
clone() |
boolean |
equals(Object obj) |
String |
getKey()
User-defined criteria for sending commands that target instances that meet the criteria.
|
List<String> |
getValues()
User-defined criteria that maps to
Key . |
int |
hashCode() |
void |
setKey(String key)
User-defined criteria for sending commands that target instances that meet the criteria.
|
void |
setValues(Collection<String> values)
User-defined criteria that maps to
Key . |
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
Target |
withKey(String key)
User-defined criteria for sending commands that target instances that meet the criteria.
|
Target |
withValues(Collection<String> values)
User-defined criteria that maps to
Key . |
Target |
withValues(String... values)
User-defined criteria that maps to
Key . |
public void setKey(String key)
User-defined criteria for sending commands that target instances that meet the criteria. Key
can be
tag:<Amazon EC2 tag>
or name:<Amazon EC2 instance ID>
. For example,
tag:ServerRole
or name:0123456789012345
. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
key
- User-defined criteria for sending commands that target instances that meet the criteria. Key
can be tag:<Amazon EC2 tag>
or name:<Amazon EC2 instance ID>
. For
example, tag:ServerRole
or name:0123456789012345
. For more information about how
to send commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public String getKey()
User-defined criteria for sending commands that target instances that meet the criteria. Key
can be
tag:<Amazon EC2 tag>
or name:<Amazon EC2 instance ID>
. For example,
tag:ServerRole
or name:0123456789012345
. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
Key
can be tag:<Amazon EC2 tag>
or name:<Amazon EC2 instance ID>
. For
example, tag:ServerRole
or name:0123456789012345
. For more information about
how to send commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public Target withKey(String key)
User-defined criteria for sending commands that target instances that meet the criteria. Key
can be
tag:<Amazon EC2 tag>
or name:<Amazon EC2 instance ID>
. For example,
tag:ServerRole
or name:0123456789012345
. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
key
- User-defined criteria for sending commands that target instances that meet the criteria. Key
can be tag:<Amazon EC2 tag>
or name:<Amazon EC2 instance ID>
. For
example, tag:ServerRole
or name:0123456789012345
. For more information about how
to send commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public List<String> getValues()
User-defined criteria that maps to Key
. For example, if you specified tag:ServerRole
,
you could specify value:WebServer
to execute a command on instances that include Amazon EC2 tags of
ServerRole;WebServer. For more information about how to send commands that target instances using
Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
Key
. For example, if you specified
tag:ServerRole
, you could specify value:WebServer
to execute a command on
instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public void setValues(Collection<String> values)
User-defined criteria that maps to Key
. For example, if you specified tag:ServerRole
,
you could specify value:WebServer
to execute a command on instances that include Amazon EC2 tags of
ServerRole;WebServer. For more information about how to send commands that target instances using
Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
values
- User-defined criteria that maps to Key
. For example, if you specified
tag:ServerRole
, you could specify value:WebServer
to execute a command on
instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public Target withValues(String... values)
User-defined criteria that maps to Key
. For example, if you specified tag:ServerRole
,
you could specify value:WebServer
to execute a command on instances that include Amazon EC2 tags of
ServerRole;WebServer. For more information about how to send commands that target instances using
Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
NOTE: This method appends the values to the existing list (if any). Use
setValues(java.util.Collection)
or withValues(java.util.Collection)
if you want to override the
existing values.
values
- User-defined criteria that maps to Key
. For example, if you specified
tag:ServerRole
, you could specify value:WebServer
to execute a command on
instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public Target withValues(Collection<String> values)
User-defined criteria that maps to Key
. For example, if you specified tag:ServerRole
,
you could specify value:WebServer
to execute a command on instances that include Amazon EC2 tags of
ServerRole;WebServer. For more information about how to send commands that target instances using
Key
;Value
parameters, see Executing a Command Using Amazon EC2
Run Command (Linux) or Executing a Command Using Amazon
EC2 Run Command (Windows).
values
- User-defined criteria that maps to Key
. For example, if you specified
tag:ServerRole
, you could specify value:WebServer
to execute a command on
instances that include Amazon EC2 tags of ServerRole;WebServer. For more information about how to send
commands that target instances using Key
;Value
parameters, see Executing a Command Using
Amazon EC2 Run Command (Linux) or Executing a Command Using
Amazon EC2 Run Command (Windows).public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.