All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.compute.model.InstanceTemplate.html Maven / Gradle / Ivy

There is a newer version: v1-rev20250320-2.0.0
Show newest version






InstanceTemplate (Compute Engine API v1-rev20250107-2.0.0)












com.google.api.services.compute.model

Class InstanceTemplate

  • All Implemented Interfaces:
    Cloneable, Map<String,Object>


    public final class InstanceTemplate
    extends com.google.api.client.json.GenericJson
    Represents an Instance Template resource. Google Compute Engine has two Instance Template resources: * [Global](/compute/docs/reference/rest/v1/instanceTemplates) * [Regional](/compute/docs/reference/rest/v1/regionInstanceTemplates) You can reuse a global instance template in different regions whereas you can use a regional instance template in a specified region only. If you want to reduce cross-region dependency or achieve data residency, use a regional instance template. To create VMs, managed instance groups, and reservations, you can use either global or regional instance templates. For more information, read Instance Templates.

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Constructor Detail

      • InstanceTemplate

        public InstanceTemplate()
    • Method Detail

      • getCreationTimestamp

        public String getCreationTimestamp()
        [Output Only] The creation timestamp for this instance template in RFC3339 text format.
        Returns:
        value or null for none
      • setCreationTimestamp

        public InstanceTemplate setCreationTimestamp(String creationTimestamp)
        [Output Only] The creation timestamp for this instance template in RFC3339 text format.
        Parameters:
        creationTimestamp - creationTimestamp or null for none
      • getDescription

        public String getDescription()
        An optional description of this resource. Provide this property when you create the resource.
        Returns:
        value or null for none
      • setDescription

        public InstanceTemplate setDescription(String description)
        An optional description of this resource. Provide this property when you create the resource.
        Parameters:
        description - description or null for none
      • getId

        public BigInteger getId()
        [Output Only] A unique identifier for this instance template. The server defines this identifier.
        Returns:
        value or null for none
      • setId

        public InstanceTemplate setId(BigInteger id)
        [Output Only] A unique identifier for this instance template. The server defines this identifier.
        Parameters:
        id - id or null for none
      • getKind

        public String getKind()
        [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
        Returns:
        value or null for none
      • setKind

        public InstanceTemplate setKind(String kind)
        [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
        Parameters:
        kind - kind or null for none
      • getName

        public String getName()
        Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
        Returns:
        value or null for none
      • setName

        public InstanceTemplate setName(String name)
        Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
        Parameters:
        name - name or null for none
      • getProperties

        public InstanceProperties getProperties()
        The instance properties for this instance template.
        Returns:
        value or null for none
      • setProperties

        public InstanceTemplate setProperties(InstanceProperties properties)
        The instance properties for this instance template.
        Parameters:
        properties - properties or null for none
      • getRegion

        public String getRegion()
        [Output Only] URL of the region where the instance template resides. Only applicable for regional resources.
        Returns:
        value or null for none
      • setRegion

        public InstanceTemplate setRegion(String region)
        [Output Only] URL of the region where the instance template resides. Only applicable for regional resources.
        Parameters:
        region - region or null for none
      • getSelfLink

        public String getSelfLink()
        [Output Only] The URL for this instance template. The server defines this URL.
        Returns:
        value or null for none
      • setSelfLink

        public InstanceTemplate setSelfLink(String selfLink)
        [Output Only] The URL for this instance template. The server defines this URL.
        Parameters:
        selfLink - selfLink or null for none
      • getSourceInstance

        public String getSourceInstance()
        The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
        Returns:
        value or null for none
      • setSourceInstance

        public InstanceTemplate setSourceInstance(String sourceInstance)
        The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance
        Parameters:
        sourceInstance - sourceInstance or null for none
      • getSourceInstanceParams

        public SourceInstanceParams getSourceInstanceParams()
        The source instance params to use to create this instance template.
        Returns:
        value or null for none
      • setSourceInstanceParams

        public InstanceTemplate setSourceInstanceParams(SourceInstanceParams sourceInstanceParams)
        The source instance params to use to create this instance template.
        Parameters:
        sourceInstanceParams - sourceInstanceParams or null for none
      • clone

        public InstanceTemplate clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2025 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy