Current section

Files

Jump to
google_api_compute lib google_api compute v1 model instance.ex
Raw

lib/google_api/compute/v1/model/instance.ex

# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Compute.V1.Model.Instance do
@moduledoc """
Represents an Instance resource. An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)
## Attributes
- tags (Tags): Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field. Defaults to: `null`.
- canIpForward (boolean()): Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. Defaults to: `null`.
- cpuPlatform (String.t): [Output Only] The CPU platform used by this instance. Defaults to: `null`.
- creationTimestamp (String.t): [Output Only] Creation timestamp in RFC3339 text format. Defaults to: `null`.
- deletionProtection (boolean()): Whether the resource should be protected against deletion. Defaults to: `null`.
- description (String.t): An optional description of this resource. Provide this property when you create the resource. Defaults to: `null`.
- disks ([AttachedDisk]): Array of disks associated with this instance. Persistent disks must be created before you can assign them. Defaults to: `null`.
- guestAccelerators ([AcceleratorConfig]): A list of the type and count of accelerator cards attached to the instance. Defaults to: `null`.
- hostname (String.t): Defaults to: `null`.
- id (String.t): [Output Only] The unique identifier for the resource. This identifier is defined by the server. Defaults to: `null`.
- kind (String.t): [Output Only] Type of the resource. Always compute#instance for instances. Defaults to: `null`.
- labelFingerprint (binary()): A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance. Defaults to: `null`.
- labels (%{optional(String.t) => String.t}): Labels to apply to this instance. These can be later modified by the setLabels method. Defaults to: `null`.
- machineType (String.t): Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types. Defaults to: `null`.
- metadata (Metadata): The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. Defaults to: `null`.
- minCpuPlatform (String.t): Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". Defaults to: `null`.
- name (String.t): The name of the resource, provided by the client when initially creating the resource. The resource 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. Defaults to: `null`.
- networkInterfaces ([NetworkInterface]): An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. Defaults to: `null`.
- scheduling (Scheduling): Sets the scheduling options for this instance. Defaults to: `null`.
- selfLink (String.t): [Output Only] Server-defined URL for this resource. Defaults to: `null`.
- serviceAccounts ([ServiceAccount]): A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information. Defaults to: `null`.
- shieldedInstanceConfig (ShieldedInstanceConfig): Defaults to: `null`.
- shieldedInstanceIntegrityPolicy (ShieldedInstanceIntegrityPolicy): Defaults to: `null`.
- startRestricted (boolean()): [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. Defaults to: `null`.
- status (String.t): [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED. Defaults to: `null`.
- Enum - one of [PROVISIONING, REPAIRING, RUNNING, STAGING, STOPPED, STOPPING, SUSPENDED, SUSPENDING, TERMINATED]
- statusMessage (String.t): [Output Only] An optional, human-readable explanation of the status. Defaults to: `null`.
- zone (String.t): [Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. Defaults to: `null`.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:tags => GoogleApi.Compute.V1.Model.Tags.t(),
:canIpForward => any(),
:cpuPlatform => any(),
:creationTimestamp => any(),
:deletionProtection => any(),
:description => any(),
:disks => list(GoogleApi.Compute.V1.Model.AttachedDisk.t()),
:guestAccelerators => list(GoogleApi.Compute.V1.Model.AcceleratorConfig.t()),
:hostname => any(),
:id => any(),
:kind => any(),
:labelFingerprint => any(),
:labels => map(),
:machineType => any(),
:metadata => GoogleApi.Compute.V1.Model.Metadata.t(),
:minCpuPlatform => any(),
:name => any(),
:networkInterfaces => list(GoogleApi.Compute.V1.Model.NetworkInterface.t()),
:scheduling => GoogleApi.Compute.V1.Model.Scheduling.t(),
:selfLink => any(),
:serviceAccounts => list(GoogleApi.Compute.V1.Model.ServiceAccount.t()),
:shieldedInstanceConfig => GoogleApi.Compute.V1.Model.ShieldedInstanceConfig.t(),
:shieldedInstanceIntegrityPolicy =>
GoogleApi.Compute.V1.Model.ShieldedInstanceIntegrityPolicy.t(),
:startRestricted => any(),
:status => any(),
:statusMessage => any(),
:zone => any()
}
field(:tags, as: GoogleApi.Compute.V1.Model.Tags)
field(:canIpForward)
field(:cpuPlatform)
field(:creationTimestamp)
field(:deletionProtection)
field(:description)
field(:disks, as: GoogleApi.Compute.V1.Model.AttachedDisk, type: :list)
field(:guestAccelerators, as: GoogleApi.Compute.V1.Model.AcceleratorConfig, type: :list)
field(:hostname)
field(:id)
field(:kind)
field(:labelFingerprint)
field(:labels, type: :map)
field(:machineType)
field(:metadata, as: GoogleApi.Compute.V1.Model.Metadata)
field(:minCpuPlatform)
field(:name)
field(:networkInterfaces, as: GoogleApi.Compute.V1.Model.NetworkInterface, type: :list)
field(:scheduling, as: GoogleApi.Compute.V1.Model.Scheduling)
field(:selfLink)
field(:serviceAccounts, as: GoogleApi.Compute.V1.Model.ServiceAccount, type: :list)
field(:shieldedInstanceConfig, as: GoogleApi.Compute.V1.Model.ShieldedInstanceConfig)
field(
:shieldedInstanceIntegrityPolicy,
as: GoogleApi.Compute.V1.Model.ShieldedInstanceIntegrityPolicy
)
field(:startRestricted)
field(:status)
field(:statusMessage)
field(:zone)
end
defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.Instance do
def decode(value, options) do
GoogleApi.Compute.V1.Model.Instance.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.Instance do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end