public class ReusableMachineTemplate extends PortableTemplateBuilder<ReusableMachineTemplate>
NB: to be sure of matching a specific template, you should provide a unique id in the constructor. (this will force 'strict' mode.)
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCRIPTION_METADATA_KEY |
static java.lang.String |
HASH_METADATA_KEY |
static java.lang.String |
NAME_METADATA_KEY |
static java.lang.String |
PREFIX |
static java.lang.String |
TEMPLATE_OWNER_METADATA_KEY |
Constructor and Description |
---|
ReusableMachineTemplate() |
ReusableMachineTemplate(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
ReusableMachineTemplate |
description(java.lang.String description)
see #getDescription()
|
java.util.List<org.jclouds.compute.options.TemplateOptions> |
getAdditionalOptionalOptions() |
java.util.List<org.jclouds.compute.options.TemplateOptions> |
getAdditionalOptions() |
java.lang.String |
getDescription()
a description for this template; this is set on created machines but _not_ used to filter them
(so you can change description freely).
|
java.lang.String |
getName()
human-friendly name for this template.
|
java.lang.String |
getOwner() |
java.util.Set<java.lang.String> |
getTags(boolean includeOptional)
computes the tags that this template will set (argument true) or require to match (argument false)
|
java.util.Map<java.lang.String,java.lang.String> |
getUserMetadata(boolean includeOptional)
computes the user metadata that this template will set (argument true) or required to match (argument false)
|
boolean |
isStrict() |
ReusableMachineTemplate |
metadata(java.util.Map<java.lang.String,java.lang.String> m) |
ReusableMachineTemplate |
metadata(java.lang.String key,
java.lang.String value) |
ReusableMachineTemplate |
metadataOptional(java.util.Map<java.lang.String,java.lang.String> m) |
ReusableMachineTemplate |
metadataOptional(java.lang.String key,
java.lang.String value) |
ReusableMachineTemplate |
name(java.lang.String name)
see #getName()
|
ReusableMachineTemplate |
strict(boolean strict)
whether this template only matches machines instances created from this template;
defaults true if a name is set, otherwise false.
|
ReusableMachineTemplate |
tag(java.lang.String tag) |
ReusableMachineTemplate |
tagOptional(java.lang.String tag) |
ReusableMachineTemplate |
tags(java.lang.String... tags) |
ReusableMachineTemplate |
tagsOptional(java.lang.String... tags) |
ReusableMachineTemplate |
templateOwnedByMe()
adds user.name as owner of this template
|
ReusableMachineTemplate |
templateOwner(java.lang.String owner)
adds an owner tag to this template
|
ReusableMachineTemplate |
templateUnowned()
no owner, means anyone can pick this up (default)
|
java.lang.String |
toString() |
addOptionalOptions, addTemplateOptions, attachComputeService, build, from, from, newJcloudsTemplate, newJcloudsTemplateBuilder
addOptions, any, biggest, blank, equals, fastest, fromHardware, fromImage, fromTemplate, getHardware, getHardwareId, getHypervisorMatchesRegex, getImage, getImageDescriptionMatchesRegex, getImageId, getImageMatchesCondition, getImageNameMatchesRegex, getImageVersionMatchesRegex, getIs64bit, getLocationId, getMinCores, getMinDisk, getMinRam, getOptions, getOsArchitectureMatchesRegex, getOsDescriptionMatchesRegex, getOsFamily, getOsNameMatchesRegex, getOsVersionMatchesRegex, getTemplate, hardwareId, hashCode, hypervisorMatches, imageChooser, imageChooser, imageDescriptionMatches, imageId, imageMatches, imageNameMatches, imageVersionMatches, isBlank, locationId, minCores, minDisk, minRam, options, os64Bit, osArchMatches, osDescriptionMatches, osFamily, osNameMatches, osVersionMatches, smallest
public static final java.lang.String PREFIX
public static final java.lang.String NAME_METADATA_KEY
public static final java.lang.String DESCRIPTION_METADATA_KEY
public static final java.lang.String HASH_METADATA_KEY
public static final java.lang.String TEMPLATE_OWNER_METADATA_KEY
public ReusableMachineTemplate()
public ReusableMachineTemplate(java.lang.String name)
public ReusableMachineTemplate name(java.lang.String name)
public ReusableMachineTemplate description(java.lang.String description)
public ReusableMachineTemplate strict(boolean strict)
public ReusableMachineTemplate templateUnowned()
public ReusableMachineTemplate templateOwnedByMe()
public ReusableMachineTemplate templateOwner(java.lang.String owner)
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getOwner()
public boolean isStrict()
public java.util.List<org.jclouds.compute.options.TemplateOptions> getAdditionalOptions()
getAdditionalOptions
in class AbstractPortableTemplateBuilder<ReusableMachineTemplate>
public java.util.List<org.jclouds.compute.options.TemplateOptions> getAdditionalOptionalOptions()
getAdditionalOptionalOptions
in class PortableTemplateBuilder<ReusableMachineTemplate>
public java.util.Map<java.lang.String,java.lang.String> getUserMetadata(boolean includeOptional)
public java.util.Set<java.lang.String> getTags(boolean includeOptional)
public ReusableMachineTemplate tag(java.lang.String tag)
public ReusableMachineTemplate tags(java.lang.String... tags)
public ReusableMachineTemplate metadata(java.lang.String key, java.lang.String value)
public ReusableMachineTemplate metadata(java.util.Map<java.lang.String,java.lang.String> m)
public ReusableMachineTemplate tagOptional(java.lang.String tag)
public ReusableMachineTemplate tagsOptional(java.lang.String... tags)
public ReusableMachineTemplate metadataOptional(java.lang.String key, java.lang.String value)
public ReusableMachineTemplate metadataOptional(java.util.Map<java.lang.String,java.lang.String> m)
public java.lang.String toString()
toString
in class AbstractPortableTemplateBuilder<ReusableMachineTemplate>