Class TemplateLink
java.lang.Object
com.azure.resourcemanager.resources.models.TemplateLink
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TemplateLink>
public final class TemplateLink
extends Object
implements com.azure.json.JsonSerializable<TemplateLink>
Entity representing the reference to the template.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the contentVersion property: If included, must match the ContentVersion in the template.static TemplateLinkfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of TemplateLink from the JsonReader.id()Get the id property: The resource id of a Template Spec.Get the queryString property: The query string (for example, a SAS token) to be used with the templateLink URI.Get the relativePath property: The relativePath property can be used to deploy a linked template at a location relative to the parent.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) uri()Get the uri property: The URI of the template to deploy.voidvalidate()Validates the instance.withContentVersion(String contentVersion) Set the contentVersion property: If included, must match the ContentVersion in the template.Set the id property: The resource id of a Template Spec.withQueryString(String queryString) Set the queryString property: The query string (for example, a SAS token) to be used with the templateLink URI.withRelativePath(String relativePath) Set the relativePath property: The relativePath property can be used to deploy a linked template at a location relative to the parent.Set the uri property: The URI of the template to deploy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
TemplateLink
public TemplateLink()Creates an instance of TemplateLink class.
-
-
Method Details
-
uri
Get the uri property: The URI of the template to deploy. Use either the uri or id property, but not both.- Returns:
- the uri value.
-
withUri
Set the uri property: The URI of the template to deploy. Use either the uri or id property, but not both.- Parameters:
uri- the uri value to set.- Returns:
- the TemplateLink object itself.
-
id
Get the id property: The resource id of a Template Spec. Use either the id or uri property, but not both.- Returns:
- the id value.
-
withId
Set the id property: The resource id of a Template Spec. Use either the id or uri property, but not both.- Parameters:
id- the id value to set.- Returns:
- the TemplateLink object itself.
-
relativePath
Get the relativePath property: The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs.- Returns:
- the relativePath value.
-
withRelativePath
Set the relativePath property: The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs.- Parameters:
relativePath- the relativePath value to set.- Returns:
- the TemplateLink object itself.
-
contentVersion
Get the contentVersion property: If included, must match the ContentVersion in the template.- Returns:
- the contentVersion value.
-
withContentVersion
Set the contentVersion property: If included, must match the ContentVersion in the template.- Parameters:
contentVersion- the contentVersion value to set.- Returns:
- the TemplateLink object itself.
-
queryString
Get the queryString property: The query string (for example, a SAS token) to be used with the templateLink URI.- Returns:
- the queryString value.
-
withQueryString
Set the queryString property: The query string (for example, a SAS token) to be used with the templateLink URI.- Parameters:
queryString- the queryString value to set.- Returns:
- the TemplateLink object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TemplateLink>- Throws:
IOException
-
fromJson
Reads an instance of TemplateLink from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of TemplateLink if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the TemplateLink.
-