Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceTemplates.html">instanceTemplates</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#delete">delete(project, instanceTemplate)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 79 | <p class="firstline">Deletes the specified instance template.</p> |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
| 81 | <code><a href="#get">get(project, instanceTemplate)</a></code></p> |
| 82 | <p class="firstline">Returns the specified instance template resource.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#insert">insert(project, body)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 85 | <p class="firstline">Creates an instance template in the specified project using the data that is included in the request.</p> |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 88 | <p class="firstline">Retrieves a list of instance templates that are contained within the specified project and zone.</p> |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
| 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
| 94 | <code class="details" id="delete">delete(project, instanceTemplate)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 95 | <pre>Deletes the specified instance template. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 96 | |
| 97 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 98 | project: string, The project ID for this request. (required) |
| 99 | instanceTemplate: string, The name of the instance template to delete. (required) |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 100 | |
| 101 | Returns: |
| 102 | An object of the form: |
| 103 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 104 | { # An Operation resource, used to manage asynchronous API requests. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 105 | "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 106 | "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 107 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 108 | "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 109 | "zone": "A String", # [Output Only] URL of the zone where the operation resides. |
| 110 | "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete. |
| 111 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 112 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 113 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 114 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 115 | "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE. |
| 116 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format. |
| 117 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 118 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 119 | "message": "A String", # [Output Only] Optional human-readable details for this warning. |
| 120 | "code": "A String", # [Output Only] The warning type identifier for this warning. |
| 121 | "data": [ # [Output Only] Metadata for this warning in key: value format. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 122 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 123 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 124 | "key": "A String", # [Output Only] A key for the warning data. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 125 | }, |
| 126 | ], |
| 127 | }, |
| 128 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 129 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
| 130 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format. |
| 131 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources. |
| 132 | "name": "A String", # [Output Only] Name of the resource. |
| 133 | "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources. |
| 134 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 135 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 136 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 137 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 138 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 139 | "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 140 | }, |
| 141 | ], |
| 142 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 143 | "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 144 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 145 | "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 146 | }</pre> |
| 147 | </div> |
| 148 | |
| 149 | <div class="method"> |
| 150 | <code class="details" id="get">get(project, instanceTemplate)</code> |
| 151 | <pre>Returns the specified instance template resource. |
| 152 | |
| 153 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 154 | project: string, The project ID for this request. (required) |
| 155 | instanceTemplate: string, The name of the instance template. (required) |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 156 | |
| 157 | Returns: |
| 158 | An object of the form: |
| 159 | |
| 160 | { # An Instance Template resource. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 161 | "kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates. |
| 162 | "description": "A String", # An optional text description for the instance template. |
| 163 | "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier. |
| 164 | "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format. |
| 165 | "properties": { # The instance properties for the instance template resource. |
| 166 | "machineType": "A String", # The machine type to use for instances that are created from this template. |
| 167 | "description": "A String", # An optional text description for the instances that are created from this instance template. |
| 168 | "tags": { # A set of instance tags. # A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 169 | "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| 170 | "A String", |
| 171 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 172 | "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| 173 | # |
| 174 | # To see the latest fingerprint, make get() request to the instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 175 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 176 | "disks": [ # An array of disks that are associated with the instances that are created from this template. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 177 | { # An instance-attached disk resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 178 | "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 179 | # |
| 180 | # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. |
| 181 | "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. |
| 182 | "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| 183 | # |
| 184 | # This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| 185 | # |
| 186 | # This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| 187 | "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. |
| 188 | "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. |
| 189 | "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example: |
| 190 | # |
| 191 | # global/images/my-private-image |
| 192 | # |
| 193 | # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL: |
| 194 | # |
| 195 | # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD |
| 196 | # |
| 197 | # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases. |
| 198 | "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: |
| 199 | # |
| 200 | # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard |
| 201 | # |
| 202 | # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: |
| 203 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType |
| 204 | # - projects/project/zones/zone/diskTypes/diskType |
| 205 | # - zones/zone/diskTypes/diskType |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 206 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 207 | "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). |
| 208 | "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| 209 | "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| 210 | "licenses": [ # [Output Only] Any valid publicly visible licenses. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 211 | "A String", |
| 212 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 213 | "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 214 | "interface": "A String", |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 215 | "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| 216 | "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 217 | }, |
| 218 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 219 | "scheduling": { # Sets the scheduling options for an Instance. # A list of scheduling options for the instances that are created from this template. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 220 | "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| 221 | "preemptible": True or False, # Whether the instance is preemptible. |
| 222 | "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 223 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 224 | "canIpForward": True or False, # A boolean that specifies if instances created from this template can send packets with source IP addresses other than their own or receive packets with destination IP addresses other than their own. If you use these instances as an IP gateway or as the next-hop in a Route resource, specify true. Otherwise, specify false. |
| 225 | "serviceAccounts": [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 226 | { # A service account. |
| 227 | "scopes": [ # The list of scopes to be made available for this service account. |
| 228 | "A String", |
| 229 | ], |
| 230 | "email": "A String", # Email address of the service account. |
| 231 | }, |
| 232 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 233 | "metadata": { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 234 | "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| 235 | { |
| 236 | "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes. |
| 237 | "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. |
| 238 | }, |
| 239 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 240 | "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata. |
| 241 | "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 242 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 243 | "networkInterfaces": [ # An array of network access configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only supported access configuration. If you do not specify any access configurations, the instances that are created from this template will have no external internet access. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 244 | { # A network interface resource attached to an instance. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 245 | "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 246 | { # An access configuration attached to an instance's network interface. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 247 | "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs. |
| 248 | "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 249 | "name": "A String", # Name of this access configuration. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 250 | "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 251 | }, |
| 252 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 253 | "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface. |
| 254 | "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. |
| 255 | "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: |
| 256 | # |
| 257 | # global/networks/default |
| 258 | # |
| 259 | # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: |
| 260 | # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network |
| 261 | # - projects/project/global/networks/network |
| 262 | # - global/networks/default |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 263 | }, |
| 264 | ], |
| 265 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 266 | "selfLink": "A String", # [Output Only] The URL for this instance template. The server defines this URL. |
| 267 | "name": "A String", # The name of the instance template. The name must be 1-63 characters long, and comply with RFC1035. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 268 | }</pre> |
| 269 | </div> |
| 270 | |
| 271 | <div class="method"> |
| 272 | <code class="details" id="insert">insert(project, body)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 273 | <pre>Creates an instance template in the specified project using the data that is included in the request. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 274 | |
| 275 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 276 | project: string, The project ID for this request. (required) |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 277 | body: object, The request body. (required) |
| 278 | The object takes the form of: |
| 279 | |
| 280 | { # An Instance Template resource. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 281 | "kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates. |
| 282 | "description": "A String", # An optional text description for the instance template. |
| 283 | "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier. |
| 284 | "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format. |
| 285 | "properties": { # The instance properties for the instance template resource. |
| 286 | "machineType": "A String", # The machine type to use for instances that are created from this template. |
| 287 | "description": "A String", # An optional text description for the instances that are created from this instance template. |
| 288 | "tags": { # A set of instance tags. # A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 289 | "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| 290 | "A String", |
| 291 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 292 | "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| 293 | # |
| 294 | # To see the latest fingerprint, make get() request to the instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 295 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 296 | "disks": [ # An array of disks that are associated with the instances that are created from this template. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 297 | { # An instance-attached disk resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 298 | "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 299 | # |
| 300 | # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. |
| 301 | "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. |
| 302 | "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| 303 | # |
| 304 | # This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| 305 | # |
| 306 | # This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| 307 | "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. |
| 308 | "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. |
| 309 | "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example: |
| 310 | # |
| 311 | # global/images/my-private-image |
| 312 | # |
| 313 | # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL: |
| 314 | # |
| 315 | # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD |
| 316 | # |
| 317 | # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases. |
| 318 | "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: |
| 319 | # |
| 320 | # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard |
| 321 | # |
| 322 | # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: |
| 323 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType |
| 324 | # - projects/project/zones/zone/diskTypes/diskType |
| 325 | # - zones/zone/diskTypes/diskType |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 326 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 327 | "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). |
| 328 | "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| 329 | "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| 330 | "licenses": [ # [Output Only] Any valid publicly visible licenses. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 331 | "A String", |
| 332 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 333 | "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 334 | "interface": "A String", |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 335 | "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| 336 | "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 337 | }, |
| 338 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 339 | "scheduling": { # Sets the scheduling options for an Instance. # A list of scheduling options for the instances that are created from this template. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 340 | "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| 341 | "preemptible": True or False, # Whether the instance is preemptible. |
| 342 | "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 343 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 344 | "canIpForward": True or False, # A boolean that specifies if instances created from this template can send packets with source IP addresses other than their own or receive packets with destination IP addresses other than their own. If you use these instances as an IP gateway or as the next-hop in a Route resource, specify true. Otherwise, specify false. |
| 345 | "serviceAccounts": [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 346 | { # A service account. |
| 347 | "scopes": [ # The list of scopes to be made available for this service account. |
| 348 | "A String", |
| 349 | ], |
| 350 | "email": "A String", # Email address of the service account. |
| 351 | }, |
| 352 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 353 | "metadata": { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 354 | "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| 355 | { |
| 356 | "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes. |
| 357 | "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. |
| 358 | }, |
| 359 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 360 | "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata. |
| 361 | "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 362 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 363 | "networkInterfaces": [ # An array of network access configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only supported access configuration. If you do not specify any access configurations, the instances that are created from this template will have no external internet access. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 364 | { # A network interface resource attached to an instance. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 365 | "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 366 | { # An access configuration attached to an instance's network interface. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 367 | "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs. |
| 368 | "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 369 | "name": "A String", # Name of this access configuration. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 370 | "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 371 | }, |
| 372 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 373 | "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface. |
| 374 | "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. |
| 375 | "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: |
| 376 | # |
| 377 | # global/networks/default |
| 378 | # |
| 379 | # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: |
| 380 | # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network |
| 381 | # - projects/project/global/networks/network |
| 382 | # - global/networks/default |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 383 | }, |
| 384 | ], |
| 385 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 386 | "selfLink": "A String", # [Output Only] The URL for this instance template. The server defines this URL. |
| 387 | "name": "A String", # The name of the instance template. The name must be 1-63 characters long, and comply with RFC1035. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 388 | } |
| 389 | |
| 390 | |
| 391 | Returns: |
| 392 | An object of the form: |
| 393 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 394 | { # An Operation resource, used to manage asynchronous API requests. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 395 | "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 396 | "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 397 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 398 | "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 399 | "zone": "A String", # [Output Only] URL of the zone where the operation resides. |
| 400 | "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete. |
| 401 | "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 402 | "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 403 | "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 404 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 405 | "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE. |
| 406 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format. |
| 407 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 408 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 409 | "message": "A String", # [Output Only] Optional human-readable details for this warning. |
| 410 | "code": "A String", # [Output Only] The warning type identifier for this warning. |
| 411 | "data": [ # [Output Only] Metadata for this warning in key: value format. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 412 | { |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 413 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
| 414 | "key": "A String", # [Output Only] A key for the warning data. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 415 | }, |
| 416 | ], |
| 417 | }, |
| 418 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 419 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
| 420 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format. |
| 421 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources. |
| 422 | "name": "A String", # [Output Only] Name of the resource. |
| 423 | "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources. |
| 424 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 425 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 426 | { |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 427 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 428 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 429 | "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 430 | }, |
| 431 | ], |
| 432 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 433 | "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 434 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 435 | "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 436 | }</pre> |
| 437 | </div> |
| 438 | |
| 439 | <div class="method"> |
| 440 | <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code> |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 441 | <pre>Retrieves a list of instance templates that are contained within the specified project and zone. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 442 | |
| 443 | Args: |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 444 | project: string, The project ID for this request. (required) |
| 445 | maxResults: integer, Maximum count of results to be returned. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 446 | pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request. |
| 447 | filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 448 | |
| 449 | The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. |
| 450 | |
| 451 | For example, filter=name ne example-instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 452 | |
| 453 | Returns: |
| 454 | An object of the form: |
| 455 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 456 | { # A list of instance templates. |
| 457 | "nextPageToken": "A String", # [Output Only] A token that is used to continue a truncated list request. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 458 | "items": [ # A list of InstanceTemplate resources. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 459 | { # An Instance Template resource. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 460 | "kind": "compute#instanceTemplate", # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates. |
| 461 | "description": "A String", # An optional text description for the instance template. |
| 462 | "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier. |
| 463 | "creationTimestamp": "A String", # [Output Only] The creation timestamp for this instance template in RFC3339 text format. |
| 464 | "properties": { # The instance properties for the instance template resource. |
| 465 | "machineType": "A String", # The machine type to use for instances that are created from this template. |
| 466 | "description": "A String", # An optional text description for the instances that are created from this instance template. |
| 467 | "tags": { # A set of instance tags. # A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 468 | "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| 469 | "A String", |
| 470 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 471 | "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| 472 | # |
| 473 | # To see the latest fingerprint, make get() request to the instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 474 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 475 | "disks": [ # An array of disks that are associated with the instances that are created from this template. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 476 | { # An instance-attached disk resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 477 | "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 478 | # |
| 479 | # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. |
| 480 | "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. |
| 481 | "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| 482 | # |
| 483 | # This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| 484 | # |
| 485 | # This property is mutually exclusive with the source property; you can only define one or the other, but not both. |
| 486 | "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB. |
| 487 | "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. |
| 488 | "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example: |
| 489 | # |
| 490 | # global/images/my-private-image |
| 491 | # |
| 492 | # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL: |
| 493 | # |
| 494 | # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD |
| 495 | # |
| 496 | # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases. |
| 497 | "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example: |
| 498 | # |
| 499 | # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard |
| 500 | # |
| 501 | # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: |
| 502 | # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType |
| 503 | # - projects/project/zones/zone/diskTypes/diskType |
| 504 | # - zones/zone/diskTypes/diskType |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 505 | }, |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 506 | "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). |
| 507 | "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| 508 | "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| 509 | "licenses": [ # [Output Only] Any valid publicly visible licenses. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 510 | "A String", |
| 511 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 512 | "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 513 | "interface": "A String", |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 514 | "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| 515 | "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 516 | }, |
| 517 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 518 | "scheduling": { # Sets the scheduling options for an Instance. # A list of scheduling options for the instances that are created from this template. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 519 | "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| 520 | "preemptible": True or False, # Whether the instance is preemptible. |
| 521 | "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 522 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 523 | "canIpForward": True or False, # A boolean that specifies if instances created from this template can send packets with source IP addresses other than their own or receive packets with destination IP addresses other than their own. If you use these instances as an IP gateway or as the next-hop in a Route resource, specify true. Otherwise, specify false. |
| 524 | "serviceAccounts": [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 525 | { # A service account. |
| 526 | "scopes": [ # The list of scopes to be made available for this service account. |
| 527 | "A String", |
| 528 | ], |
| 529 | "email": "A String", # Email address of the service account. |
| 530 | }, |
| 531 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 532 | "metadata": { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 533 | "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB. |
| 534 | { |
| 535 | "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes. |
| 536 | "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. |
| 537 | }, |
| 538 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 539 | "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata. |
| 540 | "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 541 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 542 | "networkInterfaces": [ # An array of network access configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only supported access configuration. If you do not specify any access configurations, the instances that are created from this template will have no external internet access. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 543 | { # A network interface resource attached to an instance. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 544 | "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 545 | { # An access configuration attached to an instance's network interface. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 546 | "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs. |
| 547 | "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 548 | "name": "A String", # Name of this access configuration. |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 549 | "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 550 | }, |
| 551 | ], |
Nathaniel Manista | 5cbe5ba | 2015-03-10 23:29:22 +0000 | [diff] [blame] | 552 | "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface. |
| 553 | "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. |
| 554 | "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: |
| 555 | # |
| 556 | # global/networks/default |
| 557 | # |
| 558 | # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: |
| 559 | # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network |
| 560 | # - projects/project/global/networks/network |
| 561 | # - global/networks/default |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 562 | }, |
| 563 | ], |
| 564 | }, |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 565 | "selfLink": "A String", # [Output Only] The URL for this instance template. The server defines this URL. |
| 566 | "name": "A String", # The name of the instance template. The name must be 1-63 characters long, and comply with RFC1035. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 567 | }, |
| 568 | ], |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 569 | "kind": "compute#instanceTemplateList", # [Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists. |
| 570 | "id": "A String", # [Output Only] A unique identifier for this instance template. The server defines this identifier. |
| 571 | "selfLink": "A String", # [Output Only] The URL for this instance template list. The server defines this URL. |
Craig Citro | 0e5b9bf | 2014-10-15 10:26:14 -0700 | [diff] [blame] | 572 | }</pre> |
| 573 | </div> |
| 574 | |
| 575 | <div class="method"> |
| 576 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 577 | <pre>Retrieves the next page of results. |
| 578 | |
| 579 | Args: |
| 580 | previous_request: The request for the previous page. (required) |
| 581 | previous_response: The response from the request for the previous page. (required) |
| 582 | |
| 583 | Returns: |
| 584 | A request object that you can call 'execute()' on to request the next |
| 585 | page. Returns None if there are no more items in the collection. |
| 586 | </pre> |
| 587 | </div> |
| 588 | |
| 589 | </body></html> |